Table Schema Cell Types and Formatters
Introduction
When you customise a table (see Customising Table Columns), each column object has a cell attribute that controls how the value is rendered, and an optional formatter attribute that controls how the raw value is transformed before display.
The cell and formatter values are names that are resolved to rendering classes at load time. The name is the class name without the trailing Cell or Formatter - for example the cell type LookupUrl maps to the LookupUrlCell renderer, and the formatter UnixTime maps to the UnixTimeFormatter. The tables below list the common, supported values. Names are not case sensitive on the first letter, so string and String are equivalent.
Column Attributes
Attribute | Values | Description |
|---|---|---|
| event property name | The property to display (opEvents Normalised Event Properties). Nested values use dotted path, e.g. |
| text | The column heading shown in the web page. |
| a cell type (see below) | How the value is rendered. Defaults to plain text ( |
| a formatter (see below) | Optional. Transforms the raw value before it is rendered. |
|
|
|
|
| Whether the value can be edited inline. Most columns are |
|
| Optional default sort direction for the column. |
| a property name | Used by link cells: the field whose value is substituted into the URL. |
| a stash key | Used by link cells: the base URL the link is built from. |
Cell Types
| Renders as |
|---|---|
| Plain text. The default. |
| A whole number. |
| A decimal number. |
| A checkbox reflecting a true/false value. |
| A clickable link from a URL value. |
| The value rendered as a hyperlink built from |
| A clickable icon, shown only when the field contains data. |
| An inline-editable field (requires |
| Text coloured by NMIS severity thresholds (supply a |
| A true/false value shown as text. |
| An array value rendered as a list. |
| A unix epoch timestamp shown as a date/time. |
| A row of link buttons (supply a |
Formatters
Set with the formatter attribute alongside a cell.
| Effect |
|---|---|
| Unix time (seconds) shown as a human date/time. |
| A time shown relative to now (e.g. "5 minutes ago"). |
| A number of seconds shown as an uptime. |
| Normalises MAC address formatting. |
| A byte value shown in megabytes. |
| A bit value shown in megabits. |
| An interface speed value shown in readable units. |
ShortenedString | Truncates long strings (supply |
Example
A searchable plain-text column:
{
"name": "nodeinfo.configuration_location",
"label": "Location",
"cell": "string",
"search": "iregex",
"editable": false
}A column whose unix-time value is shown as a readable date:
{
"name": "time",
"label": "Time",
"cell": "string",
"formatter": "UnixTime",
"editable": false
}For cell types or formatters not listed here, contact Firstwave Support at support.nmis@firstwave.com.