Changes between Initial Version and Version 1 of Ticket #592, comment 14


Ignore:
Timestamp:
May 9, 2014, 2:14:28 PM (10 years ago)
Author:
olle

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #592, comment 14

    initial v1  
    44 2. New JSP file `labenvironmentalarms.jsp` in `resources/reports/` added. At loading, function `createLabEnvAlarmWebPage()` is called to create the page after calling functions `getLabSensorConfigList()` and `getLabSensorConfigList()` to obtain information on alarm configuration and logged-in user. The latter functions obtain the information by making Ajax calls to java servlet `LabEnvironmentServlet.java` in `src/net/sf/basedb/labenv/servlet/`. Button "Set alarm blocker" is coupled to function `goSetAlarmBlocker()`, which will make an Ajax call to servlet `LabEnvironmentServlet` to set the alarm blocker status.
    55 3. Java servlet class/file `LabEnvironmentServlet.java` in `src/net/sf/basedb/labenv/servlet/` updated:[[BR]]a. Protected method `void doGet(HttpServletRequest req, HttpServletResponse resp)` updated to accept Ajax calls for commands "`SetLabEnvAlarmconfig`" and "`GetLoggedInUserLogInId`".[[BR]]b. Private method `JSONObject createLabSensorConfigList(JSONObject json)` updated to include alarm list information as a JSONArray.[[BR]]c. New private method `String fetchLoggedInUserLogInId(SessionControl sc)` added. It returns the log-in id for the logged-in user, or `null` if the id could not be obtained.[[BR]]d. New private method `void setLabEnvAlarmConfig(HttpServletRequest req, SessionControl sc)` added. It updates lab environment alarm configuration regarding alarm blocked flags, based on input from an Ajax request.[[BR]]
    6  4. Java servlet class/file `LabEnvironmentStatisticsServlet.java` in `src/net/sf/basedb/labenv/servlet/` updated be adding new public method `boolean includeWeekday(Date date, String weekdayFilter)`. It checks if an input date passes an optional weekday filter. Returns `false` if date is `null`.
    7  5. Java data access object class/file `LabSensorAlarmConfig.java` in `src/net/sf/basedb/labenv/dao/` updated with instance variables for `String weekdayFilter`, `Boolean alarmBlocked`, and  `String alarmText`, with corresponding public accessor methods.
    8  6. Java class/file `LabEnvironmentConfigation.java` in `src/net/sf/basedb/labenv/` updated with support for weekday filter.
    9  7. Java class/file `LabEnvironment.java` in `src/net/sf/basedb/labenv/` updated with support for weekday filter.
     6 4. Configuration file `labenv-config.xml` updated with "`weekdayfilter`" tags for alarms.
     7 5. Java servlet class/file `LabEnvironmentStatisticsServlet.java` in `src/net/sf/basedb/labenv/servlet/` updated be adding new public method `boolean includeWeekday(Date date, String weekdayFilter)`. It checks if an input date passes an optional weekday filter. Returns `false` if date is `null`.
     8 6. Java data access object class/file `LabSensorAlarmConfig.java` in `src/net/sf/basedb/labenv/dao/` updated with instance variables for `String weekdayFilter`, `Boolean alarmBlocked`, and  `String alarmText`, with corresponding public accessor methods.
     9 7. Java class/file `LabEnvironmentConfigation.java` in `src/net/sf/basedb/labenv/` updated with support for weekday filter.
     10 8. Java class/file `LabEnvironment.java` in `src/net/sf/basedb/labenv/` updated with support for weekday filter.