XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Meridian-2018.1.0, 22.0.4
    • Component/s: None
    • Security Level: Default (Default Security Scheme)
    • Labels:
      None
    • Sprint:
      Horizon - June 27th 2018, Horizon - July 4th 2018, Horizon - July 11th 2018, Horizon - July 18th 2018, Horizon - July 25th 2018, Horizon - August 1st 2018, Horizon - August 8th 2018, Horizon - August 15th 2018

      Description

      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:

      1. add moment.js as a dependency
      2. 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)
      3. retrieve the dateformat and timezone from the rest endpoint, see https://issues.opennms.org/browse/NMS-10301
      4. 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?

        Attachments

          Activity

            People

            • Assignee:
              ranger Benjamin Reed
              Reporter:
              patrick.schweizer Patrick Schweizer
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: