render dateformat for AngularJS

Description

Same issue as https://issues.opennms.org/browse/NMS-10233 but for AngularJS

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Benjamin Reed August 20, 2018 at 9:30 PM

PR for foundation-2018: https://github.com/OpenNMS/opennms/pull/2123

PR for release-22.0.4 (and up): https://github.com/OpenNMS/opennms/pull/2124

 

The foundation-2018 version is all hand-includes in the relevant JSP pages.  The other one does proper webpack require and such.

 

I've implemented a basic class – OnmsDateFormatter – as well as an AngularJS filter (onmsDate) and a directive (that I never actually ended up having to use anywhere).  The directive just literally wraps around the date you want to format, like so: <onms-date>2018-04-15 05:29</onms-date> and it should do the right thing as long as moment.js can parse it.  The filter works similarly but is used in an AngularJS filter line... {{::item.pageTime | onmsDate.}}

Patrick Schweizer July 30, 2018 at 12:04 AM
Edited

PR: https://github.com/OpenNMS/opennms/pull/2083
=> closing PR since we will expose dateformat via REST endpoint, see https://issues.opennms.org/browse/NMS-10301

Patrick Schweizer July 27, 2018 at 10:58 PM

Fixed

Details

Assignee

Reporter

Sprint

Fix versions

Priority

PagerDuty

Created June 28, 2018 at 1:34 AM
Updated August 21, 2018 at 6:24 PM
Resolved August 21, 2018 at 6:24 PM