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

MomentJS warning after running sample code

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Fixed
    • 20.1.0
    • 20.1.0, Meridian-2017.1.0
    • None
    • Security Level: Default (Default Security Scheme)
    • None
    • Horizon - September 13th

    Description

      If I setup a basic nodeJS app in order to execute the sample code from the HOWTO against Meridian 2017 (to be more precise: ), it works, but I get a warning related with date manipulation and MomentJS:

      Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
      Arguments:
      [0] _isAMomentObject: true, _isUTC: false, _useUTC: false, _l: undefined, _i: 9/1/17 4:48 PM, _f: undefined, _strict: undefined, _locale: [object Object]
      Error
          at Function.createFromInputFallback (/Users/agalue/Development/nodejs/opennms/node_modules/opennms/dist/opennms.node.js:396:97)
          at configFromString (/Users/agalue/Development/nodejs/opennms/node_modules/opennms/dist/opennms.node.js:2229:15)
          at configFromInput (/Users/agalue/Development/nodejs/opennms/node_modules/opennms/dist/opennms.node.js:2587:13)
          at prepareConfig (/Users/agalue/Development/nodejs/opennms/node_modules/opennms/dist/opennms.node.js:2570:13)
          at createFromConfig (/Users/agalue/Development/nodejs/opennms/node_modules/opennms/dist/opennms.node.js:2537:44)
          at createLocalOrUTC (/Users/agalue/Development/nodejs/opennms/node_modules/opennms/dist/opennms.node.js:2623:16)
          at createLocal (/Users/agalue/Development/nodejs/opennms/node_modules/opennms/dist/opennms.node.js:2627:16)
          at hooks (/Users/agalue/Development/nodejs/opennms/node_modules/opennms/dist/opennms.node.js:106:29)
          at AlarmDAO.toDate (/Users/agalue/Development/nodejs/opennms/node_modules/opennms/dist/opennms.node.js:9531:20)
          at AlarmDAO.fromData (/Users/agalue/Development/nodejs/opennms/node_modules/opennms/dist/opennms.node.js:11005:38)
      got 10 alarms.
      node 16 (Barquisimeto) has 1 IP interfaces
      node 13 (Maracaibo) has 3 IP interfaces
      node 12 (Valencia) has 2 IP interfaces

      Attachments

        Activity

          People

            ranger Benjamin Reed
            agalue Alejandro Galue
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.