Generic Table

The generic table setting are inherited by table, property, and console widgets.

[widget] Settings

NameExampleDescriptionChart Lab
responsiveresponsive = trueAdjust font size based on widget dimensions. Font size is reduced when the widget size is smaller. Default: false.View
replace-underscorereplace-underscore = trueReplace underscores with spaces in column names. Default: false.View
capitalizecapitalize = falseCapitalize column names. Default: true.View
display-tagsdisplay-tags = mount_point
display-tags = file_system
display-tags = app
display-tags = alias
Display a separate column for each tag in the underlying series. Default: false.View
View
show-tag-namesshow-tag-names = trueDisplay all tags for the entity.
Only works if the table contains the tag column. Default: false.
View
sortsort = cpu_busy desc
sort = memfree asc
Sorting the table by columns or properties.
It is necessary to set in sequence the keys of the columns or names of the properties.
Specify desc after the key or property name if you want to sort in reverse order
(asc is used by default).

i.e. sort = metric, value desc
First column will be sorted in alphabetical order,
then a string with the same name of the metric
will be sorted according to value in descending order.

View
column-{key}column-entity = Entity
column-time = Timestamp
column-entity = null
column-time = null
column-metric = null
column-value = null
Shortcut to change column name (column-{key}=new-name) or hide it (column-{key}=null).View
columnscolumns = commandColumn keys; used to add new or rename existing columns.View
classclass = terminalChanges the widget to UNIX console style with the background set to black. Possible settings: terminal. View
transposetranspose = trueTranspose rows and columns for a layout optimized for columnar presentation.
Possible values: true, false. Default: false.
View
formatformat = %H:%M:%S
format = %d/%m %H:%M:%S
Format time values.
For example when using the min_time_value or max_time_value aggregators.
Learn more about format settings.
View
merge-columnsmerge-columns = entity
merge-columns = entity, tags
Column key by which columns are grouped into rows.View

View

auto-heightauto-height = trueCalculate row height automatically based on amount of vertical space allocated to the widget and the number of rows.
Default: false
View
font-scalefont-scale = 0.7Ratio of font height to row height when auto-height is enabled. Minimum row height is 10px, maximum row height is 64px.
Default: 0.5
View
table-header-styletable-header-style = display: noneCustom CSS style applied to table header, including a style to hide the header altogether.View
header-styleheader-style = display: noneCustom CSS style applied to widget header, including a style to hide the widget header altogether.View

[column] Settings

NameExampleDescriptionChart Lab
keykey = pid
key = %cpu
key = size
Name of the key.
Optional setting, but if set, then in the configuration of this column you can set sorting.
If you indicate the name of the key as the property received from the server object, then the value of the cell by default will be the value of this property.
View
tagtag = file_system
tag = mount_point
Name of tag, which needs to be displayed in a separate column. Optional settings. Only has purpose if the object received from the server contains the property tags. Value of the cell by default will be equal to the value of this tag.View
valuevalue = row.openTimeJavaScript code to determine the value of the cell (by default the value of the key or tag is used).View
formatformat = kilobytes
format = ####
Format of the cell’s value.View
labellabel = Virtual
label = Resident
label = PID
Name of column displayed in the column titles.
Can be specified as JavaScript code.
View
tooltiptooltip = Process CPU Usage
tooltip = Process ID
Description of the column, displayed during mouseover on the title.View
stylestyle = text-align: left
style = text-align: center
style = background: orange
Style assigned to the column.
Can be specified as JavaScript code.
View
row-stylerow-style = value > 1 ? 'background: orange' : nullStyle assigned to the entire row.
Can be specified as JavaScript code.
View
style = max-width:style = max-width: 50%
style = max-width: 400px
Prevent scrolling in columns containing long text strings.
Scroll bar will only appear when the column shrinks below the specified width.
Can be set in percent or in pixels.
If transpose = true, then set style = max-width: in pixels.
View
alert-expressionalert-expression = value > 5
alert-expression = value < 200000
JavaScript code.
The returned value of the evaluation can be used for sorting, if for the column a key is specified (in sort alert-{key} is placed in this case).
View
alert-stylealert-style = background-color: yellow
alert-style = background-color: orange
Styles assigned to the cell. If the result of evaluation alert-expression is greater than or less than 0.
Can be specified as JavaScript code.
View
row-alert-stylerow-alert-style = background-color: orangeStyles assigned to the whole row. If the result of the evaluation alert-expression is greater than or less than 0. Can be specified as JavaScript code.View
displaydisplay = falseHide a column. Default value is 'true' (show column).View
on-clickonclick = var s = series({ metric: 'nmon.process.%cpu', disconnectInterval: '90 second' })

onclick = dialog({ series: [s], disconnectValue: 0 })

onclick = filter()

JavaScript code, click event handler of the cell.
Supports the method filter, which allows you to filter the rows in the table to the value of this cell.
View
iconicon = value > 1 ? 'exclamation-sign' : 'ok'Name of the icon displayed in the cell. Can be specified as JavaScript code.View
positionposition = firstPosition of the column relative to other columns in the table.View

Column Order

Column order is determined by the order of [column] sections in the widget configuration.

Default widget columns have a pre-defined position, for example the Severity column in Console widget is positioned first by default.

To change the position of the default column, specify it explicitly in the widget configuration.

View example in Chartlab.

The [column] section support the position setting to control the placement of the column regardless of the order in which [column] section is specified in the widget. The possible values are firstmiddle and last.

Columns are positioned with the following order:

| first | [column] | column-{key}={label} | predefined widget columns | middle | expand-tags columns | last |

View example in Chartlab.

Table Example:
[widget]
type = table
capitalize = false
replace-underscore = true
column-entity = Host
column-tags = null
 
[column]
tag = file_system
 
[column]
key = time
format = %d/%m %H:%M
 
[column]
key = value
value = Math.round(value * 100) / 100
format = value + '%'
style = value < 10 ? 'opacity: .5' : '' alert-expression = value > 99 ? 2 : value > 90 ? 1 : 0
alert-style = if (alert == 2) return 'background: red'
alert-style = return 'background: black; color: white'
alert-row-style = background: orange
onclick = filter()
 
columns = metric
columns = entity
sort = alert-value desc, entity, metric

In this example, the table columns will be located in the following order: File System, Time, Value, Metric, Host.