Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-8823

Outage ReST service forNode use case calculates dates incorrectly

    Details

    • Sprint:
      Horizon - Nov 2nd

      Description

      The /rest/outages/forNode/[nodeId] endpoint incorrectly calculates the range of dates that it returns. It appears the author meant to return only the outages from the current week, but a coding error leads to it including only 1/1000 of one week:

      https://github.com/OpenNMS/opennms/blob/foundation-2016/opennms-webapp-rest/src/main/java/org/opennms/web/rest/v1/OutageRestService.java#L160

      (Constructing a java.util.Date based on subtracting a value from System.getCurrentTimeMillis() but not multiplying the subtracted value by 1000)

      Also: this date range should be configurable. Defaulting to one week is fine, but the user should be able to override it.

        Attachments

          Activity

            People

            • Assignee:
              agalue Alejandro Galue
              Reporter:
              jeffg Jeff Gehlbach
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: