Grafana Schema: Extend the VariableHide enum (#110579)
* feat: extend the `VariableHide` enum with a new option * feat: extend the `VariableHide` for v1
This commit is contained in:
@@ -47,6 +47,7 @@ export enum VariableHide {
|
||||
dontHide,
|
||||
hideLabel,
|
||||
hideVariable,
|
||||
inControlsMenu,
|
||||
}
|
||||
|
||||
export interface AdHocVariableFilter {
|
||||
|
||||
@@ -246,12 +246,13 @@ export enum VariableRefresh {
|
||||
|
||||
/**
|
||||
* Determine if the variable shows on dashboard
|
||||
* Accepted values are 0 (show label and value), 1 (show value only), 2 (show nothing).
|
||||
* Accepted values are 0 (show label and value), 1 (show value only), 2 (show nothing), 3 (show under the controls dropdown menu).
|
||||
*/
|
||||
export enum VariableHide {
|
||||
dontHide = 0,
|
||||
hideLabel = 1,
|
||||
hideVariable = 2,
|
||||
inControlsMenu = 3,
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1039,8 +1039,8 @@ export const defaultVariableOption = (): VariableOption => ({
|
||||
});
|
||||
|
||||
// Determine if the variable shows on dashboard
|
||||
// Accepted values are `dontHide` (show label and value), `hideLabel` (show value only), `hideVariable` (show nothing).
|
||||
export type VariableHide = "dontHide" | "hideLabel" | "hideVariable";
|
||||
// Accepted values are `dontHide` (show label and value), `hideLabel` (show value only), `hideVariable` (show nothing), `inControlsMenu` (show in a drop-down menu).
|
||||
export type VariableHide = "dontHide" | "hideLabel" | "hideVariable" | "inControlsMenu";
|
||||
|
||||
export const defaultVariableHide = (): VariableHide => ("dontHide");
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ export enum VariableHide {
|
||||
dontHide,
|
||||
hideLabel,
|
||||
hideVariable,
|
||||
inControlsMenu,
|
||||
}
|
||||
|
||||
export interface VariableModel extends Omit<raw.VariableModel, 'datasource'> {
|
||||
|
||||
Reference in New Issue
Block a user