From 36c07522cfae8692f1c91da52c7c14a9860c1410 Mon Sep 17 00:00:00 2001 From: "grafana-delivery-bot[bot]" <132647405+grafana-delivery-bot[bot]@users.noreply.github.com> Date: Wed, 3 Jan 2024 01:40:39 +0200 Subject: [PATCH] [v10.2.x] Gauges: Fixing broken auto sizing (#79940) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Gauges: Fixing broken auto sizing (#79926) (cherry picked from commit 9126dbceaf36cf97f58c2d975c1052cc6b6d1b23) Co-authored-by: Torkel Ödegaard --- .../kinds/composable/bargauge/panelcfg/schema-reference.md | 4 ++-- .../kinds/composable/gauge/panelcfg/schema-reference.md | 4 ++-- .../bargauge/panelcfg/x/BarGaugePanelCfg_types.gen.ts | 4 ++-- .../composable/gauge/panelcfg/x/GaugePanelCfg_types.gen.ts | 4 ++-- public/app/plugins/panel/bargauge/panelcfg.cue | 4 ++-- public/app/plugins/panel/bargauge/panelcfg.gen.ts | 4 ++-- public/app/plugins/panel/gauge/panelcfg.cue | 4 ++-- public/app/plugins/panel/gauge/panelcfg.gen.ts | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/docs/sources/developers/kinds/composable/bargauge/panelcfg/schema-reference.md b/docs/sources/developers/kinds/composable/bargauge/panelcfg/schema-reference.md index b14e5954f99..db7bc0e5c09 100644 --- a/docs/sources/developers/kinds/composable/bargauge/panelcfg/schema-reference.md +++ b/docs/sources/developers/kinds/composable/bargauge/panelcfg/schema-reference.md @@ -30,8 +30,8 @@ It extends [SingleStatBaseOptions](#singlestatbaseoptions). |-----------------|-------------------------------------------------|----------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------| | `displayMode` | string | **Yes** | | Enum expressing the possible display modes
for the bar gauge component of Grafana UI
Possible values are: `basic`, `lcd`, `gradient`. | | `maxVizHeight` | uint32 | **Yes** | `300` | | -| `minVizHeight` | uint32 | **Yes** | `75` | | -| `minVizWidth` | uint32 | **Yes** | `75` | | +| `minVizHeight` | uint32 | **Yes** | `16` | | +| `minVizWidth` | uint32 | **Yes** | `8` | | | `namePlacement` | string | **Yes** | | Allows for the bar gauge name to be placed explicitly
Possible values are: `auto`, `top`, `left`. | | `showUnfilled` | boolean | **Yes** | `true` | | | `sizing` | string | **Yes** | | Allows for the bar gauge size to be set explicitly
Possible values are: `auto`, `manual`. | diff --git a/docs/sources/developers/kinds/composable/gauge/panelcfg/schema-reference.md b/docs/sources/developers/kinds/composable/gauge/panelcfg/schema-reference.md index 2015674854a..5cc9eaa99c6 100644 --- a/docs/sources/developers/kinds/composable/gauge/panelcfg/schema-reference.md +++ b/docs/sources/developers/kinds/composable/gauge/panelcfg/schema-reference.md @@ -28,8 +28,8 @@ It extends [SingleStatBaseOptions](#singlestatbaseoptions). | Property | Type | Required | Default | Description | |------------------------|-------------------------------------------------|----------|---------|---------------------------------------------------------------------------------------------------------------------------------------------| -| `minVizHeight` | uint32 | **Yes** | `200` | | -| `minVizWidth` | uint32 | **Yes** | `200` | | +| `minVizHeight` | uint32 | **Yes** | `75` | | +| `minVizWidth` | uint32 | **Yes** | `75` | | | `showThresholdLabels` | boolean | **Yes** | `false` | | | `showThresholdMarkers` | boolean | **Yes** | `true` | | | `sizing` | string | **Yes** | | Allows for the bar gauge size to be set explicitly
Possible values are: `auto`, `manual`. | diff --git a/packages/grafana-schema/src/raw/composable/bargauge/panelcfg/x/BarGaugePanelCfg_types.gen.ts b/packages/grafana-schema/src/raw/composable/bargauge/panelcfg/x/BarGaugePanelCfg_types.gen.ts index 77e56468736..5cd471d86e4 100644 --- a/packages/grafana-schema/src/raw/composable/bargauge/panelcfg/x/BarGaugePanelCfg_types.gen.ts +++ b/packages/grafana-schema/src/raw/composable/bargauge/panelcfg/x/BarGaugePanelCfg_types.gen.ts @@ -27,8 +27,8 @@ export interface Options extends common.SingleStatBaseOptions { export const defaultOptions: Partial = { displayMode: common.BarGaugeDisplayMode.Gradient, maxVizHeight: 300, - minVizHeight: 75, - minVizWidth: 75, + minVizHeight: 16, + minVizWidth: 8, namePlacement: common.BarGaugeNamePlacement.Auto, showUnfilled: true, sizing: common.BarGaugeSizing.Auto, diff --git a/packages/grafana-schema/src/raw/composable/gauge/panelcfg/x/GaugePanelCfg_types.gen.ts b/packages/grafana-schema/src/raw/composable/gauge/panelcfg/x/GaugePanelCfg_types.gen.ts index 7cc9914a474..092e0699a7f 100644 --- a/packages/grafana-schema/src/raw/composable/gauge/panelcfg/x/GaugePanelCfg_types.gen.ts +++ b/packages/grafana-schema/src/raw/composable/gauge/panelcfg/x/GaugePanelCfg_types.gen.ts @@ -22,8 +22,8 @@ export interface Options extends common.SingleStatBaseOptions { } export const defaultOptions: Partial = { - minVizHeight: 200, - minVizWidth: 200, + minVizHeight: 75, + minVizWidth: 75, showThresholdLabels: false, showThresholdMarkers: true, sizing: common.BarGaugeSizing.Auto, diff --git a/public/app/plugins/panel/bargauge/panelcfg.cue b/public/app/plugins/panel/bargauge/panelcfg.cue index 7942d515828..984dd1020a4 100644 --- a/public/app/plugins/panel/bargauge/panelcfg.cue +++ b/public/app/plugins/panel/bargauge/panelcfg.cue @@ -32,8 +32,8 @@ composableKinds: PanelCfg: { namePlacement: common.BarGaugeNamePlacement & (*"auto" | _) showUnfilled: bool | *true sizing: common.BarGaugeSizing & (*"auto" | _) - minVizWidth: uint32 | *75 - minVizHeight: uint32 | *75 + minVizWidth: uint32 | *8 + minVizHeight: uint32 | *16 maxVizHeight: uint32 | *300 } @cuetsy(kind="interface") } diff --git a/public/app/plugins/panel/bargauge/panelcfg.gen.ts b/public/app/plugins/panel/bargauge/panelcfg.gen.ts index 1993dc303ee..b9d330fac98 100644 --- a/public/app/plugins/panel/bargauge/panelcfg.gen.ts +++ b/public/app/plugins/panel/bargauge/panelcfg.gen.ts @@ -24,8 +24,8 @@ export interface Options extends common.SingleStatBaseOptions { export const defaultOptions: Partial = { displayMode: common.BarGaugeDisplayMode.Gradient, maxVizHeight: 300, - minVizHeight: 75, - minVizWidth: 75, + minVizHeight: 16, + minVizWidth: 8, namePlacement: common.BarGaugeNamePlacement.Auto, showUnfilled: true, sizing: common.BarGaugeSizing.Auto, diff --git a/public/app/plugins/panel/gauge/panelcfg.cue b/public/app/plugins/panel/gauge/panelcfg.cue index eaf9fb258da..99f67d6da8b 100644 --- a/public/app/plugins/panel/gauge/panelcfg.cue +++ b/public/app/plugins/panel/gauge/panelcfg.cue @@ -30,8 +30,8 @@ composableKinds: PanelCfg: { showThresholdLabels: bool | *false showThresholdMarkers: bool | *true sizing: common.BarGaugeSizing & (*"auto" | _) - minVizWidth: uint32 | *200 - minVizHeight: uint32 | *200 + minVizWidth: uint32 | *75 + minVizHeight: uint32 | *75 } @cuetsy(kind="interface") } }] diff --git a/public/app/plugins/panel/gauge/panelcfg.gen.ts b/public/app/plugins/panel/gauge/panelcfg.gen.ts index ebd5bce670d..a0a73ef5863 100644 --- a/public/app/plugins/panel/gauge/panelcfg.gen.ts +++ b/public/app/plugins/panel/gauge/panelcfg.gen.ts @@ -19,8 +19,8 @@ export interface Options extends common.SingleStatBaseOptions { } export const defaultOptions: Partial = { - minVizHeight: 200, - minVizWidth: 200, + minVizHeight: 75, + minVizWidth: 75, showThresholdLabels: false, showThresholdMarkers: true, sizing: common.BarGaugeSizing.Auto,