Opened 9 years ago

Closed 9 years ago

#865 closed task (fixed)

Stray files wizard

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

Description (last modified by Nicklas Nordborg)

The files in the project archive may not reflect what is registered in the database. For example, jobs that are failing midway can leave files in the project archive and items may be deleted from BASE.

A wizard is needed that checks the files in the project archive and compare against the information in the BASE database. Files that are found in the project archive but have no relation to anything in BASE should be listed and the user should have the possibility to delete the files.

Exactly how the file/directory structure on the project archive should be mapped to items in BASE need some more investigation. [UPDATE] After thinking a bit more about this I think the most reliable way is compare directories against items with DataFilesFolder annotation.

One way is to check all File items and the URL that has been stored in the database. But there are some scripts that generate files that are not mapped to BASE so this may not work in all cases.

Another way is to only check directories. The path below the root project archive folder should directly match the DataFilesFolder annotation a derived or raw bioassay item.

The wizard should be located in the "Server administrator" section and require "Administrator" role.

Change History (9)

comment:1 by Nicklas Nordborg, 9 years ago

Description: modified (diff)

comment:2 by Nicklas Nordborg, 9 years ago

Milestone: Reggie v4.xReggie v4.3
Status: newassigned

comment:3 by Nicklas Nordborg, 9 years ago

Description: modified (diff)

comment:4 by Nicklas Nordborg, 9 years ago

(In [3837]) References #865: Stray files wizard

Started to implement the stray files wizard in AdminServlet and stray-files.js/.jsp. The current implementation will list all directories in the ProjectArchive and ExternalArchive and compare with the DataFilesFolder annotation for deriver and raw bioassays in BASE. Mismatches are listen on the web page.

The only functionality so far is an icon for opening a popup dialog that list the files inside the clicked folder. The existing functionality for doing this in OpenGridServlet has been extended to support this for FileServer items (required a pre-defined cluster in reggie-config.xml before this change).

comment:5 by Nicklas Nordborg, 9 years ago

(In [3838]) References #865: Stray files wizard

Added support for filtering the list with stray folders. Filtering is done in the browser only. This is more or less same implementation as the lists in the "Flagged RNA" and "Yellow label" wizards.

Added toolbar with with Delete stray folders button. This is not yet functional.

comment:6 by Nicklas Nordborg, 9 years ago

(In [3839]) References #865: Stray files wizard

Added 'owner' to the list.

Added 'owner' and 'last modified' to the popup listing the files in the stray folders.

Must allow top-level directories as stray folders in case there are left-overs from a specimen that has been deleted.

comment:7 by Nicklas Nordborg, 9 years ago

(In [3843]) References #865: Stray files wizard

Implemented support for deleting stray folders.

The user must select the folders to delete in the list that is displayed in the browser.

To prevent security issues the server keeps a copy of the original list of stray folders and the browser must specfy the index of the folders that should be deleted. Thus, it is not possible to "hack" the system by trying to trick it into deleting any folder at random.

comment:8 by Nicklas Nordborg, 9 years ago

(In [3844]) References #865: Stray files wizard

Added a counter for the stray folders. It is updated by the CounterService except that it is ignored by the forceCount flag.

comment:9 by Nicklas Nordborg, 9 years ago

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