Fixed
Details
Assignee
Benjamin ReedBenjamin ReedReporter
Patrick SchweizerPatrick SchweizerSprint
NoneFix versions
Priority
Major
Details
Details
Assignee
Benjamin Reed
Benjamin ReedReporter
Patrick Schweizer
Patrick SchweizerSprint
None
Fix versions
Priority
PagerDuty
PagerDuty
PagerDuty
Created June 28, 2018 at 1:35 AM
Updated August 22, 2018 at 2:05 PM
Resolved August 22, 2018 at 2:05 PM
We want to display datetime in a consistent way across OpenNMS ( NMS-10072 ).
On the client side we decided to use moment.js ( https://momentjs.com/docs/#/displaying/ )
Therefore we need to do the following:
add moment.js as a dependency
add a mapping between the java.time.format.DateTimeFormatter format and moment.js format, e.g. similar to: https://github.com/MadMG/moment-jdateformatparser/blob/master/moment-jdateformatparser.js#L50 (we can't use this plugin since it translates java.util.SimpledateFormat instead of java.time.format.DateTimeFormatter which has a slightly different Syntax)
retrieve the dateformat and timezone from the rest endpoint, see https://issues.opennms.org/browse/NMS-10301
apply the format to places where plain (not Angular and not Vaadin) Javascript renders dates
An alternative to 4. could be to replace the plain Javascript with a mini Angular application since we want to move all Javascript to Angular anyway?