Opened 2 weeks ago

Closed 2 weeks ago

Last modified 13 days ago

#966 closed defect (fixed)

Allow webswing to be deactivated

Reported by: anupama Owned by: anupama
Priority: moderate Milestone:
Component: Collection Building Severity: major
Keywords: Cc:

Description

Webswing is used in Web GLI which not all librarians will want to expose, so then they may not need webswing. Webswing is now also needed for the collage and phind classifiers (which in GS2 used to always be available), but we still want to be able to deactivate/reactivate the webswing extension.

Dr Bainbridge's description of what to do to make Webswing optional

  1. Need to add to toplevel of GS3's ext folder:
  • DEACTIVATE.SH
  • ACTIVATE.SH

Run as: DEACTIVATE.SH <extension-name>

For every ext, it will check if ext folder exists and if further has a build file, then run ant (de)activate. With error printing along the way when anything fails.

Store any GSDL3SRCHOME in ORIG_GSLD3SRCHOME. At end of (DE)ACTIVATE.SH, check if ORIG_GSLD3SRCHOME has a value, which means it was GSDL3SRCHOME had been set (probably by manually sourcing gs3-setup.sh) before running (DE)ACTIVATE.SH. In which case, print out a message saying they need to a new terminal and source gs3-setup.sh there to take the (de)activation into account.

At the end of DEACTIVATE.SH, it should rename the ext/<extension> folder to ext/<extension>.inactive.

Likewise ACTIVATE.SH should rename <extension>.inactive to <extension> and then run ant activate.

Note:

  • The solr extension had del-service and add-service ant targets
  • The webswing extension had del-extension and add-extension ant targets

(I had to add a "deactivate" target because del-extension required user prompting, which won't work well with DEACTIVATE.SH).

The DEACTIVATE.SH code attempts in turn ant targets deactivate, del-service and del-extension, whichever exists gets executed first. Likewise ACTIVATE.SH attempts ant targets: activate, add-service and add-extension.

  1. The GS3 setup scripts (including cli/ant-... scripts) loading all the exts folders should skip any folder called ".inactive".
  1. A file called DEACTIVATE.txt may optionally exist in an extension. It will need to be created for the webswing extension and explain on deactivation that web gli, and the classifiers collage and phind will not be functional. And it should tell the user what to do to take out the webswing-gli link on the main page and that there is no purpose in using the Phind and Collage classifiers/browsers when building collections.

Once DEACTIVATE.SH has successfully completed, it should print the contents of DEACTIVATE.txt to the screen to warn the user.

  1. Like browser plugins used to have fallback messages when not installed (e.g. Adobe Acrobat Reader will say it's needed to read a PDF when not installed, Macromedia Flash would have a similar message for Flash files), likewise we need equivalent fallback messages on applets when webswing is deactivated.
  1. Hereafter we'd like admin, webswing, depositor's links that appear on the main page to be configurable in build.properties file: follow any existing example for depositor if it exists.

For now, it's possibly in interfaceConfig that admin and webswing is controlled. Is depositor in build.properties now?

Steps 1-4 mostly done in commits

Change History (3)

comment:1 by anupama, 2 weeks ago

Step 5 above:

For now, we'd like the links on the home page to be configurable on a per servlet (per library) basis. We therefore want to start doing the work for this from servlet.xml. It's not specific to this ticket any more, as deactivating webswing is a different task from whether librarians want links appearing on their GS3 home page, so closing this ticket.

comment:2 by anupama, 2 weeks ago

Resolution: fixed
Status: assignedclosed

comment:3 by anupama, 13 days ago

Dr Bainbridge came up with the idea that to control whether the webswing link appears on the main page or not, we should ideally control it at the level of the servlet/library:

edit resources/web/servlets.xml.in and set the webglilink servlet init-param to true, as now demonstrated for the default "library" servlet.

Commits for this: https://trac.greenstone.org/changeset/38995

Note: See TracTickets for help on using tickets.