Skip to content

Commit

Permalink
attempt to fix task page refreshing
Browse files Browse the repository at this point in the history
  • Loading branch information
KaterynaHonchar committed Nov 2, 2018
1 parent bcf8fc1 commit 871acd5
Showing 1 changed file with 5 additions and 4 deletions.
Expand Up @@ -73,7 +73,8 @@

public class PageTaskEdit extends PageAdmin implements Refreshable {

private static final int REFRESH_INTERVAL_IF_RUNNABLE = 2000;
private static final int REFRESH_INTERVAL_IF_RUNNING = 2000;
private static final int REFRESH_INTERVAL_IF_RUNNABLE = 60000;
private static final int REFRESH_INTERVAL_IF_SUSPENDED = 60000;
private static final int REFRESH_INTERVAL_IF_WAITING = 60000;
private static final int REFRESH_INTERVAL_IF_CLOSED = 60000;
Expand Down Expand Up @@ -232,10 +233,9 @@ public int getRefreshInterval() {
return REFRESH_INTERVAL_IF_CLOSED;
}
switch (exec) {
case RUNNABLE:
case RUNNING:
case RUNNING_OR_RUNNABLE:
case SUSPENDING: return REFRESH_INTERVAL_IF_RUNNABLE;
case SUSPENDING: return REFRESH_INTERVAL_IF_RUNNING;
case RUNNABLE:return REFRESH_INTERVAL_IF_RUNNABLE;
case SUSPENDED: return REFRESH_INTERVAL_IF_SUSPENDED;
case WAITING: return REFRESH_INTERVAL_IF_WAITING;
case CLOSED: return REFRESH_INTERVAL_IF_CLOSED;
Expand Down Expand Up @@ -272,6 +272,7 @@ public void refresh(AjaxRequestTarget target) {
} else {
LOGGER.info("Hard version of the page refreshing, tabsVisibilityNew: " + tabsVisibilityNew + "; \n tabsVisibilityOld: " + tabsVisibilityOld);
// hard version
target.add(getSummaryPanel());
target.add(mainPanel.getTabPanel());
}
target.add(getSummaryPanel());
Expand Down

0 comments on commit 871acd5

Please sign in to comment.