fix entity

This commit is contained in:
Qiuxia Fan 2022-03-21 21:12:56 +08:00
parent f1e405fbb4
commit bc57e2e368
8 changed files with 21 additions and 12 deletions

View File

@ -115,7 +115,7 @@ const msg = {
rename: "重命名",
selfObservability: "自观性",
satellite: "Satellite",
skyWalkingServer: "Sky Walking服务",
skyWalkingServer: "SkyWalking服务",
functions: "Functions",
linux: "Linux",
browser: "浏览器",

View File

@ -35,7 +35,7 @@ limitations under the License. -->
<template #default="scope">
<span
class="link"
@click="clickEndpoint"
@click="clickEndpoint(scope)"
:style="{ fontSize: `${config.fontSize}px` }"
>
{{ scope.row.label }}

View File

@ -35,7 +35,7 @@ limitations under the License. -->
<template #default="scope">
<span
class="link"
@click="clickInstance"
@click="clickInstance(scope)"
:style="{ fontSize: `${config.fontSize}px` }"
>
{{ scope.row.label }}

View File

@ -13,12 +13,11 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. -->
<template>
<PodTopology :config="config" v-if="isSankey" />
<Graph :config="config" v-else />
<Graph :config="config" v-if="isService" />
<PodTopology :config="config" v-else />
</template>
<script lang="ts" setup>
import type { PropType } from "vue";
import { ref } from "vue";
import Graph from "./components/Graph.vue";
import PodTopology from "./components/PodTopology.vue";
import { EntityType } from "../../data";
@ -32,7 +31,7 @@ defineProps({
},
});
const dashboardStore = useDashboardStore();
const isSankey = ref<boolean>(
[EntityType[2].value, EntityType[3].value].includes(dashboardStore.entity)
const isService = [EntityType[0].value, EntityType[1].value].includes(
dashboardStore.entity
);
</script>

View File

@ -34,7 +34,12 @@ limitations under the License. -->
@change="changeDepth"
/>
</span>
<span class="switch-icon ml-5" title="Settings" @click="setConfig">
<span
class="switch-icon ml-5"
title="Settings"
@click="setConfig"
v-if="dashboardStore.editMode"
>
<Icon size="middle" iconName="settings" />
</span>
<span

View File

@ -28,7 +28,12 @@ limitations under the License. -->
@change="changeDepth"
/>
</span>
<span class="switch-icon ml-5" title="Settings" @click="setConfig">
<span
class="switch-icon ml-5"
title="Settings"
@click="setConfig"
v-if="dashboardStore.editMode"
>
<Icon size="middle" iconName="settings" />
</span>
<span
@ -221,7 +226,7 @@ async function getTopology(id: string) {
Number(depth.value)
);
break;
case EntityType[3].value:
case EntityType[4].value:
resp = await topologyStore.getInstanceTopology();
break;
}

View File

@ -26,6 +26,7 @@ const emit = defineEmits(["click"]);
const topologyStore = useTopologyStore();
const option = computed(() => getOption());
console.log(topologyStore.nodes);
function getOption() {
return {
tooltip: {

View File

@ -225,7 +225,6 @@ const states = reactive<{
linkDashboards: [],
nodeDashboards: [],
});
console.log(dashboardStore.selectedGrid);
const isService = [EntityType[0].value, EntityType[1].value].includes(
dashboardStore.entity
);