Skip to content

Commit

Permalink
#142 - Change timer duration, removing system.out messages
Browse files Browse the repository at this point in the history
  • Loading branch information
stebjan committed Feb 16, 2016
1 parent 253d83f commit 3a07ee6
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public ExperimentPackageDownloadForm(String id, final ExperimentPackage expPacka

final CheckGroup<Experiment> group = new CheckGroup<Experiment>("group", selectList);

final AbstractAjaxTimerBehavior timer = new AbstractAjaxTimerBehavior(Duration.ONE_SECOND) {
final AbstractAjaxTimerBehavior timer = new AbstractAjaxTimerBehavior(Duration.milliseconds(500)) {

private static final long serialVersionUID = 1L;

Expand All @@ -160,8 +160,6 @@ protected void onTimer(AjaxRequestTarget target)
step = 100;
} else {
double percentage = (double) manager.getNumberOfDownloadedExperiments() / manager.getNumberOfExperiments() * 100;
System.out.println(manager.getNumberOfDownloadedExperiments());
System.out.println(percentage);
step = (int) percentage - progressBar.getModelObject();
}
}
Expand Down Expand Up @@ -199,7 +197,6 @@ protected void onComplete(AjaxRequestTarget target)
outputFile = manager.getOutputFile();
downloadLink.setVisible(true);
target.add(downloadLink);
target.add(downloadLink);
}
};

Expand Down Expand Up @@ -353,6 +350,7 @@ protected void onSubmit(AjaxRequestTarget target, Form form) {
manager.start();
timer.restart(target);
progressBar.setModelObject(0);
step = 1;

//outputFile = downloadProvider.generatePackageFile(expPackage, command, licenseModel.getObject(), selectList);

Expand Down

0 comments on commit 3a07ee6

Please sign in to comment.