|
|
|
@ -31,56 +31,56 @@ export const plugin = new PanelPlugin<PanelOptions>(Panel).setPanelOptions((buil
|
|
|
|
|
}) |
|
|
|
|
.addNumberInput({ |
|
|
|
|
name: 'Value', |
|
|
|
|
path: 'gauge.value', |
|
|
|
|
path: 'gauge.value.value', |
|
|
|
|
category: ['Extremum'], |
|
|
|
|
showIf: (config) => config.visualizationType === Pod.GAUGE && !config.gauge.useMetricForValue, |
|
|
|
|
showIf: (config) => config.visualizationType === Pod.GAUGE && !config.gauge.value.useMetric, |
|
|
|
|
}) |
|
|
|
|
.addFieldNamePicker({ |
|
|
|
|
name: 'Value', |
|
|
|
|
path: 'gauge.valueMetricName', |
|
|
|
|
path: 'gauge.value.metricName', |
|
|
|
|
category: ['Extremum'], |
|
|
|
|
showIf: (config) => config.visualizationType === Pod.GAUGE && config.gauge.useMetricForValue, |
|
|
|
|
showIf: (config) => config.visualizationType === Pod.GAUGE && config.gauge.value.useMetric, |
|
|
|
|
}) |
|
|
|
|
.addBooleanSwitch({ |
|
|
|
|
path: 'gauge.useMetricForValue', |
|
|
|
|
path: 'gauge.value.useMetric', |
|
|
|
|
name: 'Use metric', |
|
|
|
|
defaultValue: false, |
|
|
|
|
category: ['Extremum'], |
|
|
|
|
showIf: (config) => config.visualizationType === Pod.GAUGE, |
|
|
|
|
}) |
|
|
|
|
.addNumberInput({ |
|
|
|
|
path: 'gauge.min', |
|
|
|
|
path: 'gauge.min.value', |
|
|
|
|
name: 'Min', |
|
|
|
|
category: ['Extremum'], |
|
|
|
|
showIf: (config) => config.visualizationType === Pod.GAUGE && !config.gauge.useMetricForMin, |
|
|
|
|
showIf: (config) => config.visualizationType === Pod.GAUGE && !config.gauge.min.useMetric, |
|
|
|
|
}) |
|
|
|
|
.addFieldNamePicker({ |
|
|
|
|
name: 'Min', |
|
|
|
|
path: 'gauge.minMetricName', |
|
|
|
|
path: 'gauge.min.metricName', |
|
|
|
|
category: ['Extremum'], |
|
|
|
|
showIf: (config) => config.visualizationType === Pod.GAUGE && config.gauge.useMetricForMin, |
|
|
|
|
showIf: (config) => config.visualizationType === Pod.GAUGE && config.gauge.min.useMetric, |
|
|
|
|
}) |
|
|
|
|
.addBooleanSwitch({ |
|
|
|
|
path: 'gauge.useMetricForMin', |
|
|
|
|
path: 'gauge.min.useMetric', |
|
|
|
|
name: 'Use metric', |
|
|
|
|
defaultValue: false, |
|
|
|
|
category: ['Extremum'], |
|
|
|
|
showIf: (config) => config.visualizationType === Pod.GAUGE, |
|
|
|
|
}) |
|
|
|
|
.addNumberInput({ |
|
|
|
|
path: 'gauge.max', |
|
|
|
|
path: 'gauge.max.value', |
|
|
|
|
name: 'Max', |
|
|
|
|
category: ['Extremum'], |
|
|
|
|
showIf: (config) => config.visualizationType === Pod.GAUGE && !config.gauge.useMetricForMax, |
|
|
|
|
showIf: (config) => config.visualizationType === Pod.GAUGE && !config.gauge.max.useMetric, |
|
|
|
|
}) |
|
|
|
|
.addFieldNamePicker({ |
|
|
|
|
name: 'Max', |
|
|
|
|
path: 'gauge.maxMetricName', |
|
|
|
|
path: 'gauge.max.metricName', |
|
|
|
|
category: ['Extremum'], |
|
|
|
|
showIf: (config) => config.visualizationType === Pod.GAUGE && config.gauge.useMetricForMax, |
|
|
|
|
showIf: (config) => config.visualizationType === Pod.GAUGE && config.gauge.max.useMetric, |
|
|
|
|
}) |
|
|
|
|
.addBooleanSwitch({ |
|
|
|
|
path: 'gauge.useMetricForMax', |
|
|
|
|
path: 'gauge.max.useMetric', |
|
|
|
|
name: 'Use metric', |
|
|
|
|
defaultValue: false, |
|
|
|
|
category: ['Extremum'], |
|
|
|
|