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

DCB UI Changes based on latest Rest API



    • Story
    • Status: Resolved (View Workflow)
    • Medium
    • Resolution: Fixed
    • None
    • 30.0.0
    • None
    • Security Level: Default (Default Security Scheme)


      Device Config Backup UI changes based on latest DCB API.

      See https://ju8jz8.axshare.com/#id=4t4wpq&p=device_configuration_backups&g=1v5.b for latest prototype

      • DeviceConfigBackup 'createdTime' has been renamed to 'lastBackupDate'
      • Don't display download icon in DCBTable if there's no valid 'lastBackupDate'
      • "Backup Status" column: color isn't working for "Failure", CSS class needs to be "Failed" not "Failure", or else we need to change API to return 'failed' instead of 'failure'. Update: API fix needed to return 'success', 'failed' or 'no backup'.
      • "Backup Status" needs a "No Backup" status as well, if 'lastBackupDate' is null. Also note, this field name has changed from 'createdTime'. Update: may be fixed in API instead.
      • View History and View Content modals, need "Device Name: " + device name text; header should be gray shaded
      • View History doesn't make an API call. For now, call 'device-config?ipInterfaceId= {value}'. Then, filter on items that have a 'lastBackupDate' and use this as the date to display, sort by date descending. This may get changed to a separate 'device-config/history/{ipInterfaceId}' endpoint that will do correct sorting/filtering/deduping.
      • For View History modal tabs, for now key off of 'configType' returned by View History API call
      • If all items have 'configType' of 'default', don't display any tabs
      • Otherwise display 2 tabs, as already done in some cases. If 'configType' for a record is 'default', display the config contents when first tab ("Startup Configuration") is selected; if 'configType' is anything else, display config only when 2nd tab ("Running Configuration") is selected
      • We will deal with additional config types at a future time
      • "Backup Now" API needs slight modification. The 'serviceName' needs to be "DeviceConfig-{configType}" 

      As a note, backup is done using a script file now, so calling in dev environment will probably fail with a 500 error, something like: "java.io.FileNotFoundException: Couldn't find file alpine.dcb in etc/device-config folder", however this does mean UI and API have been called correctly

      • 'scheduledInterval' is now a map of string -> string, e.g. "DeviceConfig-default" -> "At 10:00 am". For now, UI can just use the first entry's value. This may be modified in the future to return a simple string
      • "Devices:" display should update, "Content-Range" header in 'device-config' API response will have this:

      Content-Range: items 0-7/8


      • 0 is 0-based offset of first item returned
      • 7 is 0-based offset of last item returned
      • 8 is total items = total devices that would be selected by this sort/filter = value to display in "Device Name:" in DCBTable.vue




            Mike Mike
            stheleman Scott Theleman
            0 Vote for this issue
            1 Start watching this issue