diff --git a/custom/dashboard.libsonnet b/custom/dashboard.libsonnet index 1478f3d3..ea8cb554 100644 --- a/custom/dashboard.libsonnet +++ b/custom/dashboard.libsonnet @@ -13,6 +13,11 @@ local d = import 'github.com/jsonnet-libs/docsonnet/doc-util/main.libsonnet'; + self.time.withFrom('now-6h') + self.time.withTo('now'), + '#withSchemaVersion': { 'function'+: { args: [d.arg('value', d.T.integer, default=39)] } }, + withSchemaVersion(value=39): { + schemaVersion: value, + }, + '#withPanels':: d.func.new( '`withPanels` sets the panels on a dashboard authoratively. It automatically adds IDs to the panels, this can be disabled with `setPanelIDs=false`.', args=[ diff --git a/docs/API/dashboard/index.md b/docs/API/dashboard/index.md index 7cbee639..ec78d461 100644 --- a/docs/API/dashboard/index.md +++ b/docs/API/dashboard/index.md @@ -22,7 +22,7 @@ grafonnet.dashboard * [`fn withPanels(panels, setPanelIDs=true)`](#fn-withpanels) * [`fn withPanelsMixin(panels, setPanelIDs=true)`](#fn-withpanelsmixin) * [`fn withRefresh(value)`](#fn-withrefresh) -* [`fn withSchemaVersion(value=36)`](#fn-withschemaversion) +* [`fn withSchemaVersion(value=39)`](#fn-withschemaversion) * [`fn withTags(value)`](#fn-withtags) * [`fn withTagsMixin(value)`](#fn-withtagsmixin) * [`fn withTemplating(value)`](#fn-withtemplating) @@ -233,16 +233,15 @@ Refresh rate of dashboard. Represented via interval string, e.g. "5s", "1m", "1h ### fn withSchemaVersion ```jsonnet -withSchemaVersion(value=36) +withSchemaVersion(value=39) ``` PARAMETERS: -* **value** (`integer`) - - default value: `36` +* **value** (`number`) + - default value: `39` + -Version of the JSON schema, incremented each time a Grafana update brings -changes to said schema. ### fn withTags ```jsonnet diff --git a/gen/grafonnet-v11.0.0/custom/dashboard.libsonnet b/gen/grafonnet-v11.0.0/custom/dashboard.libsonnet index 1478f3d3..ea8cb554 100644 --- a/gen/grafonnet-v11.0.0/custom/dashboard.libsonnet +++ b/gen/grafonnet-v11.0.0/custom/dashboard.libsonnet @@ -13,6 +13,11 @@ local d = import 'github.com/jsonnet-libs/docsonnet/doc-util/main.libsonnet'; + self.time.withFrom('now-6h') + self.time.withTo('now'), + '#withSchemaVersion': { 'function'+: { args: [d.arg('value', d.T.integer, default=39)] } }, + withSchemaVersion(value=39): { + schemaVersion: value, + }, + '#withPanels':: d.func.new( '`withPanels` sets the panels on a dashboard authoratively. It automatically adds IDs to the panels, this can be disabled with `setPanelIDs=false`.', args=[ diff --git a/gen/grafonnet-v11.0.0/docs/dashboard/index.md b/gen/grafonnet-v11.0.0/docs/dashboard/index.md index 7cbee639..ec78d461 100644 --- a/gen/grafonnet-v11.0.0/docs/dashboard/index.md +++ b/gen/grafonnet-v11.0.0/docs/dashboard/index.md @@ -22,7 +22,7 @@ grafonnet.dashboard * [`fn withPanels(panels, setPanelIDs=true)`](#fn-withpanels) * [`fn withPanelsMixin(panels, setPanelIDs=true)`](#fn-withpanelsmixin) * [`fn withRefresh(value)`](#fn-withrefresh) -* [`fn withSchemaVersion(value=36)`](#fn-withschemaversion) +* [`fn withSchemaVersion(value=39)`](#fn-withschemaversion) * [`fn withTags(value)`](#fn-withtags) * [`fn withTagsMixin(value)`](#fn-withtagsmixin) * [`fn withTemplating(value)`](#fn-withtemplating) @@ -233,16 +233,15 @@ Refresh rate of dashboard. Represented via interval string, e.g. "5s", "1m", "1h ### fn withSchemaVersion ```jsonnet -withSchemaVersion(value=36) +withSchemaVersion(value=39) ``` PARAMETERS: -* **value** (`integer`) - - default value: `36` +* **value** (`number`) + - default value: `39` + -Version of the JSON schema, incremented each time a Grafana update brings -changes to said schema. ### fn withTags ```jsonnet