You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by li...@apache.org on 2023/05/19 02:09:12 UTC
[dubbo-admin] branch refactor-with-go updated: fix: After the conditional path is successfully created, the popup window does not close automatically (#1128)
This is an automated email from the ASF dual-hosted git repository.
liujun pushed a commit to branch refactor-with-go
in repository https://gitbox.apache.org/repos/asf/dubbo-admin.git
The following commit(s) were added to refs/heads/refactor-with-go by this push:
new 3a1f2749 fix: After the conditional path is successfully created, the popup window does not close automatically (#1128)
3a1f2749 is described below
commit 3a1f2749864e85f323f5c11d7780fe1eb96c745d
Author: SDUWYS <91...@users.noreply.github.com>
AuthorDate: Fri May 19 10:09:04 2023 +0800
fix: After the conditional path is successfully created, the popup window does not close automatically (#1128)
---
.../src/components/governance/RoutingRule.vue | 42 ++++++++++++----------
1 file changed, 23 insertions(+), 19 deletions(-)
diff --git a/dubbo-admin-ui/src/components/governance/RoutingRule.vue b/dubbo-admin-ui/src/components/governance/RoutingRule.vue
index 04d3c666..7e5476b0 100644
--- a/dubbo-admin-ui/src/components/governance/RoutingRule.vue
+++ b/dubbo-admin-ui/src/components/governance/RoutingRule.vue
@@ -254,6 +254,7 @@ export default {
'enabled: true\n' +
'runtime: false\n' +
'force: true\n' +
+ 'ConfigVersion:\n' +
'conditions:\n' +
' - \'=> host != 172.22.3.91\'\n',
ruleText: '',
@@ -318,21 +319,21 @@ export default {
if (this.timerID) {
clearTimeout(this.timerID)
}
- // Simulated ajax query
- this.timerID = setTimeout(() => {
- if (v && v.length >= 4) {
- this.searchLoading = true
- if (this.selected === 0) {
- this.typeAhead = this.$store.getters.getServiceItems(v)
- } else if (this.selected === 1) {
- this.typeAhead = this.$store.getters.getConsumerItems(v)
- }
- this.searchLoading = false
- this.timerID = null
- } else {
- this.typeAhead = []
- }
- }, 500)
+ // // Simulated ajax query
+ // this.timerID = setTimeout(() => {
+ // if (v && v.length >= 4) {
+ // this.searchLoading = true
+ // if (this.selected === 0) {
+ // this.typeAhead = this.$store.getters.getServiceItems(v)
+ // } else if (this.selected === 1) {
+ // this.typeAhead = this.$store.getters.getConsumerItems(v)
+ // }
+ // this.searchLoading = false
+ // this.timerID = null
+ // } else {
+ // this.typeAhead = []
+ // }
+ // }, 500)
},
submit: function () {
this.filter = document.querySelector('#serviceSearch').value.trim()
@@ -372,9 +373,9 @@ export default {
this.$axios.get(url)
.then(response => {
if (this.selected === 0) {
- this.serviceRoutingRules = response.data
+ this.serviceRoutingRules = response.data.data
} else {
- this.appRoutingRules = response.data
+ this.appRoutingRules = response.data.data
}
if (rewrite) {
if (this.selected === 0) {
@@ -450,7 +451,8 @@ export default {
} else {
this.$axios.post('/rules/route/condition/', rule)
.then(response => {
- if (response.status === 201) {
+ console.log(response)
+ if (response.status === 200) {
if (vm.service) {
vm.selected = 0
vm.search(vm.service, true)
@@ -467,7 +469,9 @@ export default {
.catch(error => {
console.log(error)
})
- }
+ };
+ document.querySelector('#serviceSearch').value = this.service
+ this.submit()
},
itemOperation: function (icon, item) {
const itemId = item.id