You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by qi...@apache.org on 2023/04/05 09:23:33 UTC

[skywalking-booster-ui] branch main updated: fix:incorrect node name length calculation (#252)

This is an automated email from the ASF dual-hosted git repository.

qiuxiafan 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 8077043  fix:incorrect node name length calculation (#252)
8077043 is described below

commit 8077043c7e003189a7fb9e8a3731c8d1803fc3c9
Author: hadesy <63...@users.noreply.github.com>
AuthorDate: Wed Apr 5 17:23:26 2023 +0800

    fix:incorrect node name length calculation (#252)
---
 src/views/dashboard/related/topology/components/Graph.vue | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/views/dashboard/related/topology/components/Graph.vue b/src/views/dashboard/related/topology/components/Graph.vue
index 8f906f9..61544d8 100644
--- a/src/views/dashboard/related/topology/components/Graph.vue
+++ b/src/views/dashboard/related/topology/components/Graph.vue
@@ -42,7 +42,7 @@ limitations under the License. -->
             :y="n.y - 38"
             :href="!n.type || n.type === `N/A` ? icons.UNDEFINED : icons[n.type.toUpperCase().replace('-', '')]"
           />
-          <text :x="n.x - (n.name.length * 6) / 2 + 6" :y="n.y + n.height + 8" style="pointer-events: none">
+          <text :x="n.x - (Math.min(n.name.length, 20) * 6) / 2 + 6" :y="n.y + n.height + 8" style="pointer-events: none">
             {{ n.name.length > 20 ? `${n.name.substring(0, 20)}...` : n.name }}
           </text>
         </g>