mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-18 10:05:24 +00:00
fix dashboards
This commit is contained in:
parent
f57fdf9312
commit
f3c8a3a9db
@ -53,6 +53,9 @@ const available = computed(
|
|||||||
(Array.isArray(props.option.series.data) && props.option.series.data[0])
|
(Array.isArray(props.option.series.data) && props.option.series.data[0])
|
||||||
);
|
);
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
if (!available.value) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
await setOptions(props.option);
|
await setOptions(props.option);
|
||||||
chartRef.value && addResizeListener(unref(chartRef), resize);
|
chartRef.value && addResizeListener(unref(chartRef), resize);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@ -70,6 +73,9 @@ onMounted(async () => {
|
|||||||
watch(
|
watch(
|
||||||
() => props.option,
|
() => props.option,
|
||||||
(newVal, oldVal) => {
|
(newVal, oldVal) => {
|
||||||
|
if (!available.value) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (JSON.stringify(newVal) === JSON.stringify(oldVal)) {
|
if (JSON.stringify(newVal) === JSON.stringify(oldVal)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -169,7 +169,6 @@ const key = computed(() => {
|
|||||||
const type = EntityType.find(
|
const type = EntityType.find(
|
||||||
(d: Option) => d.value === dashboardStore.entity
|
(d: Option) => d.value === dashboardStore.entity
|
||||||
);
|
);
|
||||||
|
|
||||||
return (type && type.key) || 0;
|
return (type && type.key) || 0;
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -268,9 +267,9 @@ async function setDestSelector() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const destPod = params.destPodId || selectorStore.destPods[0].id;
|
const destPod = params.destPodId || selectorStore.destPods[0].id;
|
||||||
const currentDestPod = selectorStore.destPods.filter(
|
const currentDestPod = selectorStore.destPods.find(
|
||||||
(d: { id: string }) => d.id === destPod
|
(d: { id: string }) => d.id === destPod
|
||||||
)[0];
|
);
|
||||||
if (currentDestPod) {
|
if (currentDestPod) {
|
||||||
selectorStore.setCurrentDestPod(currentDestPod);
|
selectorStore.setCurrentDestPod(currentDestPod);
|
||||||
states.currentDestPod = currentDestPod.label;
|
states.currentDestPod = currentDestPod.label;
|
||||||
@ -278,7 +277,7 @@ async function setDestSelector() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function getServices() {
|
async function getServices() {
|
||||||
if (key.value === 10 || key.value === 0) {
|
if (key.value === 10) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!dashboardStore.layerId) {
|
if (!dashboardStore.layerId) {
|
||||||
|
Loading…
Reference in New Issue
Block a user