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