This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-booster-ui.git
The following commit(s) were added to refs/heads/main by this push:
new d8889f1 fix: set configurations for process topology (#150)
d8889f1 is described below
commit d8889f178716e5358bf37787385142e5a317d427
Author: Fine0830 <[email protected]>
AuthorDate: Mon Aug 29 17:32:49 2022 +0800
fix: set configurations for process topology (#150)
---
src/views/dashboard/controls/NetworkProfiling.vue | 2 +-
src/views/dashboard/related/network-profiling/Content.vue | 10 +++++++++-
.../related/network-profiling/components/Settings.vue | 5 +----
3 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/src/views/dashboard/controls/NetworkProfiling.vue
b/src/views/dashboard/controls/NetworkProfiling.vue
index d5dfd49..5dc6ab5 100644
--- a/src/views/dashboard/controls/NetworkProfiling.vue
+++ b/src/views/dashboard/controls/NetworkProfiling.vue
@@ -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>
diff --git a/src/views/dashboard/related/network-profiling/Content.vue
b/src/views/dashboard/related/network-profiling/Content.vue
index b320ac0..12495af 100644
--- a/src/views/dashboard/related/network-profiling/Content.vue
+++ b/src/views/dashboard/related/network-profiling/Content.vue
@@ -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>
diff --git
a/src/views/dashboard/related/network-profiling/components/Settings.vue
b/src/views/dashboard/related/network-profiling/components/Settings.vue
index b0cb5aa..a12a2cc 100644
--- a/src/views/dashboard/related/network-profiling/components/Settings.vue
+++ b/src/views/dashboard/related/network-profiling/components/Settings.vue
@@ -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,