Skip to content

Commit

Permalink
SAK-39977 Restore correct operation of the Online tool (sakaiproject#…
Browse files Browse the repository at this point in the history
…8491)

Set the initial view correctly again
  • Loading branch information
smarquard authored Aug 28, 2020
1 parent 740827d commit bde0096
Showing 1 changed file with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public class PresenceToolAction extends VelocityPortletPaneledAction

protected static final String MODE_SERVERS = "servers";

protected ClusterService clusterService;
protected ClusterService clusterService;

public PresenceToolAction() {
clusterService = (ClusterService) ComponentManager.get(ClusterService.class);
Expand All @@ -76,6 +76,12 @@ public PresenceToolAction() {
protected void initState(SessionState state, VelocityPortlet portlet, JetspeedRunData rundata)
{
super.initState(state, portlet, rundata);

// init the display mode
if (state.getAttribute(STATE_DISPLAY_MODE) == null) {
state.setAttribute(STATE_DISPLAY_MODE, MODE_SERVERS);
}

} // initState

/**
Expand Down Expand Up @@ -219,6 +225,9 @@ public void doServers(RunData data, Context context)

} // doServers

/**
* Change node state between Allow new sessions and Stop new sessions
*/
public void doSwitch(RunData data, Context context)
{
// We look at the status in the request so that if someone else has changed the status
Expand All @@ -228,13 +237,5 @@ public void doSwitch(RunData data, Context context)
clusterService.markClosing(id, !ClusterService.Status.CLOSING.toString().equals(status));
}

/**
* The action for when the user want's an update
*/
public void doRefresh(RunData data, Context context)
{

} // doRefresh

} // PresenceToolAction

0 comments on commit bde0096

Please sign in to comment.