You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by il...@apache.org on 2018/09/13 15:50:14 UTC
[incubator-dubbo-ops] branch develop updated (bdf66a8 -> 9381e3a)
This is an automated email from the ASF dual-hosted git repository.
iluo pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo-ops.git.
from bdf66a8 backend logic for routing rule
new 8db54cf enhance dialog
new bca94f8 Merge branch 'develop' of https://github.com/apache/incubator-dubbo-ops into develop
new 9381e3a enhane codemirror
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../src/components/RoutingRule.vue | 45 ++++++++++++++++------
1 file changed, 33 insertions(+), 12 deletions(-)
[incubator-dubbo-ops] 01/03: enhance dialog
Posted by il...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
iluo pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo-ops.git
commit 8db54cfe37f592d82bb0ad55791be9d8ca74e9ee
Author: beiwei30 <ia...@gmail.com>
AuthorDate: Thu Sep 13 23:37:50 2018 +0800
enhance dialog
---
.../src/components/RoutingRule.vue | 36 +++++++++++++++-------
1 file changed, 25 insertions(+), 11 deletions(-)
diff --git a/dubbo-admin-frontend/src/components/RoutingRule.vue b/dubbo-admin-frontend/src/components/RoutingRule.vue
index 10ff529..a12855c 100644
--- a/dubbo-admin-frontend/src/components/RoutingRule.vue
+++ b/dubbo-admin-frontend/src/components/RoutingRule.vue
@@ -70,23 +70,30 @@
</v-card>
</v-flex>
- <v-dialog v-model="dialog" width="450px" persistent >
+ <v-dialog v-model="dialog" full-width persistent>
<v-card>
<v-card-title class="justify-center">
- <span class="headline">Create new Routing rule</span>
+ <span class="headline">Create New Routing Rule</span>
</v-card-title>
<v-card-text >
<v-text-field
- placeholder="service:version, version is optional"
+ label="Service Unique ID"
+ hint="A service ID in form of service:version, version is optional"
required
v-model="service"
></v-text-field>
<v-text-field
- placeholder="application name"
+ label="Application Name"
+ hint="Application name the service belongs to"
required
v-model="application"
></v-text-field>
- <codemirror :placeholder='placeholder' :options="cmOption"></codemirror>
+
+ <v-subheader class="pa-0 mt-3">RULE CONTENT</v-subheader>
+ <codemirror ref="myCm"
+ :value="code"
+ :options="cmOption">
+ </codemirror>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
@@ -101,7 +108,9 @@
<script>
import { codemirror } from 'vue-codemirror'
import 'codemirror/lib/codemirror.css'
+ import 'codemirror/theme/paraiso-light.css'
import 'codemirror/mode/yaml/yaml.js'
+ import 'codemirror/addon/display/autorefresh.js'
import 'codemirror/addon/display/placeholder'
export default {
components: {
@@ -129,7 +138,7 @@
status: 'enabled'
}
],
- placeholder: '%yaml 1.2\n' +
+ code: '%yaml 1.2\n' +
'---\n' +
'enable: true/false\n' +
'priority:\n' +
@@ -142,11 +151,12 @@
' - host != 10.20.153.10,10.20.153.11 =>\n' +
' - host = 10.20.153.10,10.20.153.11 =>\n' +
' - application != kylin => host != 172.22.3.95,172.22.3.96\n' +
- ' - method = find*,list*,get*,is* => host = 172.22.3.94,172.22.3.95,172.22.3.96\n' +
- '...\n',
+ ' - method = find*,list*,get*,is* => host = 172.22.3.94,172.22.3.95,172.22.3.96',
cmOption: {
- lineNumbers: true,
- mode: 'text/x-yaml'
+ theme: 'paraiso-light',
+ autoRefresh: true,
+ mode: 'text/x-yaml',
+ line: true
},
headers: [
{
@@ -193,7 +203,11 @@
this.height = window.innerHeight * 0.5
}
},
-
+ computed: {
+ codemirror () {
+ return this.$refs.myCm.codemirror
+ }
+ },
created () {
this.setHeight()
}
[incubator-dubbo-ops] 03/03: enhane codemirror
Posted by il...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
iluo pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo-ops.git
commit 9381e3a459d37d81b973571cc1b9930f3ef839c9
Author: beiwei30 <ia...@gmail.com>
AuthorDate: Thu Sep 13 23:48:38 2018 +0800
enhane codemirror
---
dubbo-admin-frontend/src/components/RoutingRule.vue | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/dubbo-admin-frontend/src/components/RoutingRule.vue b/dubbo-admin-frontend/src/components/RoutingRule.vue
index 2d4b225..8e483c8 100644
--- a/dubbo-admin-frontend/src/components/RoutingRule.vue
+++ b/dubbo-admin-frontend/src/components/RoutingRule.vue
@@ -91,10 +91,9 @@
<v-subheader class="pa-0 mt-3">RULE CONTENT</v-subheader>
<codemirror ref="myCm"
- :value="code"
+ v-model="ruleText"
:options="cmOption">
</codemirror>
- <codemirror v-model='ruleText' :placeholder='placeholder' :options="cmOption"></codemirror>
</v-card-text>
<v-card-actions>
@@ -138,7 +137,6 @@
warn: false,
application: '',
service: '',
- ruleText: '',
warnTitle: '',
warnText: '',
currentId: 0,
@@ -177,7 +175,7 @@
status: 'enabled'
}
],
- code: '%yaml 1.2\n' +
+ ruleText: '%yaml 1.2\n' +
'---\n' +
'enable: true/false\n' +
'priority:\n' +
[incubator-dubbo-ops] 02/03: Merge branch 'develop' of
https://github.com/apache/incubator-dubbo-ops into develop
Posted by il...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
iluo pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo-ops.git
commit bca94f870f48c13c08394ee83a2453b7012ffb53
Merge: 8db54cf bdf66a8
Author: beiwei30 <ia...@gmail.com>
AuthorDate: Thu Sep 13 23:48:04 2018 +0800
Merge branch 'develop' of https://github.com/apache/incubator-dubbo-ops into develop
.../dubbo/admin/controller/RoutesController.java | 16 +-
.../dubbo/admin/controller/ServiceController.java | 6 +-
.../admin/web/mvc/governance/RoutesController.java | 1110 ++++++++++----------
.../src/components/RoutingRule.vue | 135 ++-
.../src/components/ServiceSearch.vue | 8 +
5 files changed, 688 insertions(+), 587 deletions(-)
diff --cc dubbo-admin-frontend/src/components/RoutingRule.vue
index a12855c,9747072..2d4b225
--- a/dubbo-admin-frontend/src/components/RoutingRule.vue
+++ b/dubbo-admin-frontend/src/components/RoutingRule.vue
@@@ -70,10 -70,10 +70,10 @@@
</v-card>
</v-flex>
- <v-dialog v-model="dialog" full-width persistent>
- <v-dialog v-model="dialog" width="450px" persistent >
++ <v-dialog v-model="dialog" width="800px" persistent >
<v-card>
<v-card-title class="justify-center">
- <span class="headline">Create new Routing rule</span>
+ <span class="headline">Create New Routing Rule</span>
</v-card-title>
<v-card-text >
<v-text-field
@@@ -88,12 -86,7 +88,14 @@@
required
v-model="application"
></v-text-field>
+
+ <v-subheader class="pa-0 mt-3">RULE CONTENT</v-subheader>
+ <codemirror ref="myCm"
+ :value="code"
+ :options="cmOption">
+ </codemirror>
+ <codemirror v-model='ruleText' :placeholder='placeholder' :options="cmOption"></codemirror>
++
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
@@@ -108,10 -112,9 +121,11 @@@
<script>
import { codemirror } from 'vue-codemirror'
import 'codemirror/lib/codemirror.css'
+ import 'codemirror/theme/paraiso-light.css'
import 'codemirror/mode/yaml/yaml.js'
+ import 'codemirror/addon/display/autorefresh.js'
import 'codemirror/addon/display/placeholder'
+ import {AXIOS} from './http-common'
export default {
components: {
codemirror
@@@ -121,24 -124,42 +135,49 @@@
pattern: 'Service',
filter: '',
dialog: false,
+ warn: false,
application: '',
service: '',
+ ruleText: '',
+ warnTitle: '',
+ warnText: '',
+ currentId: 0,
height: 0,
operations: [
- {icon: 'visibility', callback: 'viewItem(props.item)', tooltip: 'View'},
- {icon: 'edit', callback: 'editItem(props.item)', tooltip: 'Edit'},
- {icon: 'delete', callback: 'deleteItem(props.item)', tooltip: 'Delete'}
+ {id: 0,
+ icon: 'visibility',
+ tooltip: function (item) {
+ return 'View'
+ }},
+ {id: 1,
+ icon: 'edit',
+ tooltip: function (item) {
+ return 'Edit'
+ }},
+ {id: 2,
+ icon: 'block',
+ tooltip: function (item) {
+ if (item.enabled === true) {
+ return 'Disable'
+ }
+ return 'Enable'
+ }},
+ {id: 3,
+ icon: 'delete',
+ tooltip: function (item) {
+ return 'Delete'
+ }}
],
routingRules: [
+ {
+ id: 0,
+ rule: 'test',
+ service: 'com.alibaba.dubbo.com',
+ priority: 0,
+ status: 'enabled'
+ }
],
- placeholder: '%yaml 1.2\n' +
+ code: '%yaml 1.2\n' +
'---\n' +
'enable: true/false\n' +
'priority:\n' +
@@@ -200,17 -259,30 +277,35 @@@
},
setHeight: function () {
this.height = window.innerHeight * 0.5
+ },
+ deleteItem: function (id) {
+ AXIOS.get('/routes/delete?id=' + id)
+ .then(response => {
+ this.warn = false
+ })
}
},
-
+ computed: {
+ codemirror () {
+ return this.$refs.myCm.codemirror
+ }
+ },
created () {
this.setHeight()
+ },
+ mounted: function () {
+ let query = this.$route.query
+ let service = ''
+ Object.keys(query).forEach(function (key) {
+ if (key === 'serviceName') {
+ service = query[key]
+ }
+ })
+ if (service !== '') {
+ this.filter = service
+ this.search(service, false)
+ }
}
+
}
</script>