Skip to content

Commit

Permalink
Add text mode to stat panel (grafana#310)
Browse files Browse the repository at this point in the history
Add missing colon

Update tests
  • Loading branch information
adinhodovic authored Sep 23, 2021
1 parent 05fb200 commit 0c49b36
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
3 changes: 3 additions & 0 deletions grafonnet/stat_panel.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* @param orientation (default `'auto'`) Stacking direction in case of multiple series or fields.
* @param colorMode (default `'value'`) 'value' or 'background'.
* @param graphMode (default `'area'`) 'none' or 'area' to enable sparkline mode.
* @param textMode (default `'auto'`) Control if name and value is displayed or just name.
* @param justifyMode (default `'auto'`) 'auto' or 'center'.
* @param unit (default `'none'`) Panel unit field option.
* @param min (optional) Leave empty to calculate based on all values.
Expand Down Expand Up @@ -52,6 +53,7 @@
orientation='auto',
colorMode='value',
graphMode='area',
textMode='auto',
justifyMode='auto',
unit='none',
min=null,
Expand Down Expand Up @@ -111,6 +113,7 @@
colorMode: colorMode,
graphMode: graphMode,
justifyMode: justifyMode,
textMode: textMode,
},
fieldConfig: {
defaults: {
Expand Down
15 changes: 10 additions & 5 deletions tests/stat_panel/test_compiled.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
],
"fields": "",
"values": true
}
},
"textMode": "auto"
},
"pluginVersion": "7",
"targets": [ ],
Expand Down Expand Up @@ -91,7 +92,8 @@
],
"fields": "",
"values": false
}
},
"textMode": "auto"
},
"pluginVersion": "7",
"targets": [ ],
Expand Down Expand Up @@ -165,7 +167,8 @@
],
"fields": "",
"values": false
}
},
"textMode": "auto"
},
"pluginVersion": "7",
"targets": [ ],
Expand Down Expand Up @@ -212,7 +215,8 @@
],
"fields": "",
"values": false
}
},
"textMode": "auto"
},
"pluginVersion": "7",
"targets": [ ],
Expand Down Expand Up @@ -258,7 +262,8 @@
],
"fields": "",
"values": false
}
},
"textMode": "auto"
},
"pluginVersion": "7",
"targets": [ ],
Expand Down

0 comments on commit 0c49b36

Please sign in to comment.