You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2022/04/02 07:18:48 UTC

[skywalking-booster-ui] branch main updated: fix graph (#55)

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 8d87777  fix graph (#55)
8d87777 is described below

commit 8d87777832620721b33ba5c46067fefe0d50efa9
Author: Fine0830 <fi...@outlook.com>
AuthorDate: Sat Apr 2 15:18:44 2022 +0800

    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 a694cde..9b51be1 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. -->
 <template>
-  <div ref="chartRef" :style="`height:${height};width:${width};`">
+  <div class="chart" ref="chartRef" :style="`height:${height};width:${width};`">
     <div v-if="!available" class="no-data">No Data</div>
   </div>
 </template>
@@ -98,4 +98,8 @@ onBeforeUnmount(() => {
   -webkit-box-align: center;
   color: #666;
 }
+
+.chart {
+  overflow: hidden;
+}
 </style>
diff --git a/src/views/dashboard/related/topology/components/Graph.vue b/src/views/dashboard/related/topology/components/Graph.vue
index c68a194..d057d35 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<number>(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) {