Opened 10 years ago
Closed 10 years ago
#608 closed enhancement (fixed)
Update Labenv to new scripting pattern
Reported by: | Nicklas Nordborg | Owned by: | olle |
---|---|---|---|
Priority: | major | Milestone: | LabEnv v1.3 |
Component: | net.sf.basedb.labenv | Keywords: | |
Cc: |
Description (last modified by )
Similar to #564 and #571, but Labenv contains a lot more script than any of the other extensions.
First step is to make sure that Labenv code that appear in BASE (eg. the menu items) are fixed. When that is done Labenv should work with default BASE settings if released with <about safe-scripts="1" safe-resources="0">.
After that we can refactor each Labenv wizard one by one as there is to spare.
NOTE! Adding this to LabEnv 1.2, but should be moved to a later milestone if LabEnv 1.2 is released before BASE 3.3.
Change History (9)
comment:1 by , 10 years ago
Description: | modified (diff) |
---|---|
Milestone: | LabEnv v1.2 → LabEnv v1.3 |
comment:3 by , 10 years ago
Traceability note:
- The lab environment extension was introduced in Ticket #529 (Retrieve and store temperature and humidity measurements).
- Reggie ticket #530 (Display logs from temperature and humidity measurements) is concerned with retrieving data from the lab environment data base for specific dates of interest for the sample preparation and sequencing.
LabEnv v1.1:
- The lab environment extension was updated in Ticket #592 (Lab environment extension improved report routines).
LabEnv v1.2:
- The lab environment extension was updated in Ticket #607 (Date /time format is different in configuration file and GUI).
- The lab environment extension was updated in Ticket #610 (Mail server prints debug output as default).
- The lab environment extension was updated in Ticket #612 (LabEnv overview display shows wrong time offsets when the latest data points are filtered away).
- The lab environment extension was updated in Ticket #615 (Lab environment extension stability improvement and bug fixes for v1.1).
comment:4 by , 10 years ago
Design discussion:
- Each JSP file should be modified to not include
<script>
tags nor "onclick
" attributes. The Javascript code in the current<script>
tag should be placed in a separate Javascript file with the same base name (filename without file extension) as the JSP file, but with file extension ".js
". The JSP file should refer to the corresponding Javascript file for functionality. - JSP/Javascript code should be updated to the structure used in Reggie v.2.17, specifically Reggie v.2.17.2. This includes use of the "
Wizard
" functionality to control steps in the user interface. - XML file
extensions.xml
inMETA-INF/
should be updated in "<about>
" tags to set attributes "safe-scripts="1"
" and "safe-resources="0"
", where appropriate.
Comments on some code details:
- In order to update the code structure to that used in Reggie v.2.17, Javascript library
reggie.js
should be exchanged forreggie-2.js
, and CSS filereggie.css
should be exchanged forreggie-2.css
:
a. Javascript libraryreggie-2.js
gives access to the "Wizard
" functionality.
b. Class and id names in the JSP file must be modified to work with thereggie-2.css
style sheets.
c. The "<form>
" tag in the JSP file must be updated to include attributes "id="wizard" class="wizard"
", in order for the "Wizard" functionality to work, as well as to get the correct style from CSS filereggie-2.css
.
d. For the "Wizard
" to be able to automatically display and hide different steps in the user interface appropriately, the JSP file must be updated to enclose code for each step in "<div>" tags with specific class and id names.
e. Javascript library filereggie-2.js
automatically prints Reggie program name and version number in the upper right corner of the web page. Sincereggie-2.js
here only works as a supporting Javascript library, this may be confusing in two ways; first since the real BASE extension name is "LabEnv
", and second since another full Reggie BASE extension with another version number may be installed on the same BASE installation. Therefore the JSP file should be extended in the "<style>" tag to set "#reggie-version{display: none;}
", in order to hide this entry.
comment:5 by , 10 years ago
(In [2989]) Refs #608. LabEnv updated to new scripting pattern:
- XML configuration file
extensions.xml
inMETA-INF
updated in "<about>
" tags to set attributes "safe-scripts="1"
" and "safe-resources="0"
", where appropriate. - Updates in
resources/
:
a. Javascript library filereggie.js
exchanged forreggie-2.js
.
b. New Javascript library fileprint.js
added.
c. JSP print template fileprint_template.jsp
updated to work with new Javascript and CSS files. - Updates in
resources/css/
:
a. CCS filereggie.css
exchanged forreggie-2.css
.
b. CSS fileprintable.css
updated with style for print button and print instructions.
c. New CSS filereport.css
and SVG filefilters.svg
added. - JSP files in
resources/reports/
with combined layout and functionality have had the functionality placed in separate Javascript ".js
" files, with the same base name (filename without file extension) as the JSP files:
a.labenvironmentalarms.jsp
b.labenvironmentdatabasedisplay.jsp
c.labenvironmentdatabaseeventpopup.jsp
d.labenvironmentdatabaseexport.jsp
e.labenvironmentdatabasestatistics.jsp
f.labsensorinfo.jsp
- Javascript library file
boxplot.js
inresources/reports/
updated by removal of unused functions.
comment:6 by , 10 years ago
comment:7 by , 10 years ago
comment:8 by , 10 years ago
comment:9 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Ticket closed as the requested modifications have been added. If problems should occur, or more modifications be needed, this ticket will be re-opened or a new ticket created.
Moved ticket to LabEnv v1.3.