You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by de...@apache.org on 2024/03/13 06:53:22 UTC

(shenyu-dashboard) branch master updated: Optimize alarm form, when there is only one label, do not display delete button (#394)

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

dengliming pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shenyu-dashboard.git


The following commit(s) were added to refs/heads/master by this push:
     new 7dcbfee8 Optimize alarm form, when there is only one label, do not display delete button (#394)
7dcbfee8 is described below

commit 7dcbfee833a6d1e4f0fdb56b26dc2f48135f33d3
Author: Kerwin Bryant <ke...@qq.com>
AuthorDate: Wed Mar 13 14:53:18 2024 +0800

    Optimize alarm form, when there is only one label, do not display delete button (#394)
    
    * Optimize alarm form, when there is only one label, do not display delete button
    
    * fix lint error
---
 src/routes/System/Alert/AddModal.js | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/routes/System/Alert/AddModal.js b/src/routes/System/Alert/AddModal.js
index 83418cff..b95a74bc 100644
--- a/src/routes/System/Alert/AddModal.js
+++ b/src/routes/System/Alert/AddModal.js
@@ -223,6 +223,7 @@ class AddModal extends Component {
                       >
                         {getIntlContent("SHENYU.SYSTEM.ALERT.LABELS.ADD")}
                       </div>
+                      {labelList.length !== 1 && (
                       <span
                         className="edit"
                         style={{ marginLeft: 10 }}
@@ -239,6 +240,7 @@ class AddModal extends Component {
                       >
                         {getIntlContent("SHENYU.SYSTEM.ALERT.LABELS.DELETE")}
                       </span>
+)}
                     </Col>
                   </Row>
             ))}