Declarative dashboard widgets in OMV6

In OMV6 dashboard widgets are implemented in a declarative style. Drop a YAML file into a special folder, create a new RPC endpoint or use an existing one, run the omv-mkworkbench CLI command to generate the Workbench UI configuration and you’re done.

The code for the Memory and CPU Usage widget looks like:

version: "1.0"
type: dashboard-widget
data:
  id: 20ac67db-b6b5-429c-a304-9a1a4fbb9ea9
  title: Memory
  type: chart
  permissions:
    role:
    - admin
  chart:
    type: advanced-doughnut
    request:
      service: System
      method: getInformation
    label:
      display: true
      formatter: template
      formatterConfig: "{{ value | binaryunit }}"
    dataConfig:
    - label: Free
      prop: memFree
      backgroundColor: "#4cd964"
    - label: Used
      prop: memUsed
      backgroundColor: "#ff3b30"
version: "1.0"
type: dashboard-widget
data:
  id: 9984d6cc-741b-4fda-85bf-fc6471a61e97
  permissions:
    role:
      - admin
  title: _("CPU")
  type: chart
  chart:
    type: gauge
    request:
      service: System
      method: getInformation
      transform:
        cpuDiff: "{{ 100.0 - cpuUsage }}"
    label:
      display: true
      formatter: template
      formatterConfig: "{{ value }}%"
    dataConfig:
      - label: Usage
        prop: cpuUsage
        backgroundColor: "#5dacdf"
      - label: ""
        prop: cpuDiff
        backgroundColor: whitesmoke

A datatable widget will look like:

version: "1.0"
type: dashboard-widget
data:
  id: 1dc0ac9a-df14-11ea-8342-6fcac5f2e571
  title: _("File Systems")
  type: datatable
  permissions:
    role:
    - admin
  datatable:
    columns:
    - name: _("Device")
      prop: canonicaldevicefile
      flexGrow: 1
      sortable: true
    - name: _("Label")
      prop: label
      flexGrow: 1
      sortable: true
      hidden: true
    - name: _("Total")
      prop: size
      flexGrow: 1
      sortable: true
      cellTemplateName: template
      cellTemplateConfig: '{{ size | tobytes | binaryunit | notavailable("-") }}'
    - name: _("Available")
      prop: available
      flexGrow: 1
      sortable: true
      cellTemplateName: template
      cellTemplateConfig: '{{ available | tobytes | binaryunit | notavailable("-") }}'
    - name: _("Used")
      prop: used
      flexGrow: 1
      sortable: true
      cellTemplateName: template
      cellTemplateConfig: '{{ used | tobytes | binaryunit | notavailable("-") }}'
    store:
      proxy:
        service: FileSystemMgmt
        get:
          method: enumerateFilesystems
    sorters:
    - dir: asc
      prop: devicefile

New update available

openmediavault 5.6.2

  • Fix bug in GID processing at the user import dialog.
  • Issue #972: UI crashes when backend sends too much data in the ‘Execute’ dialog.
  • Issue #975: Improve handling of blanks in user/group names in the ACL dialog.

New update available

openmediavault 5.6.1

  • Update locales.
  • Issue #970: HPSA HBA improvements causing a regression when controller is in RAID mode.
  • Issue #972: Improve Exec::getOutput RPC to prevent running into memory/resource limits by reading only a given number of bytes from the command output.