Skip to content
This repository was archived by the owner on Jun 26, 2023. It is now read-only.

stat panel & cloudwatch updates to match other panels #351

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 3 additions & 0 deletions grafonnet/cloudwatch.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* @param period (default: `'auto'`)
* @param dimensions (optional)
* @param id (optional)
* @param matchExact (default: `false`) (optional)
* @param expression (optional)
* @param hide (optional)

Expand All @@ -31,6 +32,7 @@
period='auto',
dimensions={},
id=null,
matchExact=false,
expression=null,
hide=null
):: {
Expand All @@ -44,6 +46,7 @@
period: period,
dimensions: dimensions,
[if id != null then 'id']: id,
matchExact: matchExact,
[if expression != null then 'expression']: expression,
[if hide != null then 'hide']: hide,

Expand Down
6 changes: 6 additions & 0 deletions grafonnet/stat_panel.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
*
* @param title Panel title.
* @param description (optional) Panel description.
* @param span (optional) Width of the panel
* @param transparent (default `false`) Whether to display the panel without a background.
* @param datasource (optional) Panel datasource.
* @param allValues (default `false`) Show all values instead of reducing to one.
* @param valueLimit (optional) Limit of values in all values mode.
* @param reducerFunction (default `'mean'`) Function to use to reduce values to when using single value.
* @param fields (default `''`) Fields that should be included in the panel.
* @param height (default `''`) Defines height of the panel.
* @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.
Expand Down Expand Up @@ -43,13 +45,15 @@
*/
new(
title,
span=null,
description=null,
transparent=false,
datasource=null,
allValues=false,
valueLimit=null,
reducerFunction='mean',
fields='',
height=null,
orientation='auto',
colorMode='value',
graphMode='area',
Expand All @@ -71,6 +75,8 @@

type: 'stat',
title: title,
[if span != null then 'span']: span,
[if height != null then 'height']: height,
[if description != null then 'description']: description,
transparent: transparent,
datasource: datasource,
Expand Down