mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-10-15 12:49:17 +00:00
fix: import dashboard templates (#363)
This commit is contained in:
@@ -110,11 +110,6 @@ limitations under the License. -->
|
||||
return m.length ? m : [{ label: "", value: "" }];
|
||||
});
|
||||
const currentMetric = ref<string>(metricList.value[0].value);
|
||||
const currentConfig = ref<{ unit: string; calculation: string; label: string }>({
|
||||
unit: "",
|
||||
calculation: "",
|
||||
label: "",
|
||||
});
|
||||
const currentIndex = ref<number>(0);
|
||||
const getMetricConfig = computed(() => {
|
||||
if (props.type === "hierarchyServicesConfig") {
|
||||
@@ -125,7 +120,12 @@ limitations under the License. -->
|
||||
},
|
||||
ConfigFieldTypes.ISDEFAULT,
|
||||
);
|
||||
return (dashboard && dashboard.expressionsConfig) || [];
|
||||
if (!dashboard) {
|
||||
return [];
|
||||
}
|
||||
const config = dashboard.expressionsConfig || [];
|
||||
|
||||
return config || [];
|
||||
}
|
||||
let config = [];
|
||||
|
||||
@@ -143,6 +143,14 @@ limitations under the License. -->
|
||||
return config || [];
|
||||
});
|
||||
|
||||
const currentConfig = ref<{ unit: string; calculation: string; label: string }>(
|
||||
getMetricConfig.value[0] || {
|
||||
unit: "",
|
||||
calculation: "",
|
||||
label: "",
|
||||
},
|
||||
);
|
||||
|
||||
function changeConfigs(param: { [key: string]: string }) {
|
||||
const metricConfig = getMetricConfig.value || [];
|
||||
metricConfig[currentIndex.value] = {
|
||||
|
Reference in New Issue
Block a user