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

min pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo-admin.git


The following commit(s) were added to refs/heads/develop by this push:
     new db01794  forbid to set both service ID and application name
db01794 is described below

commit db01794e124166d8e9012c022cf0889f45e420cd
Author: nzomkxia <[email protected]>
AuthorDate: Thu Apr 25 21:32:21 2019 +0800

    forbid to set both service ID and application name
---
 dubbo-admin-ui/src/components/governance/AccessControl.vue | 4 ++++
 dubbo-admin-ui/src/components/governance/LoadBalance.vue   | 4 ++++
 dubbo-admin-ui/src/components/governance/Overrides.vue     | 4 ++++
 dubbo-admin-ui/src/components/governance/RoutingRule.vue   | 4 ++++
 dubbo-admin-ui/src/components/governance/WeightAdjust.vue  | 6 +++++-
 5 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/dubbo-admin-ui/src/components/governance/AccessControl.vue 
b/dubbo-admin-ui/src/components/governance/AccessControl.vue
index dc0245b..7104f11 100644
--- a/dubbo-admin-ui/src/components/governance/AccessControl.vue
+++ b/dubbo-admin-ui/src/components/governance/AccessControl.vue
@@ -397,6 +397,10 @@ export default {
         this.$notify.error('Either service or application is needed')
         return
       }
+      if (this.modal.service && this.modal.application) {
+        this.$notify.error('You can not set both service ID and application 
name')
+        return
+      }
       let vm = this
       let blackList = []
       let whiteList = []
diff --git a/dubbo-admin-ui/src/components/governance/LoadBalance.vue 
b/dubbo-admin-ui/src/components/governance/LoadBalance.vue
index 8a343ec..a2a5064 100644
--- a/dubbo-admin-ui/src/components/governance/LoadBalance.vue
+++ b/dubbo-admin-ui/src/components/governance/LoadBalance.vue
@@ -364,6 +364,10 @@
           this.$notify.error('Either service or application is needed')
           return
         }
+        if (this.service && this.application) {
+          this.$notify.error('You can not set both service ID and application 
name')
+          return
+        }
         let vm = this
         balancing.service = this.service
         balancing.application = this.application
diff --git a/dubbo-admin-ui/src/components/governance/Overrides.vue 
b/dubbo-admin-ui/src/components/governance/Overrides.vue
index 4bb78b7..71e3e72 100644
--- a/dubbo-admin-ui/src/components/governance/Overrides.vue
+++ b/dubbo-admin-ui/src/components/governance/Overrides.vue
@@ -321,6 +321,10 @@
           this.$notify.error('Either service or application is needed')
           return
         }
+        if (this.service && this.application) {
+          this.$notify.error('You can not set both service ID and application 
name')
+          return
+        }
         override.service = this.service
         override.application = this.application
         let vm = this
diff --git a/dubbo-admin-ui/src/components/governance/RoutingRule.vue 
b/dubbo-admin-ui/src/components/governance/RoutingRule.vue
index 13a7c7b..a9ea760 100644
--- a/dubbo-admin-ui/src/components/governance/RoutingRule.vue
+++ b/dubbo-admin-ui/src/components/governance/RoutingRule.vue
@@ -335,6 +335,10 @@
           this.$notify.error('Either service or application is needed')
           return
         }
+        if (this.service && this.application) {
+          this.$notify.error('You can not set both service ID and application 
name')
+          return
+        }
         let vm = this
         rule.service = this.service
         rule.application = this.application
diff --git a/dubbo-admin-ui/src/components/governance/WeightAdjust.vue 
b/dubbo-admin-ui/src/components/governance/WeightAdjust.vue
index 188fa7f..d96db0d 100644
--- a/dubbo-admin-ui/src/components/governance/WeightAdjust.vue
+++ b/dubbo-admin-ui/src/components/governance/WeightAdjust.vue
@@ -351,7 +351,11 @@
           this.$notify.error('Either service or application is needed')
           return
         }
-        weight.service = this.service
+        if (this.service && this.application) {
+          this.$notify.error('You can not set both service ID and application 
name')
+          return
+        }
+        weight.service = this.service;
         weight.application = this.application
         weight.weight = this.rule.weight
         weight.addresses = this.rule.address.split(',')

Reply via email to