Opened 4 years ago

Closed 4 years ago

#883 closed enhancement (fixed)

Add support for progress reporting to the Reggie wizard API

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: major Milestone: Reggie v4.4
Component: net.sf.basedb.reggie Keywords:
Cc:

Description

There are a few Reggie wizards that takes some time to complete. It would be nice to have the possibility to include a progress reporter that can display how the work is going.

It should be possible to extend the Wizard.showLoadingAnimation() with some information that activates the progress bar. When activated Reggie should issue regular requests for checking the progress in the background. The working servlet need handle the actual progress reporting.

Some wizards that may need this:

  • The INCA export
  • The INCA import
  • The statistics wizards
  • Linked specimen wizard
  • Stray files wizard
  • Maybe some more...

Change History (9)

comment:1 Changed 4 years ago by Nicklas Nordborg

(In [3904]) References #883: Add support for progress reporting to the Reggie wizard API

The progress reporter should now be functional. The "INCA export" wizard has been used as a test case.

A wizard that want to use progress reporting need to:

  1. In the *.jsp page, add a <div id="wizard-progress"></div> tag just below the <div id="wizard-status"></div> tag.

  1. In *.js page, call Wizard.showLoadingAnimation() with two parameters instead of one. The second parameter is the name of the progress reporter. Use names that are unique.

  1. In the working servlet, create a SimpleProgressReporter and store it in the current SessionControl by calling SessionControl.setSessionSetting() with the name from step 2.

  1. In the working servlet, use the progress reporter from step 3 to report progress. Eg. call ProgressReporter.display() method at regular intervals.

comment:2 Changed 4 years ago by Nicklas Nordborg

(In [3905]) References #883: Add support for progress reporting to the Reggie wizard API

Added progress reporter to the "Linked specimen wizard".

comment:3 Changed 4 years ago by Nicklas Nordborg

(In [3906]) References #883: Add support for progress reporting to the Reggie wizard API

IE doesn't support classList.add() with multiple parameters. Assign directly to className instead.

comment:4 Changed 4 years ago by Nicklas Nordborg

(In [3907]) References #883: Add support for progress reporting to the Reggie wizard API

Added progress reporter to the 'Sample processing statistics' wizard. This requried a bit of refactoring of the code to make it iterate only once instead of multiple times over the items. Sevaral lists objects that was only used for lookup was converted to set objects instead.

comment:5 Changed 4 years ago by Nicklas Nordborg

(In [3911]) References #883: Add support for progress reporting to the Reggie wizard API

Added progress reporter to the 'Sample source report' wizard. The "Missing sample data report" needed a bit of refactoring to get rid of multiple loops.

comment:6 Changed 4 years ago by Nicklas Nordborg

(In [3912]) References #883: Add support for progress reporting to the Reggie wizard API

Added progress reporter to the 'Stray files wizard'.

comment:7 Changed 4 years ago by Nicklas Nordborg

(In [3914]) References #883: Add support for progress reporting to the Reggie wizard API

Added progress reporter to the 'Export missing data...' wizards.

comment:8 Changed 4 years ago by Nicklas Nordborg

(In [3916]) References #883: Add support for progress reporting to the Reggie wizard API

Added progress reporter to the 'Import frozen tissue data' wizard. Also changed this importer to use the batch annotation importer.

comment:9 Changed 4 years ago by Nicklas Nordborg

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.