fix console errors

This commit is contained in:
Fine 2022-08-18 15:45:36 +08:00
parent d93726e70a
commit a78fccdc91
3 changed files with 7 additions and 5 deletions

View File

@ -29,9 +29,9 @@ limitations under the License. -->
> >
<el-option <el-option
v-for="item in options" v-for="item in options"
:key="item.value" :key="item.value || ''"
:label="item.label" :label="item.label || ''"
:value="item.value" :value="item.value || ''"
> >
</el-option> </el-option>
</el-select> </el-select>

View File

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

View File

@ -216,7 +216,6 @@ export default defineComponent({
dashboardStore.setCurrentTabItems( dashboardStore.setCurrentTabItems(
dashboardStore.layout[l].children[activeTabIndex.value].children dashboardStore.layout[l].children[activeTabIndex.value].children
); );
console.log(dashboardStore.currentTabItems);
} }
function copyLink() { function copyLink() {
let path = ""; let path = "";