Skip to content

Commit a6d75dc

Browse files
authored
Merge pull request #1364 from mskacelik/JBEAP-26190
[JBEAP-26190] Domain mode has server-group missing Resume operation in Web Console
2 parents b86a2de + fc2a415 commit a6d75dc

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

app/src/main/java/org/jboss/hal/client/runtime/group/ServerGroupColumn.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -162,23 +162,16 @@ public List<ItemAction<ServerGroup>> actions() {
162162
.handler(serverGroupActions::restart)
163163
.constraints(constraints(item, RESTART_SERVERS))
164164
.build());
165-
}
166-
if (item.getServers(Server::isStarted).size() - item.getServers(Server::isSuspended)
167-
.size() > 0) {
168165
actions.add(new ItemAction.Builder<ServerGroup>()
169166
.title(resources.constants().suspend())
170167
.handler(serverGroupActions::suspend)
171168
.constraints(constraints(item, SUSPEND_SERVERS))
172169
.build());
173-
}
174-
if (item.hasServers(Server::isSuspended)) {
175170
actions.add(new ItemAction.Builder<ServerGroup>()
176171
.title(resources.constants().resume())
177172
.handler(serverGroupActions::resume)
178173
.constraints(constraints(item, RESUME_SERVERS))
179174
.build());
180-
}
181-
if (item.hasServers(Server::isStarted)) {
182175
actions.add(new ItemAction.Builder<ServerGroup>()
183176
.title(resources.constants().stop())
184177
.handler(serverGroupActions::stop)

core/src/main/java/org/jboss/hal/core/runtime/group/ServerGroupActions.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,9 @@ public void onError(Throwable error) {
237237
}
238238

239239
public void resume(ServerGroup serverGroup) {
240-
List<Server> suspendedServers = serverGroup.getServers(Server::isSuspended);
240+
// Suspended state is not available (only data from server-config is),
241+
// So let's use the started state from server-config, which is good enough here.
242+
List<Server> suspendedServers = serverGroup.getServers(Server::isStarted);
241243
if (!suspendedServers.isEmpty()) {
242244
prepare(serverGroup, suspendedServers, RESUME);
243245
Operation operation = new Operation.Builder(serverGroup.getAddress(), RESUME_SERVERS).build();

0 commit comments

Comments
 (0)