fix: set configurations for process topology (#150)

This commit is contained in:
Fine0830 2022-08-29 17:32:49 +08:00 committed by GitHub
parent 1a989a1434
commit d8889f1787
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 6 deletions

View File

@ -30,7 +30,7 @@ limitations under the License. -->
<span>{{ t("delete") }}</span>
</div>
</el-popover>
<Content />
<Content :config="props.data" />
</div>
</template>
<script lang="ts" setup>

View File

@ -20,7 +20,7 @@ limitations under the License. -->
v-if="networkProfilingStore.nodes.length"
v-loading="networkProfilingStore.loadNodes"
>
<process-topology />
<process-topology :config="config" />
</div>
<div class="text" v-else v-loading="networkProfilingStore.loadNodes">
{{ t("noData") }}
@ -28,11 +28,19 @@ limitations under the License. -->
</div>
</template>
<script lang="ts" setup>
import type { PropType } from "vue";
import { useI18n } from "vue-i18n";
import Tasks from "./components/Tasks.vue";
import ProcessTopology from "./components/ProcessTopology.vue";
import { useNetworkProfilingStore } from "@/store/modules/network-profiling";
/*global defineProps */
defineProps({
config: {
type: Object as PropType<any>,
default: () => ({ graph: {} }),
},
});
const networkProfilingStore = useNetworkProfilingStore();
const { t } = useI18n();
</script>

View File

@ -15,7 +15,7 @@ limitations under the License. -->
<template>
<div class="label">{{ t("linkDashboard") }}</div>
<Selector
:value="linkDashboard"
:value="dashboardStore.selectedGrid.linkDashboard || ''"
:options="linkDashboards"
size="small"
placeholder="Please input a dashboard name for calls"
@ -37,8 +37,6 @@ const dashboardStore = useDashboardStore();
const linkDashboards = ref<
(DashboardItem & { label: string; value: string })[]
>([]);
const { selectedGrid } = dashboardStore;
const linkDashboard = ref<string>(selectedGrid.linkDashboard || "");
onMounted(() => {
getDashboards();
@ -64,7 +62,6 @@ function getDashboards() {
}
function changeLinkDashboard(opt: { value: string }[]) {
linkDashboard.value = opt[0].value;
const p = {
...dashboardStore.selectedGrid,
linkDashboard: opt[0].value,