Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gauges: Fixing broken auto sizing #79926

Merged
merged 1 commit into from
Jan 2, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ It extends [SingleStatBaseOptions](#singlestatbaseoptions).
|-----------------|-------------------------------------------------|----------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------|
| `displayMode` | string | **Yes** | | Enum expressing the possible display modes<br/>for the bar gauge component of Grafana UI<br/>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<br/>Possible values are: `auto`, `top`, `left`. |
| `showUnfilled` | boolean | **Yes** | `true` | |
| `sizing` | string | **Yes** | | Allows for the bar gauge size to be set explicitly<br/>Possible values are: `auto`, `manual`. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<br/>Possible values are: `auto`, `manual`. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export interface Options extends common.SingleStatBaseOptions {
export const defaultOptions: Partial<Options> = {
displayMode: common.BarGaugeDisplayMode.Gradient,
maxVizHeight: 300,
minVizHeight: 75,
minVizWidth: 75,
minVizHeight: 16,
minVizWidth: 8,
namePlacement: common.BarGaugeNamePlacement.Auto,
showUnfilled: true,
sizing: common.BarGaugeSizing.Auto,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ export interface Options extends common.SingleStatBaseOptions {
}

export const defaultOptions: Partial<Options> = {
minVizHeight: 200,
minVizWidth: 200,
minVizHeight: 75,
minVizWidth: 75,
showThresholdLabels: false,
showThresholdMarkers: true,
sizing: common.BarGaugeSizing.Auto,
Expand Down
4 changes: 2 additions & 2 deletions public/app/plugins/panel/bargauge/panelcfg.cue
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down
4 changes: 2 additions & 2 deletions public/app/plugins/panel/bargauge/panelcfg.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export interface Options extends common.SingleStatBaseOptions {
export const defaultOptions: Partial<Options> = {
displayMode: common.BarGaugeDisplayMode.Gradient,
maxVizHeight: 300,
minVizHeight: 75,
minVizWidth: 75,
minVizHeight: 16,
minVizWidth: 8,
namePlacement: common.BarGaugeNamePlacement.Auto,
showUnfilled: true,
sizing: common.BarGaugeSizing.Auto,
Expand Down
4 changes: 2 additions & 2 deletions public/app/plugins/panel/gauge/panelcfg.cue
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}]
Expand Down
4 changes: 2 additions & 2 deletions public/app/plugins/panel/gauge/panelcfg.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export interface Options extends common.SingleStatBaseOptions {
}

export const defaultOptions: Partial<Options> = {
minVizHeight: 200,
minVizWidth: 200,
minVizHeight: 75,
minVizWidth: 75,
showThresholdLabels: false,
showThresholdMarkers: true,
sizing: common.BarGaugeSizing.Auto,
Expand Down
Loading