mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-13 16:27:33 +00:00
fix: update instance topology
This commit is contained in:
parent
401d223fdf
commit
1285335de9
@ -117,6 +117,9 @@ limitations under the License. -->
|
|||||||
menus.value.style.top = params.event.offsetY + 2 + "px";
|
menus.value.style.top = params.event.offsetY + 2 + "px";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (props.option.series.type === "sankey") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
document.addEventListener(
|
document.addEventListener(
|
||||||
"click",
|
"click",
|
||||||
() => {
|
() => {
|
||||||
|
@ -191,8 +191,12 @@ export const topologyStore = defineStore({
|
|||||||
return res.data.data.topology;
|
return res.data.data.topology;
|
||||||
},
|
},
|
||||||
async getInstanceTopology() {
|
async getInstanceTopology() {
|
||||||
const serverServiceId = useSelectorStore().currentService.id;
|
const { currentService, currentDestService } = useSelectorStore();
|
||||||
const clientServiceId = useSelectorStore().currentDestService.id;
|
const serverServiceId = currentService && currentService.id;
|
||||||
|
const clientServiceId = currentDestService && currentDestService.id;
|
||||||
|
if (!(serverServiceId && clientServiceId)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const duration = useAppStoreWithOut().durationTime;
|
const duration = useAppStoreWithOut().durationTime;
|
||||||
const res: AxiosResponse = await graphql.query("getInstanceTopology").params({
|
const res: AxiosResponse = await graphql.query("getInstanceTopology").params({
|
||||||
clientServiceId,
|
clientServiceId,
|
||||||
|
1
src/types/components.d.ts
vendored
1
src/types/components.d.ts
vendored
@ -22,7 +22,6 @@ declare module '@vue/runtime-core' {
|
|||||||
ElMenuItemGroup: typeof import('element-plus/es')['ElMenuItemGroup']
|
ElMenuItemGroup: typeof import('element-plus/es')['ElMenuItemGroup']
|
||||||
ElOption: typeof import('element-plus/es')['ElOption']
|
ElOption: typeof import('element-plus/es')['ElOption']
|
||||||
ElPagination: typeof import('element-plus/es')['ElPagination']
|
ElPagination: typeof import('element-plus/es')['ElPagination']
|
||||||
ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
|
|
||||||
ElPopover: typeof import('element-plus/es')['ElPopover']
|
ElPopover: typeof import('element-plus/es')['ElPopover']
|
||||||
ElProgress: typeof import('element-plus/es')['ElProgress']
|
ElProgress: typeof import('element-plus/es')['ElProgress']
|
||||||
ElRadio: typeof import('element-plus/es')['ElRadio']
|
ElRadio: typeof import('element-plus/es')['ElRadio']
|
||||||
|
@ -105,7 +105,7 @@ limitations under the License. -->
|
|||||||
window.addEventListener("resize", resize);
|
window.addEventListener("resize", resize);
|
||||||
});
|
});
|
||||||
|
|
||||||
async function loadTopology(id: string) {
|
async function loadTopology(id?: string) {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const resp = await getTopology(id);
|
const resp = await getTopology(id);
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
@ -212,7 +212,7 @@ limitations under the License. -->
|
|||||||
loadTopology(selectorStore.currentPod.id);
|
loadTopology(selectorStore.currentPod.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getTopology(id: string) {
|
async function getTopology(id?: string) {
|
||||||
let resp;
|
let resp;
|
||||||
switch (dashboardStore.entity) {
|
switch (dashboardStore.entity) {
|
||||||
case EntityType[2].value:
|
case EntityType[2].value:
|
||||||
@ -242,6 +242,18 @@ limitations under the License. -->
|
|||||||
topologyStore.setLink(null);
|
topologyStore.setLink(null);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
watch(
|
||||||
|
() => [selectorStore.currentService, selectorStore.currentDestService],
|
||||||
|
() => {
|
||||||
|
console.log(selectorStore.currentService);
|
||||||
|
if (dashboardStore.entity !== EntityType[4].value) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
loadTopology();
|
||||||
|
topologyStore.setNode(null);
|
||||||
|
topologyStore.setLink(null);
|
||||||
|
},
|
||||||
|
);
|
||||||
watch(
|
watch(
|
||||||
() => appStore.durationTime,
|
() => appStore.durationTime,
|
||||||
() => {
|
() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user