From d7bf55bac6d0ef1ba89038504d01d81a6b206aad Mon Sep 17 00:00:00 2001 From: zhangjidi2016 <1017543663@qq.com> Date: Thu, 10 Jun 2021 12:48:18 +0800 Subject: [PATCH] [ISSUE #723] When the operation is successful, the dialog will close automatically (#724) --- src/main/resources/static/src/consumer.js | 2 ++ src/main/resources/static/src/topic.js | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/main/resources/static/src/consumer.js b/src/main/resources/static/src/consumer.js index 1521801..fef1f43 100644 --- a/src/main/resources/static/src/consumer.js +++ b/src/main/resources/static/src/consumer.js @@ -308,6 +308,7 @@ module.controller('deleteConsumerDialogController', ['$scope', 'ngDialog', '$htt }).success(function (resp) { if(resp.status ==0){ Notification.info({message: "delete success!", delay: 2000}); + ngDialog.close(this); }else { Notification.error({message: resp.errMsg, delay: 2000}); } @@ -327,6 +328,7 @@ module.controller('consumerModifyDialogController', ['$scope', 'ngDialog', '$htt }).success(function (resp) { if(resp.status ==0){ Notification.info({message: "update success!", delay: 2000}); + ngDialog.close(this); }else { Notification.error({message: resp.errMsg, delay: 2000}); } diff --git a/src/main/resources/static/src/topic.js b/src/main/resources/static/src/topic.js index 6459b98..ab1bf9a 100644 --- a/src/main/resources/static/src/topic.js +++ b/src/main/resources/static/src/topic.js @@ -364,6 +364,7 @@ module.controller('topicModifyDialogController', ['$scope', 'ngDialog', '$http', }).success(function (resp) { if(resp.status ==0){ Notification.info({message: "success!", delay: 2000}); + ngDialog.close(this); }else { Notification.error({message: resp.errMsg, delay: 2000}); } @@ -396,6 +397,7 @@ module.controller('consumerResetOffsetDialogController',['$scope', 'ngDialog', ' result:resp.data } }); + ngDialog.close(this); }else { Notification.error({message: resp.errMsg, delay: 2000}); } @@ -424,6 +426,7 @@ module.controller('skipMessageAccumulateDialogController',['$scope', 'ngDialog', result:resp.data } }); + ngDialog.close(this); }else { Notification.error({message: resp.errMsg, delay: 2000}); } @@ -452,6 +455,7 @@ module.controller('sendTopicMessageDialogController', ['$scope', 'ngDialog', '$h result:resp.data } }); + ngDialog.close(this); }else { Notification.error({message: resp.errMsg, delay: 2000}); }