Skip to content
This repository was archived by the owner on Jun 26, 2023. It is now read-only.
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add timeFrom to table panel + add displayMode to fieldConfig
  • Loading branch information
Bastien Fiorentino committed Mar 9, 2021
commit 1ea02fe9a413d4485375e895ac4f1871bf5db6d2
4 changes: 4 additions & 0 deletions grafonnet/table_panel_grafana7.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
repeatDirection=null,
title=null,
transparent=false,
timeFrom=null,
):: {
[if datasource != null then 'datasource']: datasource,
[if description != null then 'description']: description,
[if repeat != null then 'repeat']: repeat,
[if repeatDirection != null then 'repeatDirection']: repeatDirection,
[if title != null then 'title']: title,
[if transparent != null then 'transparent']: transparent,
[if timeFrom != null then 'timeFrom']: timeFrom,
type: 'table',

setFieldConfig(
Expand All @@ -25,6 +27,7 @@
noValue=null,
unit='short',
width=null,
displayMode=null,
):: self {}
+ { fieldConfig+: { defaults+: { [if displayName != null then 'displayName']: displayName } } }
+ { fieldConfig+: { defaults+: { [if max != null then 'max']: max } } }
Expand All @@ -33,6 +36,7 @@
+ { fieldConfig+: { defaults+: { [if noValue != null then 'noValue']: noValue } } }
+ { fieldConfig+: { defaults+: { [if unit != null then 'unit']: unit } } }
+ { fieldConfig+: { defaults+: { custom+: { [if width != null then 'width']: width } } } }
+ { fieldConfig+: { defaults+: { custom+: { [if displayMode != null then 'displayMode']: displayMode } } } }
,

setGridPos(
Expand Down