File tree Expand file tree Collapse file tree
app/src/main/java/org/jboss/hal/client/runtime/group
core/src/main/java/org/jboss/hal/core/runtime/group Expand file tree Collapse file tree Original file line number Diff line number Diff 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 )
Original file line number Diff line number Diff 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 ();
You can’t perform that action at this time.
0 commit comments