Opened 10 years ago
Closed 10 years ago
#592 closed enhancement (fixed)
Lab environment extension improved report routines
Reported by: | olle | Owned by: | olle |
---|---|---|---|
Priority: | major | Milestone: | LabEnv v1.1 |
Component: | net.sf.basedb.labenv | Keywords: | |
Cc: |
Description
The lab environment extension should have improved report routines, specifically it should be possible to display a graph of temperature and humidity data for one or more labs for a time interval spanning at least a day.
Change History (47)
comment:1 by , 10 years ago
Status: | new → assigned |
---|
comment:2 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.
comment:3 by , 10 years ago
comment:4 by , 10 years ago
Proposed improvements of filters for selecting data:
The LabEnv extension version 1.0 included daily and weekly distribution reports. In order for the statistical data to be relevant for different kinds of lab work, you want control over whether time periods when the climate control is shut down should be included. The climate control is normally shut down during the following periods:
- During the night (before and after working hours, 18:00-06:00).
- During weekends, Saturdays and Sundays.
- During work-free holidays occurring on weekdays, including Midsummer's Eve, Christmas Eve, and New Year's Eve.
Currently the daily distribution report includes an optional weekday filter, for including all weekdays, Monday-Friday, or Saturday-Sunday.
Improvements of the daily and weekly distribution reports:
- The weekday filter should be extended with options for workdays and non-workdays, and should be available also for the weekly distribution report.
- The weekly distribution report should be extended with the possibility of entering what day-time period should be included when selecting data for the report.
- Selected weekday and daytime filters should be indicated in either the header title or chart title of the plot.
comment:5 by , 10 years ago
Design description of weekday and daytime filter enhancements:
JSP file labenvironmentdatabasestatistics.jsp
in resources/reports/
update:
- HTML section updated with input fields for daytime filter start and end times. Weekday filter updated with options for workdays and non-workdays. Option "Workdays" made new default choice.
- Function
gotoStep2()
updated to show the daytime filter input fields for the weekly distribution, and the weekday filter menu for both the daily and weekly distribution. - Function
goCreate()
updated to send data to the servlet for the daytime filter input fields for the weekly distribution, and the weekday filter menu for both the daily and weekly distribution.
Class/file LabEnvironmentStatisticsServlet.java
in src/net/sf/basedb/labenv/servlet/
update:
- New static constants defined for workday and non-workday options in weekday filter, and new
DateFormat
items for common date expressions. - New
HashMap<String, Boolean>
item for cashing workday indication results. - Protected method
void doGet(HttpServletRequest req, HttpServletResponse resp)
updated with new daytime filter and improved weekday filter. - Private method
List<LabEnvironmentData> applyWeekdayFilter(String weekdayFilter, List<LabEnvironmentData> lthdRawList)
updated with workday and non-workday filter. - New public method
Boolean dayIsWorkday(Date date, String countryCode)
added to return if a date is a workday. - New public method
Date easterSundayDateGregorianCalendar(int year)
added to return the Easter Sunday date for a specific year. - New private method
List<LabEnvironmentData> applyDaytimeFilter(String filterFromTime, String filterToTime, List<LabEnvironmentData> lthdRawList)
added. It returns a pruned list ofLabEnvironmentData
objects after applying a daytime filter. - New private convenience method
Date addDays(Date date, int daysToAdd)
added. It returns a date after adding a specified number of days. - Private method
JSONArray createLabEnvironmentDailyDistributionReport(...)
updated with new argumentsString daytimeFilterFromTime
andString daytimeFilterToTime
. - Private method
JSONObject createJsonPlot(...)
updated with new argumentsString daytimeFilterFromTime
andString daytimeFilterToTime
. - Private method
String fetchChartHeaderTitle(...)
updated with new argumentString weekdayFilter
. - Private method
String fetchChartTitle(...)
updated by exchanging argumentString weekdayFilter
for new argumentsString daytimeFilterFromTime
andString daytimeFilterToTime
.
comment:6 by , 10 years ago
(In [2395]) Refs #592. LabEnv extension updated with weekday and daytime filter enhancements:
JSP file labenvironmentdatabasestatistics.jsp
in resources/reports/
update:
- HTML section updated with input fields for daytime filter start and end times. Weekday filter updated with options for workdays and non-workdays. Option "Workdays" made new default choice.
- Function
gotoStep2()
updated to show the daytime filter input fields for the weekly distribution, and the weekday filter menu for both the daily and weekly distribution. - Function
goCreate()
updated to send data to the servlet for the daytime filter input fields for the weekly distribution, and the weekday filter menu for both the daily and weekly distribution.
Class/file LabEnvironmentStatisticsServlet.java
in src/net/sf/basedb/labenv/servlet/
update:
- New static constants defined for workday and non-workday options in weekday filter, and new
DateFormat
items for common date expressions. - New
HashMap<String, Boolean>
item for cashing workday indication results. - Protected method
void doGet(HttpServletRequest req, HttpServletResponse resp)
updated with new daytime filter and improved weekday filter. - Private method
List<LabEnvironmentData> applyWeekdayFilter(String weekdayFilter, List<LabEnvironmentData> lthdRawList)
updated with workday and non-workday filter. - New public method
Boolean dayIsWorkday(Date date, String countryCode)
added to return if a date is a workday. - New public method
Date easterSundayDateGregorianCalendar(int year)
added to return the Easter Sunday date for a specific year. - New private method
List<LabEnvironmentData> applyDaytimeFilter(String filterFromTime, String filterToTime, List<LabEnvironmentData> lthdRawList)
added. It returns a pruned list ofLabEnvironmentData
objects after applying a daytime filter. - New private convenience method
Date addDays(Date date, int daysToAdd)
added. It returns a date after adding a specified number of days. - Private method
JSONArray createLabEnvironmentDailyDistributionReport(...)
updated with new argumentsString daytimeFilterFromTime
andString daytimeFilterToTime
. - Private method
JSONObject createJsonPlot(...)
updated with new argumentsString daytimeFilterFromTime
andString daytimeFilterToTime
. - Private method
String fetchChartHeaderTitle(...)
updated with new argumentString weekdayFilter
. - Private method
String fetchChartTitle(...)
updated by exchanging argumentString weekdayFilter
for new argumentsString daytimeFilterFromTime
andString daytimeFilterToTime
.
comment:7 by , 10 years ago
Design discussion for displaying graphs of lab environment data over a time interval:
Initially, three graph alternatives should be included for displaying values over time:
- Daily display, where graphs show values over time for a specific date.
- Weekly display, where graphs show values over time for a 7-day period with a specific start date.
- Overview display, where graphs show min, mean, and max values for each day for a chosen period (optionally the full time period stored in the database).
Since the climate control is only active during part of the day, for the Overview display to be useful, it should be possible to select data from a specific time period during the day.
Options for the three display alternatives:
Option | Description | Available for alternative(s) |
Date | Start date for graph | All |
Chart data | Sensor to show data for, or all sensors | All |
Daytime filter | Start and end times for day time period to be displayed. If start time > end time, data from the two periods (Midnight - end time) and (start time - Next Midnight) for each day are used. | Overview display only. |
Time markers will be drawn on the bottom part of the diagram, connected to vertical dotted guide lines. Time markers for the three display alternatives:
Display alternative | Time markers |
Daily display | Hourly markers 00 - 24 .
|
Weekly display | Day markers consisting of the date in YYYYMMDD format, followed by an underscore character "_ " and a three-letter abbreviation of the day of week, e.g. "20140430_Wed " for Wednesday 2014-04-30.
|
Overview display | Day markers consisting of the date in YYYYMMDD format. How many day markers are drawn, depends on the size of the time period, in order not to clog the diagram. For a number of days < 30, all day markers are drawn; for 31 - 149 days markers for dates "01", "05", "10", "15", "20", and "25" are drawn; for 150 - 299 days markers for dates "01", "10", and "20" are drawn; and for > 300 days markers for date "01" are drawn.
|
Other properties of the graphs:
- The display graphs will contain much statistical information shown in the distribution box plots, i.e. mean value, standard deviation, and range will be displayed at the top left corner, while the 25%, 50%, and 75% percentile values will be displayed on the right part of the diagram, connected to horizontal guide lines.
- Only data values from consecutive data points should be connected with lines. To determine if some data points are missing, the display program needs to know the configured time interval between storage of two consecutive data points. Two data points should be considered consecutive, if the time between them doesn't exceed the configured time interval times a factor of size about 1.5. The latter will allow data points before and after an extension restart to still be considered consecutive, while a larger time interval will indicate missing data points.
comment:8 by , 10 years ago
Design of implementation for displaying graphs of lab environment data over a time interval:
- New JSP file
labenvironmentdatabasedisplay.jsp
inresources/reports/
added. It is based onlabenvironmentdatabasestatistics.jsp
, but with fewer options. It has new functionsgetStorageIntervalInSeconds()
andgetLabEnvDatabaseConfig()
to obtain storage interval in seconds, needed to identify missing data points. FunctiongoCreate()
makes an Ajax call to new servletLabEnvironmentDisplayServlet.java
insrc/net/sf/basedb/labenv/servlet/
to obtain a JSON Object with plot data. - New class/file
LabEnvironmentDisplayServlet.java
insrc/net/sf/basedb/labenv/servlet/
added. It is based onLabEnvironmentStatisticsServlet.java
, but with new private methodsa. List<LabEnvironmentDayData> createOverviewSelection(List<LabEnvironmentData> lthdRawList)
,
b.JSONArray createLabEnvironmentOverviewReport(JSONArray jsonStatisticsPlotArray, List<LabEnvironmentData> lthdList, Data startDate, Date endDate, String chartVariant, String viewType, String sensorName, String weekdayFilter, String daytimeFilterFromTime, String daytimeFilterToTime)
,
c.JSONObject createJsonOverviewPlot(String chartVariant, List<LabEnvironmentData> lthdList, Date startDate, Date endDate, String viewType, String chartSite, String variableType, String weekdayFilter, String daytimeFilterFromTime, String daytimeFilterToTime)
,
d.JSONObject createJSONPlotDisplay(String chartVariant, String headerTitle, String title, String variableTitle, HashMap<String,List<Float>> periodStringFloatListHashMap, String viewType, Date startDate)
,
e.List<Float> singleFloatList(List<LabEnvironmentData> lthdList, String variableType)
, and
f.int numMarkers(Date startDate, Date endDate)
.
New inner private classLabEnvironmentDayData
added, for use with overview display. - Class/file
LabEnvironmentServlet.java
insrc/net/sf/basedb/labenv/servlet/
updated in protected methodvoid doGet(HttpServletRequest req, HttpServletResponse resp)
by accepting new command "GetLabEnvDatabaseConfig
", that returns JSON object created by new private methodJSONObject createLabEnvDatabaseConfig(JSONObject json)
. - Class/file
ReportTableUtil.java
insrc/net/sf/basedb/labenv/util/
updated in public methodString getCurrentPeriod(Date currentDateTime, String viewType)
with support for view types "dailyDisplay
", "weeklyDisplay
", and "overviewDisplay
". NewDateFormat
instance variablesyearMonthDayPeriodDateFormat
andhourMinutePeriodDateFormat
added, as well as public convenience methodString getDayOfWeekString(Date date, boolean addNumberPrefix)
. - JavaScript file
boxplot.js
inresources/reports/
updated with new functions:
a.createGraphPlot(boxPlotJsonObject, canvas, draw_area_wdt, draw_area_hgt, draw_scale_factor, viewType, storageIntervalInSeconds)
b.calculateMinDataValueSimple(boxPlotJsonObject)
(for variablev3
)
c.calculateMaxDataValueSimple(boxPlotJsonObject)
(for variablev3
)
d.calculateMinDataValueSimple2(boxPlotJsonObject)
(for variablev1
)
e.calculateMaxDataValueSimple2(boxPlotJsonObject)
(for variablev3
, calls c.)
f.drawGraphPlotLineSegment(x1, y1, x2, y2, x_min, x_max, y_min, y_max, min_off, max_off, x_pad, context, xoff, yoff, wdt, hgt, draw_scale_factor, linewidth)
g.drawGraphPlotDataPoint(x, y, x_min, x_max, y_min, y_max, min_off, max_off, x_pad, context, xoff, yoff, wdt, hgt, draw_scale_factor)
h.drawGraphPlotBoxScaleMarkerXBottom(markerNum, markerNumTot, value, font_size, x_pad, context, xoff, yoff, wdt, hgt)
i.drawDottedLineX(value, min, max, min_off, max_off, context, xoff, yoff, wdt, hgt)
j.drawDottedLineVertical(x, y1, y2, context, xoff, yoff, wdt, hgt)
k.drawPoint(x, y, context, xoff, yoff, wdt, hgt)
- XML file
servlets.xml
inMETA-INF
updated with entry for newLabEnvironmentDisplay
servlet. - XML file
extensions.xml
inMETA-INF
updated with new entry for "Lab environment database display" coupled to JSP filelabenvironmentdatabasedisplay.jsp
inresources/reports/
. - New image file
chart_curve.png
inresources/images/
added. It is used for new menu item "Lab environment database display".
comment:9 by , 10 years ago
(In [2401]) Refs #592. Lab environment extension updated for displaying graphs of lab environment data over a time interval:
- New JSP file
labenvironmentdatabasedisplay.jsp
inresources/reports/
added. It is based onlabenvironmentdatabasestatistics.jsp
, but with fewer options. It has new functionsgetStorageIntervalInSeconds()
andgetLabEnvDatabaseConfig()
to obtain storage interval in seconds, needed to identify missing data points. FunctiongoCreate()
makes an Ajax call to new servletLabEnvironmentDisplayServlet.java
insrc/net/sf/basedb/labenv/servlet/
to obtain a JSON Object with plot data. - New class/file
LabEnvironmentDisplayServlet.java
insrc/net/sf/basedb/labenv/servlet/
added. It is based onLabEnvironmentStatisticsServlet.java
, but with new private methodsa. List<LabEnvironmentDayData> createOverviewSelection(List<LabEnvironmentData> lthdRawList)
,
b.JSONArray createLabEnvironmentOverviewReport(JSONArray jsonStatisticsPlotArray, List<LabEnvironmentData> lthdList, Data startDate, Date endDate, String chartVariant, String viewType, String sensorName, String weekdayFilter, String daytimeFilterFromTime, String daytimeFilterToTime)
,
c.JSONObject createJsonOverviewPlot(String chartVariant, List<LabEnvironmentData> lthdList, Date startDate, Date endDate, String viewType, String chartSite, String variableType, String weekdayFilter, String daytimeFilterFromTime, String daytimeFilterToTime)
,
d.JSONObject createJSONPlotDisplay(String chartVariant, String headerTitle, String title, String variableTitle, HashMap<String,List<Float>> periodStringFloatListHashMap, String viewType, Date startDate)
,
e.List<Float> singleFloatList(List<LabEnvironmentData> lthdList, String variableType)
, and
f.int numMarkers(Date startDate, Date endDate)
.
New inner private classLabEnvironmentDayData
added, for use with overview display. - Class/file
LabEnvironmentServlet.java
insrc/net/sf/basedb/labenv/servlet/
updated in protected methodvoid doGet(HttpServletRequest req, HttpServletResponse resp)
by accepting new command "GetLabEnvDatabaseConfig
", that returns JSON object created by new private methodJSONObject createLabEnvDatabaseConfig(JSONObject json)
. - Class/file
ReportTableUtil.java
insrc/net/sf/basedb/labenv/util/
updated in public methodString getCurrentPeriod(Date currentDateTime, String viewType)
with support for view types "dailyDisplay
", "weeklyDisplay
", and "overviewDisplay
". NewDateFormat
instance variablesyearMonthDayPeriodDateFormat
andhourMinutePeriodDateFormat
added, as well as public convenience methodString getDayOfWeekString(Date date, boolean addNumberPrefix)
. - JavaScript file
boxplot.js
inresources/reports/
updated with new functions:
a.createGraphPlot(boxPlotJsonObject, canvas, draw_area_wdt, draw_area_hgt, draw_scale_factor, viewType, storageIntervalInSeconds)
b.calculateMinDataValueSimple(boxPlotJsonObject)
(for variablev3
)
c.calculateMaxDataValueSimple(boxPlotJsonObject)
(for variablev3
)
d.calculateMinDataValueSimple2(boxPlotJsonObject)
(for variablev1
)
e.calculateMaxDataValueSimple2(boxPlotJsonObject)
(for variablev3
, calls c.)
f.drawGraphPlotLineSegment(x1, y1, x2, y2, x_min, x_max, y_min, y_max, min_off, max_off, x_pad, context, xoff, yoff, wdt, hgt, draw_scale_factor, linewidth)
g.drawGraphPlotDataPoint(x, y, x_min, x_max, y_min, y_max, min_off, max_off, x_pad, context, xoff, yoff, wdt, hgt, draw_scale_factor)
h.drawGraphPlotBoxScaleMarkerXBottom(markerNum, markerNumTot, value, font_size, x_pad, context, xoff, yoff, wdt, hgt)
i.drawDottedLineX(value, min, max, min_off, max_off, context, xoff, yoff, wdt, hgt)
j.drawDottedLineVertical(x, y1, y2, context, xoff, yoff, wdt, hgt)
k.drawPoint(x, y, context, xoff, yoff, wdt, hgt)
- XML file
servlets.xml
inMETA-INF
updated with entry for newLabEnvironmentDisplay
servlet. - XML file
extensions.xml
inMETA-INF
updated with new entry for "Lab environment database display" coupled to JSP filelabenvironmentdatabasedisplay.jsp
inresources/reports/
. - New image file
chart_curve.png
inresources/images/
added. It is used for new menu item "Lab environment database display".
comment:10 by , 10 years ago
(In [2402]) Refs #592. Lab environment extension updated in field name and help text for start date when displaying graphs of lab environment data over a time interval:
- JSP file
labenvironmentdatabasedisplay.jsp
inresources/reports/
updated in functiongotoStep2()
to name date field "Start date
" for view type "weeklyDisplay" and "overviewDisplay", and correction of corresponding help text.
comment:11 by , 10 years ago
(In [2403]) Refs #592. Lab environment extension updated in class/file LabEnvironmentDisplayServlet.java
in src/net/sf/basedb/labenv/servlet/
by suppressing "unchecked" warnings for private method JSONObject createJsonOverviewPlot(String chartVariant, List<LabEnvironmentData> lthdList, Date startDate, Date endDate, String viewType, String chartSite, String variableType, String weekdayFilter, String daytimeFilterFromTime, String daytimeFilterToTime)
.
comment:12 by , 10 years ago
(In [2405]) Refs #592. Lab environment extension updated in class/file LabEnvironmentDisplayServlet.java
in src/net/sf/basedb/labenv/servlet/
by commenting out debug statement:
- Private method
JSONObject createJSONPlotDisplay(String chartVariant, String headerTitle, String title, String variableTitle, HashMap<String,List<Float>> periodStringFloatListHashMap, String viewType, Date startDate)
updated by commenting out debug output of period list, since the output can be extensive, without giving much extra information, after the method has been tested to work under most conditions.
comment:13 by , 10 years ago
Design discussion for lab environment alarm control:
Configuration of lab environment alarms will in the first version be handled by settings in configuration file labenv-config.xml
. However, the alarm functionality will be updated:
- When an alarm has been reported, an alarm blocker flag is set to prevent this alarm from being reported again before the flag is re-set.
- Restarting the lab environment extension will re-set all alarm blocker flags, enabling new alarms to be reported.
- A new menu item "Lab environment alarms" should be added to the lab environment menu. Selecting the new menu item should show an alarm control page.
- The alarm control page should show a table with one row for each configured alarm, with the following information:
a. Alarm no.
b. Sensor name.
c. Start time.
d. End time.
e. Weekday filter.
f. Temperature min.
g. Temperature max.
h. Humidity min.
i. Humidity max.
j. Alarm blocked (status indicated by value of aYes/No
option menu).
k. Alarm text (text of last reported alarm, if any).
- The alarm blocker
Yes/No
option menu for an alarm will be disabled, unless the logged-in user log-in id occurs in the user list for the alarm. - If the logged-in user has permission to control any alarm in the table, a button "Set alarm blocker" will appear on the page. Clicking the button will set the alarm blocker status to the current setting on the page for any alarm the logged-in user has permission to control. Clicking the button is necessary to re-set any alarm blocker status, just changing a value in the alarm blocker
Yes/No
option menu will not affect the setting used by the lab environment service.
comment:14 by , 10 years ago
Design of implementation for lab environment alarm control:
- XML file
extensions.xml
inMETA-INF
updated with new entry for "Lab environment alarms" coupled to JSP filelabenvironmentalarms.jsp
inresources/reports/
. - New JSP file
labenvironmentalarms.jsp
inresources/reports/
added. At loading, functioncreateLabEnvAlarmWebPage()
is called to create the page after calling functionsgetLabSensorConfigList()
andgetLabSensorConfigList()
to obtain information on alarm configuration and logged-in user. The latter functions obtain the information by making Ajax calls to java servletLabEnvironmentServlet.java
insrc/net/sf/basedb/labenv/servlet/
. Button "Set alarm blocker" is coupled to functiongoSetAlarmBlocker()
, which will make an Ajax call to servletLabEnvironmentServlet
to set the alarm blocker status. - Java servlet class/file
LabEnvironmentServlet.java
insrc/net/sf/basedb/labenv/servlet/
updated:
a. Protected methodvoid doGet(HttpServletRequest req, HttpServletResponse resp)
updated to accept Ajax calls for commands "SetLabEnvAlarmconfig
" and "GetLoggedInUserLogInId
".
b. Private methodJSONObject createLabSensorConfigList(JSONObject json)
updated to include alarm list information as a JSONArray.
c. New private methodString fetchLoggedInUserLogInId(SessionControl sc)
added. It returns the log-in id for the logged-in user, ornull
if the id could not be obtained.
d. New private methodvoid setLabEnvAlarmConfig(HttpServletRequest req, SessionControl sc)
added. It updates lab environment alarm configuration regarding alarm blocked flags, based on input from an Ajax request.
- Configuration file
labenv-config.xml
updated with "weekdayfilter
" tags for alarms. - Java servlet class/file
LabEnvironmentStatisticsServlet.java
insrc/net/sf/basedb/labenv/servlet/
updated be adding new public methodboolean includeWeekday(Date date, String weekdayFilter)
. It checks if an input date passes an optional weekday filter. Returnsfalse
if date isnull
. - Java data access object class/file
LabSensorAlarmConfig.java
insrc/net/sf/basedb/labenv/dao/
updated with instance variables forString weekdayFilter
,Boolean alarmBlocked
, andString alarmText
, with corresponding public accessor methods. - Java class/file
LabEnvironmentConfigation.java
insrc/net/sf/basedb/labenv/
updated with support for weekday filter. - Java class/file
LabEnvironment.java
insrc/net/sf/basedb/labenv/
updated with support for weekday filter.
comment:15 by , 10 years ago
(In [2415]) Refs #592. Lab environment extension updated with lab environment alarm control:
- XML file
extensions.xml
inMETA-INF
updated with new entry for "Lab environment alarms" coupled to JSP filelabenvironmentalarms.jsp
inresources/reports/
. - New JSP file
labenvironmentalarms.jsp
inresources/reports/
added. At loading, functioncreateLabEnvAlarmWebPage()
is called to create the page after calling functionsgetLabSensorConfigList()
andgetLabSensorConfigList()
to obtain information on alarm configuration and logged-in user. The latter functions obtain the information by making Ajax calls to java servletLabEnvironmentServlet.java
insrc/net/sf/basedb/labenv/servlet/
. Button "Set alarm blocker" is coupled to functiongoSetAlarmBlocker()
, which will make an Ajax call to servletLabEnvironmentServlet
to set the alarm blocker status. - Java servlet class/file
LabEnvironmentServlet.java
insrc/net/sf/basedb/labenv/servlet/
updated:
a. Protected methodvoid doGet(HttpServletRequest req, HttpServletResponse resp)
updated to accept Ajax calls for commands "SetLabEnvAlarmconfig
" and "GetLoggedInUserLogInId
".
b. Private methodJSONObject createLabSensorConfigList(JSONObject json)
updated to include alarm list information as a JSONArray.
c. New private methodString fetchLoggedInUserLogInId(SessionControl sc)
added. It returns the log-in id for the logged-in user, ornull
if the id could not be obtained.
d. New private methodvoid setLabEnvAlarmConfig(HttpServletRequest req, SessionControl sc)
added. It updates lab environment alarm configuration regarding alarm blocked flags, based on input from an Ajax request.
- Configuration file
labenv-config.xml
updated with "weekdayfilter
" tags for alarms. - Java servlet class/file
LabEnvironmentStatisticsServlet.java
insrc/net/sf/basedb/labenv/servlet/
updated be adding new public methodboolean includeWeekday(Date date, String weekdayFilter)
. It checks if an input date passes an optional weekday filter. Returnsfalse
if date isnull
. - Java data access object class/file
LabSensorAlarmConfig.java
insrc/net/sf/basedb/labenv/dao/
updated with instance variables forString weekdayFilter
,Boolean alarmBlocked
, andString alarmText
, with corresponding public accessor methods. - Java class/file
LabEnvironmentConfigation.java
insrc/net/sf/basedb/labenv/
updated with support for weekday filter. - Java class/file
LabEnvironment.java
insrc/net/sf/basedb/labenv/
updated with support for weekday filter.
comment:16 by , 10 years ago
(In [2416]) Refs #592. Lab environment extension updated in code formatting:
- Java class/file
LabEnvironment.java
insrc/net/sf/basedb/labenv/
updated in public methodvoid checkAlarms(String labSensorUrl, Date measurementTime, double temperature, double humidity)
by insertion of missing newline character to make code more readable.
comment:17 by , 10 years ago
(In [2418]) Refs #592. Lab environment extension updated to only use a fixed number of decimals when reporting alarms:
- Java class/file
LabEnvironment.java
insrc/net/sf/basedb/labenv/
updated in public methodvoid checkAlarms(String labSensorUrl, Date measurementTime, double temperature, double humidity)
to format output values for temperature and humidity data to only use a number of decimals defined in new private constantnumberOfDecimals
, initialized to 2.
comment:18 by , 10 years ago
(In [2419]) Refs #592. Lab environment extension updated to check permission to re-set alarm blocker settings on the server side only, eliminating the need to send the alarm user list to the client JSP script:
- JSP file
labenvironmentalarms.jsp
inresources/reports/
updated:
a. FunctioncreateLabEnvAlarmWebPage()
updated to obtain alarm permission directly from Ajax response from servlet.
b. FunctionfetchAlarmPermission(loggedInUserLoginId, userId)
removed. - Java servlet class/file
LabEnvironmentServlet.java
insrc/net/sf/basedb/labenv/servlet/
updated:
a. Protected methodvoid doGet(HttpServletRequest req, HttpServletResponse resp)
updated to addSessionControl
object as argument when calling private methodJSONObject createLabSensorConfigList(JSONObject json, SessionControl sc)
, and by removing support for Ajax command "GetLoggedInUserLogInId
".
b. Private methodJSONObject createLabSensorConfigList(...)
updated with second argumentSessionControl sc
, used to call new private methodboolean fetchAlarmPermission(LabSensorAlarmConfig alarm, SessionControl sc)
to obtain alarm permission.
c. New private methodboolean fetchAlarmPermission(LabSensorAlarmConfig alarm, SessionControl sc)
added. It returnstrue
if the alarm user list contains the logged-in user log-in id, elsefalse
.
d. Private methodvoid setLabEnvAlarmConfig(HttpServletRequest req, SessionControl sc)
updated to call new private methodboolean fetchAlarmPermission(LabSensorAlarmConfig alarm, SessionControl sc)
to obtain alarm permission.
comment:19 by , 10 years ago
(In [2423]) Refs #592. Lab environment extension updated in header title for overview display:
- Java servlet class/file
LabEnvironmentDisplayServlet.java
insrc/net/sf/basedb/labenv/servlet/
updated in private methodString fetchChartHeaderTitle(String chartVariant, String viewType, String chartSite, String variableType, String weekdayFilter)
by exchanging string "overview display
" for the more descriptive "min,mean,max display
" for overview display.
comment:20 by , 10 years ago
Design update of the lab environment alarm infra-structure:
- Alarm numbering. Currently, when numbering of alarms have been needed, the numbers have been generated locally from an alarm list. It might be advantageous to have a unique number associated with each alarm, so data access object class/file
LabSensorAlarmConfig.java
insrc/net/sf/basedb/labenv/dao/
should be updated with a private instance variableint no
with public accessor methods. To ensure that the numbers are unique and consecutive, they will not be set in the configuration file, but be assigned by class/fileLabEnvironmentConfiguration.java
insrc/net/sf/basedb/labenv/
when parsing alarm entries in the configuration file in private methodList<LabSensorAlarmConfig> fetchLabSensorAlarmList(Element labSensorTag, Namespace ns)
. Only an alarm entry with some non-null value will result in an alarm item, and get a number. Java servletLabEnvironmentServlet.java
insrc/net/sf/basedb/labenv/servlet/
will be updated in private methodJSONObject createLabSensorConfigList(JSONObject json, SessionControl sc)
to include the number in the JSON object for the alarm in the JSON array. JSP filelabenvironmentalarms.jsp
inresources/reports/
will be updated to use the intrinsic alarm numbers instead of locally generated ones. - User entry for an alarm. Currently, it only consists of a user log-in id string. It should be updated to allow more attributes, starting with an email address string. The
labenv-config.xml
configuration file will be updated by making the "user" tag a block, that can contain other tags, starting with an "id" tag (the former contents of the "user" tag) and an "emailaddress" tag. A new data access object class/fileLabSensorAlarmUserConfig.java
insrc/net/sf/basedb/labenv/dao/
will be added to store the user entries for an alarm. Class/fileLabEnvironmentConfiguration.java
insrc/net/sf/basedb/labenv/
will be updated when parsing alarm entries in the configuration file in private methodList<LabSensorAlarmConfig> fetchLabSensorAlarmList(Element labSensorTag, Namespace ns)
to call new private methodList<LabSensorAlarmUserConfig> fetchLabSensorAlarmUserList(Element alarmTag, Namespace ns)
to obtain the user list. - Alarm when contact with a lab environment sensor is lost. When
null
values are obtained from a lab environment sensor, all configured alarms for that sensor should report the error, since there is no guarantee that the lab environment values lie within the configured limits. Class/fileLabEnvironment.java
insrc/net/sf/basedb/labenv/
should be updated in private methodmeasureAndStoreLabEnvironmentData(LabSensorUtil labSensorUtil, LabSensorConfig labSensorConfig, Date measurementTime)
to callcheckAlarms(...)
after every finished cycle of obtaining data for averaging, and public methodcheckAlarms(...)
to have temperature and humidity arguments of typeDouble
instead ofdouble
, and to report an alarm if any of the values isnull
.
comment:21 by , 10 years ago
(In [2424]) Refs #592. Lab environment extension updated in alarm infra-structure to allow:
a. Intrinsic alarm numbering.
b. More complex user entry for an alarm; initially with id and email address.
c. Alarm when contact with a lab environment sensor is lost.
- New data access object class/file
LabSensorAlarmUserConfig.java
insrc/net/sf/basedb/labenv/dao/
added. It will store the user entries for an alarm. - Data access object class/file
LabSensorAlarmConfig.java
insrc/net/sf/basedb/labenv/dao/
updated:
a. New private instance variableint no
with public accessor methods.
b. Private instance variableuserList
updated to be of typeList<LabSensorAlarmUserConfig>
instead ofList<String>
. - Class/file
LabEnvironmentConfiguration.java
insrc/net/sf/basedb/labenv/
updated:
a. Private methodList<LabSensorAlarmConfig> fetchLabSensorAlarmList(Element labSensorTag, Namespace ns)
updated to assign alarm numbers when parsing alarm entries in the configuration file, and to obtain the user list by calling new private methodList<LabSensorAlarmUserConfig> fetchLabSensorAlarmUserList(Element alarmTag, Namespace ns)
.
b. New private methodList<LabSensorAlarmUserConfig> fetchLabSensorAlarmUserList(Element alarmTag, Namespace ns)
added. It obtains the user list from an alarm XML tag.
c. New private convenience methodLabSensorAlarmUserConfig createIfNeeded(LabSensorAlarmUserConfig labSensorAlarmUserConfig)
added.
d. Private convenience methodLabSensorAlarmConfig createIfNeeded(LabSensorAlarmConfig labSensorAlarmConfig)
updated to set the alarm number to the incremented value of new private instance variableint alarmNo
. - Class/file
LabEnvironment.java
insrc/net/sf/basedb/labenv/
updated:
a. Private methodmeasureAndStoreLabEnvironmentData(LabSensorUtil labSensorUtil, LabSensorConfig labSensorConfig, Date measurementTime)
updated to callcheckAlarms(...)
after every finished cycle of obtaining data for averaging.
b. Public methodcheckAlarms(...)
updated to have temperature and humidity arguments of typeDouble
instead ofdouble
, and to report an alarm if any of the values isnull
. - Java servlet
LabEnvironmentServlet.java
insrc/net/sf/basedb/labenv/servlet/
updated:
a. Private methodJSONObject createLabSensorConfigList(JSONObject json, SessionControl sc)
updated to include the number in the JSON object for the alarm in the JSON array.
b. Private methodboolean fetchAlarmPermission(LabSensorAlarmConfig alarm, SessionControl sc)
updated to check if the logged-in user log-in id equals the alarm userid
attribute.
c. Private methodvoid setLabEnvAlarmConfig(HttpServletRequest req, SessionControl sc)
updated to use the intrinsic alarm number instead of a locally generated one. - JSP file
labenvironmentalarms.jsp
inresources/reports/
updated to use the intrinsic alarm numbers instead of locally generated ones.
comment:22 by , 10 years ago
(In [2425]) Refs #592. Lab environment extension updated in alarm infra-structure to allow more complex user entry for an alarm; update of configuration file template labenv-config.xml
:
- Configuration file template
labenv-config.xml
updated by making the "user
" tag a block, that can contain other tags, starting with an "id
" tag (the former contents of the "user
" tag) and an "emailaddress
" tag.
comment:23 by , 10 years ago
(In [2426]) Refs #592. Lab environment extension updated in alarm text layout:
- Class/file
LabEnvironment.java
insrc/net/sf/basedb/labenv/
updated in public methodcheckAlarms(String labSensorUrl, Date measurementTime, Double temperature, Double humidity)
by inserting a space character between the sensor URL and date string in the alarm text.
comment:24 by , 10 years ago
Test of alarm:
- Set-up: The lab environment extension were configured to measure temperature and humidity values every minute, and store the average values every 5 minutes. An activated alarm were identified by an entry in the log file. Alarms were configured for lab sensors 1 and 2:
a. The alarms were set to be in use during hours08:00
-16:30
.
b. Narrow limit settings were used for temperature and humidity, ensuring that an alarm should be activated with high probability when averaged data were obtained to be stored on the server.
c. User A were set in the user list for both alarms, while user B were set only in the user list for the alarm for sensor 1.
d. At a specified time, the network cable for sensor 2 was disconnected for a 7 minute interval, in order to test missing data alarm.
- Results: The test results were those expected for a passed test:
a. No alarm were reported outside the time interval08:00
-16:30
, even though the temperature or humidity values were outside the alarm limits.
b. Alarms were reported when during the time interval08:00
-16:30
, when temperature or humidity values were outside the alarm limits.
c. After an alarm had been reported, the alarm was marked as blocked for further alarm reports, until re-set by one of the configured users. Both alarm blockerYes/No
menus were enabled for alarm user A, while only the alarm blockerYes/No
menu for alarm 1 was enabled for user B.
d. A blocked alarm could be re-set by a user for which the alarm blockerYes/No
menu was enabled by setting the menu toNo
, and pressing the "Set alarm blocker
" button (the old alarm text will remain until a new alarm is reported).
e. A "Missing data" alarm were reported for sensor 2, after it had been disconnected for more than 5 minutes.
comment:25 by , 10 years ago
(In [2427]) Refs #592. Lab environment extension updated in layout of alarm table:
- JSP file
labenvironmentalarms.jsp
inresources/reports/
updated:
a. FunctiongetTableCellYesNoSelectElement(value, id, permission, colspan, rowspan)
updated with new argumentclazz
beforecolspan
. Attributeclass
of the created cell element will be set toclazz
.
b. FunctioncreateLabEnvAlarmWebPage()
updated to call functiongetTableCellYesNoSelectElement(...)
with new argumentclazz
set toalarmTableClass
, similarly to the other cell elements.
comment:26 by , 10 years ago
(In [2428]) Refs #592. Lab environment extension updated in header title for overview display:
- Java servlet class/file
LabEnvironmentDisplayServlet.java
insrc/net/sf/basedb/labenv/servlet/
updated in private methodString fetchChartHeaderTitle(String chartVariant, String viewType, String chartSite, String variableType, String weekdayFilter)
by inserting space characters in title string "min,mean,max display
" for overview display.
comment:27 by , 10 years ago
(In [2431]) Refs #592. Lab environment extension updated in servlet, in order to avoid problems with unclosed DbControl
items:
- Java servlet class/file
LabEnvironmentServlet.java
insrc/net/sf/basedb/labenv/servlet/
updated:
a. Private methodString fetchLoggedInUserLogIn(SessionControl sc)
updated to accept an extra argumentDbControl dc
, instead of creating a newDbControl
object from theSessionControl
.
b. Private methodboolean fetchAlarmPermission(LabSensorAlarmConfig alarm, SessionControl sc)
updated to accept an extra argumentDbControl dc
, which is used when calling private methodString fetchLoggedInUserLogIn(SessionControl sc, DbControl dc)
.
c. Private methodvoid setLabEnvAlarmConfig(HttpServletRequest req, SessionControl sc)
updated to accept an extra argumentDbControl dc
, which is used when calling private methodboolean fetchAlarmPermission(LabSensorAlarmConfig alarm, SessionControl sc, DbControl dc)
.
d. Private methodJSONObject createLabSensorConfigList(JSONObject json, SessionControl sc)
updated to accept an extra argumentDbControl dc
, which is used when calling private methodboolean fetchAlarmPermission(LabSensorAlarmConfig alarm, SessionControl sc, DbControl dc)
.
e. Protected methodvoid doGet(HttpServletRequest req, HttpServletResponse resp)
updated to get a newDbControl
object from theSessionControl
, and use it when calling private methodsvoid setLabEnvAlarmConfig(HttpServletRequest req, SessionControl sc, DbControl dc)
andJSONObject createLabSensorConfigList(JSONObject json, SessionControl sc, DbControl dc)
.
comment:28 by , 10 years ago
(In [2432]) Refs #592. Lab environment extension updated with first version of alarm notification via e-mail:
- New library file
mail.jar
for e-mail support in java added inlib/compile/
. - Configuration file template
labenv-config.xml
updated by addition of a new "emailconfig
" block, containing tags "smtphost
", "fromaddress
", and "fromname
". - New data access object class/file
EmailConfig.java
insrc/net/sf/basedb/labenv/dao/
added. It contains private instance variables and corresponding public accessor methods for the attributes in the "emailconfig
" block in configuration filelabenv-config.xml
. - Java class/file
LabenvironmentConfiguration.java
insrc/net/sf/basedb/labenv/
updated in private methodvoid fetchConfiguration()
to read the new e-mail settings from configuration filelabenv-config.xml
, and store the values in new private instance variableEmailConfig emailConfig
with corresponding public accessor method. - New utility class/file
MailUtil.java
insrc/net/sf/basedb/labenv/util/
added. It contains a minimal set-up for sending e-mails. - Class/file
Labenvironment.java
insrc/net/sf/basedb/labenv/
updated:
a. Public methodvoid checkAlarms(String labSensorUrl, Date measurementTime, Double temperature, Double humidity)
updated for an activated alarm to call new private methodList<String> fetchEmailAddressList(LabSensorAlarmConfig alarm)
to obtain an e-mail list for the alarm in question, and then call new private methodvoid notification(String toAddress, String sensorName, String alarmText)
to send e-mails to the addresses in the list.
b. New private methodList<String> fetchEmailAddressList(LabSensorAlarmConfig alarm)
added. It returns a list of e-mail addresses for the alarm, ornull
if none could be found.
c. New private methodvoid notification(String toAddress, String sensorName, String alarmText)
added. It calls public methodvoid sendMail(...)
inMailUtil
to try to send a notification e-mail to addresstoAddress
.
comment:29 by , 10 years ago
(In [2433]) Refs #592. Lab environment extension updated in servlet to reduce the amount of debug output:
- Java servlet class/file
LabEnvironmentServlet.java
insrc/net/sf/basedb/labenv/servlet/
updated:
a. Protected methodvoid doGet(HttpServletRequest req, HttpServletResponse resp)
updated by commenting out debug output of returned JSON string.
b. Private methodJSONObject createLabSensorConfigList(JSONObject json, SessionControl sc. DbControl dc)
updated by commenting out debug info on data added to JSONArray.
comment:30 by , 10 years ago
(In [2439]) Refs #592. Lab environment extension updated in JSP files to have more relevant section names:
- JSP files
labenvironmentdatabasedisplay.jsp
andlabenvironmentdatabasestatistics.jsp
inresources/reports/
updated by exchanging section iditemCountSection
for the more descriptiveparameterSection
.
comment:31 by , 10 years ago
(In [2440]) Refs #592. Lab environment extension updated by associating main "Lab Environment" menu item with a generic "thermometer" icon:
- XML file
extensions.xml
inMETA-INF
updated by associating main "Lab Environment" menu item with newthermometer.png
icon. - New icon
thermometer.png
inresources\images\
added. The icon was obtained from web page http://www.iconki.com/16x16-objects-and-people-icons-327-p7.asp, and should be free to use according to the information on the page.
comment:32 by , 10 years ago
(In [2444]) Refs #592. Lab environment extension updated to hopefully make e-mail functionality for notification more consistent and stable:
- Jar file
mail.jar
inlib/compile/
exchanged formail-1.4.3.jar
, in order to use the same version as is currently used by BASE. - Text file
readme.txt
inlib/compile/
updated with addition of filemail-1.4.3.jar
. - Java class/file
LabEnvironment.java
insrc/net/sf/basedb/labenv/
updated in private methodvoid notification(String toAddress, String sensorName, String alarmText)
by putting call tomailUtil.sendMail(...)
in a try-catch block and catch any exception thrown to be printed in the log file. - Utility class/file
MailUtil.java
insrc/net/sf/basedb/labenv/util/
updated in public methodvoid sendMail(String smtpHost, String fromAddress, String fromName, String toAddress, String messageSubject, String messageBody)
by exchanging call ofSession.getDefaultInstance(props, new ForcedAuthenticator())
forSession.getInstance(props, new ForcedAuthenticator())
, in order to hopefully avoid problems with "java.lang.SecurityException: Access to default session denied
", when the default instance already has a different authenticator set.
comment:33 by , 10 years ago
comment:34 by , 10 years ago
Design update to support display of lab environment data for a single lab sensor and date in a pop-up window, in order to simplify implementation of Reggie ticket #530 (Display logs from temperature and humidity measurements):
- New JSP file
labenvironmentdatabaseeventpopup.jsp
inresources/reports/
added. It retrieves values for input parameters "pageTitle
", "labSensorUrl
", and "originDate
" from the Http request, and transfers them to java servletLabEnvironmentDisplayServlet
in an Ajax request, after which it uses the returned JSON data to display a pop-up window with graphs of temperature and humidity for the lab and date of interest. - Class/file
LabEnvironmentDisplayServlet.java
insrc/net/sf/basedb/labenv/servlet/
should be updated in protected methodvoid doGet(HttpServletRequest req, HttpServletResponse resp)
to retrieve an optional page title string from the Ajax request, and add it to the createdjsonReport
JSONObject
for key string "pageTitle
".
comment:35 by , 10 years ago
(In [2463]) Refs #592. Lab environment extension updated to support display of lab environment data for a single lab sensor and date in a pop-up window, in order to simplify implementation of Reggie ticket #530 (Display logs from temperature and humidity measurements):
- New JSP file
labenvironmentdatabaseeventpopup.jsp
inresources/reports/
added. It retrieves values for input parameters "pageTitle
", "labSensorUrl
", and "originDate
" from the Http request, and transfers them to java servletLabEnvironmentDisplayServlet
in an Ajax request, after which it uses the returned JSON data to display a pop-up window with graphs of temperature and humidity for the lab and date of interest. - Class/file
LabEnvironmentDisplayServlet.java
insrc/net/sf/basedb/labenv/servlet/
updated in protected methodvoid doGet(HttpServletRequest req, HttpServletResponse resp)
to retrieve an optional page title string from the Ajax request, and add it to the createdjsonReport
JSONObject
for key string "pageTitle
".
comment:36 by , 10 years ago
Design update of lab environment weekly and overview display reports:
- Both weekly and overview display should support day-time and week day filters, since filtering of the data affects the calculated statistical values shown in and beside the graphs. Currently the overview display supports a day-time filter.
- Overview display report day markers. Day markers consist of the date in YYYYMMDD format. Currently, for a number of days < 30, all day markers are drawn; for 31 - 149 days markers for dates "01", "05", "10", "15", "20", and "25" are drawn; for 150 - 299 days markers for dates "01", "10", and "20" are drawn; and for > 300 days markers for date "01" are drawn. This should be updated for 31 - 366 days to show markers for Mondays, since it is advantageous for the interpretation of the graph to know when a new week starts.
Implementation:
- JSP file
labenvironmentdatabasedisplay.jsp
inresources/reports/
updated:
a. FunctiongotoStep2()
updated to display day-time filter input fields and week day selection menu for weekly and overview display reports.
b. FunctiongoCreate()
updated to send input data for day-time and week day filters in Ajax request toLabEnvironmentDisplayServlet
.
c. HTML section updated with week day selection menu.
- Class/file
LabEnvironmentDisplayServlet.java
insrc/net/sf/basedb/labenv/servlet/
updated:
a. Protected methoddoGet(HttpServletRequest req, HttpServletResponse resp)
updated to apply optional day-time and week day filters for weekly and overview display reports.
b. Private methodJSONObject createJsonOverviewPlot(String chartVariant, List<LabEnvironmentData> lthdList, Date startDate, Date endDate, String viewType, String chartSite, String variableType, String weekdayFilter, String daytimeFilterFromTime, String daytimeFilterToTime)
updated for 31 - 366 days to show markers for Mondays.
comment:37 by , 10 years ago
(In [2465]) Refs #592. Lab environment extension updated for weekly and overview display reports:
- Both weekly and overview display updated to support day-time and week day filters, since filtering of the data affects the calculated statistical values shown in and beside the graphs. Currently the overview display supports a day-time filter.
- Overview display report day markers updated for 31 - 366 days to show markers for Mondays, since it is advantageous for the interpretation of the graph to know when a new week starts.
Implementation:
- JSP file
labenvironmentdatabasedisplay.jsp
inresources/reports/
updated:
a. FunctiongotoStep2()
updated to display day-time filter input fields and week day selection menu for weekly and overview display reports.
b. FunctiongoCreate()
updated to send input data for day-time and week day filters in Ajax request toLabEnvironmentDisplayServlet
.
c. HTML section updated with week day selection menu.
- Class/file
LabEnvironmentDisplayServlet.java
insrc/net/sf/basedb/labenv/servlet/
updated:
a. Protected methoddoGet(HttpServletRequest req, HttpServletResponse resp)
updated to apply optional day-time and week day filters for weekly and overview display reports.
b. Private methodJSONObject createJsonOverviewPlot(String chartVariant, List<LabEnvironmentData> lthdList, Date startDate, Date endDate, String viewType, String chartSite, String variableType, String weekdayFilter, String daytimeFilterFromTime, String daytimeFilterToTime)
updated for 31 - 366 days to show markers for Mondays.
comment:38 by , 10 years ago
Design update of alarm blocking:
An alarm can be reported either when a lab environment value (temperature or humidity) is out of range, or when contact is lost with a lab sensor (missing data). Currently, a reported alarm blocks further alarms for that alarm configuration, irrespective of what caused the alarm. However, if contact is re-established with a lab sensor after a missing data alarm, alarms for lab environment variables being out of range for that sensor should have higher priority and result in a reported alarm, even if the previous missing data alarm had not been re-set manually. This can be implemented as follows:
- Data access object
LabSensorAlarmConfig.java
insrc/net/sf/basedb/labenv/dao/
updated:
a. Three new public static final integer constantsALARM_BLOCK_TYPE_UNKNOWN
,ALARM_BLOCK_TYPE_MISSING_DATA
, andALARM_BLOCK_TYPE_LAB_ENVIRONMENT_DATA
are defined.
b. New private instance variableInteger alarmBlockType
with public accessor methods added. It is initialized tonull
. - Class/file
LabEnvironment.java
insrc/net/sf/basedb/labenv/
updated:
a. Public methodvoid checkAlarms(String labSensorUrl, Date measurementTime, Double temperature, Double humidity)
updated to report an alarm if alarm not blocked or if blocked alarm is of type missing data and current alarm is not. When an alarm is reported and the alarm block flag is set, the alarm type is set to that of the current alarm.
comment:39 by , 10 years ago
(In [2466]) Refs #592. Lab environment extension updated to report an alarm for lab environment variables being out of range even if a previous alarm had not been re-set, provided that the previous alarm was for missing data, i.e. that contact with the sensor had been lost:
- Data access object
LabSensorAlarmConfig.java
insrc/net/sf/basedb/labenv/dao/
updated:
a. Three new public static final integer constantsALARM_BLOCK_TYPE_UNKNOWN
,ALARM_BLOCK_TYPE_MISSING_DATA
, andALARM_BLOCK_TYPE_LAB_ENVIRONMENT_DATA
are defined.
b. New private instance variableInteger alarmBlockType
with public accessor methods added. It is initialized tonull
. - Class/file
LabEnvironment.java
insrc/net/sf/basedb/labenv/
updated:
a. Public methodvoid checkAlarms(String labSensorUrl, Date measurementTime, Double temperature, Double humidity)
updated to report an alarm if alarm not blocked or if blocked alarm is of type missing data and current alarm is not. When an alarm is reported and the alarm block flag is set, the alarm type is set to that of the current alarm.
comment:40 by , 10 years ago
(In [2467]) Refs #592. Lab environment extension updated for displaying lab environment data for a single lab sensor and date in a pop-up window, by displaying an optional page headline at the top of the report section, in addition to being displayed at the top of the web page. This allows the headline to be included, also when the page is printed using the print function link on the page:
- JSP file
labenvironmentdatabaseeventpopup.jsp
inresources/reports/
updated in functiononPlotGenerated(request)
to add a page headline at the top of the report section, if thepageTitle
string in the input "report
" JSONObject differs fromnull
and an empty string.
comment:41 by , 10 years ago
(In [2474]) Refs #592. Lab environment extension updated in XML file extensions.xml
in META-INF
:
- XML file
extensions.xml
inMETA-INF
updated by renaming "id
" tags, to make the name space more consistent with other BASE extensions. All extension "id
" tags are now children ofid-base
, which is set to "net.sf.basedb.labenv.
". The service extension has id suffix "service
", the menu has id suffix "menu
", and the menu items have id suffices "menu.*
", where the last part describes the menu item.
comment:42 by , 10 years ago
(In [2481]) Refs #592. Lab environment extension updated for displaying lab environment data for a single lab sensor and date in a pop-up window, by making the layout of the window more consistent with other pop-up windows in BASE:
- JSP file
labenvironmentdatabaseeventpopup.jsp
inresources/reports/
updated:
a. New service extension "id
" used, when obtaining home path for icons.
b. Form in HTML section updated by removing the outer frame.
c. The "base:buttongroup
" block in the HTML section updated by adding a print button to the left of the "Cancel" button at the bottom of the page. This replaces the link to the print function in the removed outer frame.
comment:43 by , 10 years ago
(In [2486]) Refs #592. Lab environment extension updated in JSP files by removing warning if no BASE project has been selected, since this is not necessary for the lab environment extension functionality:
- JSP files in
resources/reports/
updated in HTML section by removal of warning if no BASE project has been selected:
a.labenvironmentalarms.jsp
b.labenvironmentdatabasedisplay.jsp
c.labenvironmentdatabaseeventpopup.jsp
d.labenvironmentdatabaseexport.jsp
e.labenvironmentdatabasestatistics.jsp
f.labsensorinfo.jsp
comment:44 by , 10 years ago
(In [2489]) Refs #592. Lab environment extension updated in versions of external library files used for compilation, and contents of various "readme" files:
- Outermost
README
file updated:
a. Requirements: BASE version changed from 3.2 to 3.2.2, which the version referred to in other documentation.
b. Installation: Instruction have been made independent of the detailed versions of external files.
c. Compiling: Instruction have been made independent of the detailed versions of external files.
- Contents of directory
labenv/lib/compile/
updated:
a. Jar filejdom-1.1.2.jar
exchanged forjdom-1.1.3.jar
.
b. Jar filejson_simple-1.1.jar
exchanged forjson-simple-1.1.1.jar
.
c. Filereadme.txt
updated in file list by exchangingjdom-1.1.2.jar
forjdom-1.1.3.jar
andjson_simple-1.1.jar
forjson-simple-1.1.1.jar
.
comment:45 by , 10 years ago
comment:46 by , 10 years ago
comment:47 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Ticket closed as a the lab environment extension has been updated with the following improvements:
- Report routines added to display graphs of temperature and humidity data for one or more labs for a time interval spanning a day, a week, or an overview plot with min, mean, and max values for a chosen time interval. In the latter case, data for each day is averaged into a single data point.
- New filters, including a workday/non-workday filter for better synchronization with lab environment control systems.
- Alarms improved with an alarm overview page, blocking of new alarms for an alarm configuration after one is reported, possibility for alarm administrators to re-set the alarm blocks, possibility to get alarm notification via e-mail, and alarms when connection with a lab sensor is lost.
Ticket accepted.