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
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
:key="item.value || ''"
:label="item.label || ''"
:value="item.value || ''"
>
</el-option>
</el-select>

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] || [];

View File

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