From 6aa4b63ef1d512110d01eeb674ca8129ac4c8d37 Mon Sep 17 00:00:00 2001 From: Duologic Date: Tue, 24 Sep 2024 13:31:33 +0200 Subject: [PATCH] style: run make fmt and revert docs change --- custom/util/grid.libsonnet | 12 ++++++------ docs/examples/simple.md | 6 ++++-- gen/grafonnet-v11.1.0/custom/util/grid.libsonnet | 12 ++++++------ 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/custom/util/grid.libsonnet b/custom/util/grid.libsonnet index b4a41b35..8214cdd4 100644 --- a/custom/util/grid.libsonnet +++ b/custom/util/grid.libsonnet @@ -100,7 +100,7 @@ local panelUtil = import './panel.libsonnet'; // start new row as width exceeds gridWidth { panels+: [ - panel { + panel + { gridPos+: { x: 0, @@ -120,7 +120,7 @@ local panelUtil = import './panel.libsonnet'; // enough width, place panel on current row { panels+: [ - panel { + panel + { gridPos+: { x: acc.cursor.x, @@ -159,9 +159,9 @@ local panelUtil = import './panel.libsonnet'; }, }, ); - acc { + acc + { panels+: [ - panel { + panel + { //rows panels panels: rowPanels.panels, gridPos+: { @@ -175,9 +175,9 @@ local panelUtil = import './panel.libsonnet'; cursor:: rowPanels.cursor, } else - acc { + acc + { panels+: [ - panel { + panel + { panels: [], gridPos+: { diff --git a/docs/examples/simple.md b/docs/examples/simple.md index 1a2b7140..160cb182 100644 --- a/docs/examples/simple.md +++ b/docs/examples/simple.md @@ -12,8 +12,10 @@ g.dashboard.new('Faro dashboard') + g.dashboard.withPanels([ g.panel.timeSeries.new('Requests / sec') + g.panel.timeSeries.queryOptions.withTargets([ - g.query.testData.withQueryType('randomWalk') - + g.query.testData.withDatasource(), + g.query.prometheus.new( + 'mimir', + 'sum by (status_code) (rate(request_duration_seconds_count{job=~".*/faro-api"}[$__rate_interval]))', + ), ]) + g.panel.timeSeries.standardOptions.withUnit('reqps') + g.panel.timeSeries.gridPos.withW(24) diff --git a/gen/grafonnet-v11.1.0/custom/util/grid.libsonnet b/gen/grafonnet-v11.1.0/custom/util/grid.libsonnet index b4a41b35..8214cdd4 100644 --- a/gen/grafonnet-v11.1.0/custom/util/grid.libsonnet +++ b/gen/grafonnet-v11.1.0/custom/util/grid.libsonnet @@ -100,7 +100,7 @@ local panelUtil = import './panel.libsonnet'; // start new row as width exceeds gridWidth { panels+: [ - panel { + panel + { gridPos+: { x: 0, @@ -120,7 +120,7 @@ local panelUtil = import './panel.libsonnet'; // enough width, place panel on current row { panels+: [ - panel { + panel + { gridPos+: { x: acc.cursor.x, @@ -159,9 +159,9 @@ local panelUtil = import './panel.libsonnet'; }, }, ); - acc { + acc + { panels+: [ - panel { + panel + { //rows panels panels: rowPanels.panels, gridPos+: { @@ -175,9 +175,9 @@ local panelUtil = import './panel.libsonnet'; cursor:: rowPanels.cursor, } else - acc { + acc + { panels+: [ - panel { + panel + { panels: [], gridPos+: {