Browse Source

todo

pull/3/head
rozetko 8 months ago
parent
commit
59d02583c4
  1. 3
      src/components/Panel.tsx

3
src/components/Panel.tsx

@ -83,12 +83,13 @@ export function Panel({ options, data, width, height, timeRange, onChangeTimeRan
let additionalInfo;
const additionalInfoConfig = options.gauge.additionalInfo;
if (additionalInfoConfig.display) {
// TODO: move `useMetric` handling to utils, as it's duplicated in gaugeOptions.ts
let value: number | undefined = undefined;
if (!additionalInfoConfig.value?.useMetric) {
value = additionalInfoConfig.value.value;
} else {
if (!_.isEmpty(additionalInfoConfig.value.metricName)) {
const aggregatedValue = getLastMetricValue(grafanaSeriesList, additionalInfoConfig.value.metricName, 'Max');
const aggregatedValue = getLastMetricValue(grafanaSeriesList, additionalInfoConfig.value.metricName, 'Additional Info');
value = aggregatedValue !== null ? aggregatedValue : undefined;
}
}

Loading…
Cancel
Save