mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-12 15:52:57 +00:00
fix: update
This commit is contained in:
parent
2c0d03cbd2
commit
77a08456e6
@ -129,18 +129,22 @@ export const topologyStore = defineStore({
|
||||
for (const relation of relations) {
|
||||
const upperId = relation.upperInstance.id;
|
||||
const lowerId = relation.lowerInstance.id;
|
||||
if (!nodesMap.get(upperId)) {
|
||||
nodesMap.set(upperId, relation.upperInstance);
|
||||
const lowerKey = `${lowerId}-${relation.lowerInstance.layer}`;
|
||||
const upperKey = `${upperId}-${relation.upperInstance.layer}`;
|
||||
const lowerObj = { ...relation.lowerInstance, key: lowerId, id: lowerKey };
|
||||
const upperObj = { ...relation.upperInstance, key: upperId, id: upperKey };
|
||||
if (!nodesMap.get(upperKey)) {
|
||||
nodesMap.set(upperKey, upperObj);
|
||||
}
|
||||
if (!nodesMap.get(lowerId)) {
|
||||
nodesMap.set(lowerId, relation.lowerInstance);
|
||||
if (!nodesMap.get(lowerKey)) {
|
||||
nodesMap.set(lowerKey, lowerObj);
|
||||
}
|
||||
callList.push({
|
||||
source: upperId,
|
||||
target: lowerId,
|
||||
id: `${upperId}->${lowerId}`,
|
||||
sourceObj: relation.upperInstance,
|
||||
targetObj: relation.lowerInstance,
|
||||
source: lowerKey,
|
||||
target: upperKey,
|
||||
id: `${upperKey}->${lowerKey}`,
|
||||
sourceObj: upperObj,
|
||||
targetObj: lowerObj,
|
||||
});
|
||||
}
|
||||
this.hierarchyInstanceCalls = callList;
|
||||
|
@ -58,15 +58,15 @@ limitations under the License. -->
|
||||
const dashboardStore = useDashboardStore();
|
||||
const topologyStore = useTopologyStore();
|
||||
const selectorStore = useSelectorStore();
|
||||
const { hierarchyServicesConfig } = dashboardStore.selectedGrid;
|
||||
const hierarchyServicesConfig = dashboardStore.selectedGrid.hierarchyServicesConfig || [];
|
||||
const layers = ref<Option[]>([]);
|
||||
const currentConfig = ref<HierarchyServicesConfig>(hierarchyServicesConfig(0) || {});
|
||||
const currentConfig = ref<HierarchyServicesConfig>(hierarchyServicesConfig[0] || {});
|
||||
|
||||
onMounted(() => {
|
||||
setLayers();
|
||||
});
|
||||
function changeLayer(opt: Option[]) {
|
||||
const { hierarchyServicesConfig } = dashboardStore.selectedGrid;
|
||||
const hierarchyServicesConfig = dashboardStore.selectedGrid.hierarchyServicesConfig || [];
|
||||
const layer = opt[0].value;
|
||||
|
||||
currentConfig.value = hierarchyServicesConfig.value.find((d: HierarchyServicesConfig) => d.layer === layer) || {};
|
||||
|
@ -95,7 +95,7 @@ limitations under the License. -->
|
||||
<Icon size="middle" iconName="settings" />
|
||||
</span>
|
||||
</div>
|
||||
<div class="setting" v-if="showSetting && dashboardStore.editMode">
|
||||
<div class="hierarchy-settings" v-if="showSetting && dashboardStore.editMode">
|
||||
<hierarchy-settings @update="updateSettings" />
|
||||
</div>
|
||||
</div>
|
||||
@ -368,7 +368,7 @@ limitations under the License. -->
|
||||
}
|
||||
}
|
||||
|
||||
.setting {
|
||||
.hierarchy-settings {
|
||||
position: absolute;
|
||||
top: 40px;
|
||||
right: 10px;
|
||||
|
@ -147,7 +147,7 @@ limitations under the License. -->
|
||||
import { EntityType, DepthList, MetricModes, CallTypes } from "@/views/dashboard/data";
|
||||
import router from "@/router";
|
||||
import { ElMessage } from "element-plus";
|
||||
import Settings from "../config/HierarchySettings.vue";
|
||||
import Settings from "../config/Settings.vue";
|
||||
import HierarchyMap from "./HierarchyMap.vue";
|
||||
import type { Option } from "@/types/app";
|
||||
import type { Service } from "@/types/selector";
|
||||
|
Loading…
Reference in New Issue
Block a user