From 8d87777832620721b33ba5c46067fefe0d50efa9 Mon Sep 17 00:00:00 2001 From: Fine0830 Date: Sat, 2 Apr 2022 15:18:44 +0800 Subject: [PATCH] fix graph (#55) --- src/components/Graph.vue | 6 +++++- src/views/dashboard/related/topology/components/Graph.vue | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/Graph.vue b/src/components/Graph.vue index a694cdeb..9b51be12 100644 --- a/src/components/Graph.vue +++ b/src/components/Graph.vue @@ -13,7 +13,7 @@ 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. --> @@ -98,4 +98,8 @@ onBeforeUnmount(() => { -webkit-box-align: center; color: #666; } + +.chart { + overflow: hidden; +} diff --git a/src/views/dashboard/related/topology/components/Graph.vue b/src/views/dashboard/related/topology/components/Graph.vue index c68a1943..d057d35c 100644 --- a/src/views/dashboard/related/topology/components/Graph.vue +++ b/src/views/dashboard/related/topology/components/Graph.vue @@ -149,6 +149,11 @@ const depth = ref(graphConfig.value.depth || 2); onMounted(async () => { loading.value = true; + const json = await selectorStore.fetchServices(dashboardStore.layerId); + if (json.errors) { + ElMessage.error(json.errors); + return; + } const resp = await getTopology(); loading.value = false; if (resp && resp.errors) {