From 56540330f6bbd86712bc148e26d64e2add070709 Mon Sep 17 00:00:00 2001 From: superlollipop <1769128867@qq.com> Date: Mon, 7 Aug 2023 17:05:56 +0800 Subject: [PATCH] fix: environment indicator display overlay & edit not obtain newest data (#152) Co-authored-by: 0xJacky --- frontend/src/components/EnvIndicator/EnvIndicator.vue | 2 ++ frontend/src/components/StdDataDisplay/StdCurd.vue | 2 +- server/internal/analytic/node.go | 6 ++---- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/EnvIndicator/EnvIndicator.vue b/frontend/src/components/EnvIndicator/EnvIndicator.vue index 8bc8a44..ad8e819 100644 --- a/frontend/src/components/EnvIndicator/EnvIndicator.vue +++ b/frontend/src/components/EnvIndicator/EnvIndicator.vue @@ -76,6 +76,8 @@ watch(node_id, async () => { .env-name { max-width: 50px; + text-overflow: ellipsis; + white-space: nowrap; } .ant-tag { diff --git a/frontend/src/components/StdDataDisplay/StdCurd.vue b/frontend/src/components/StdDataDisplay/StdCurd.vue index 4d47361..d4a7a41 100644 --- a/frontend/src/components/StdDataDisplay/StdCurd.vue +++ b/frontend/src/components/StdDataDisplay/StdCurd.vue @@ -116,7 +116,7 @@ const ok = async () => { message.success($gettext('Save Successfully')) Object.assign(data, r) get_list() - + visible.value = false }).catch((e: any) => { message.error($gettext(e?.message ?? 'Server error'), 5) Object.assign(error, e.errors) diff --git a/server/internal/analytic/node.go b/server/internal/analytic/node.go index bf8671c..46cc429 100644 --- a/server/internal/analytic/node.go +++ b/server/internal/analytic/node.go @@ -57,11 +57,9 @@ func GetNode(env *model.Environment) (n *Node) { } n, ok := NodeMap[env.ID] if !ok { - n = &Node{ - Environment: env, - } + n = &Node{} } - + n.Environment = env return n }