fix: pick calendar with a wrong time range and set a unique value for dashboard grid key (#139)

This commit is contained in:
Fine0830
2022-08-18 16:29:36 +08:00
committed by GitHub
parent 9c0bb988e6
commit adb457d660
8 changed files with 28 additions and 24 deletions

View File

@@ -154,7 +154,10 @@ export function useSourceProcessor(
const c = (config.metricConfig && config.metricConfig[index]) || {};
if (type === MetricQueryTypes.ReadMetricsValues) {
source[m] = calculateExp(resp.data[keys[index]].values.values, c);
source[m] =
(resp.data[keys[index]] &&
calculateExp(resp.data[keys[index]].values.values, c)) ||
[];
}
if (type === MetricQueryTypes.ReadLabeledMetricsValues) {
const resVal = Object.values(resp.data)[0] || [];