Merge branch 'develop' into service-test
diff --git a/README.md b/README.md
index 9ed9950..bc68b72 100644
--- a/README.md
+++ b/README.md
@@ -12,6 +12,8 @@
![index](https://raw.githubusercontent.com/apache/incubator-dubbo-ops/develop/doc/images/index.png)
+### Service Governance
+service governance follows the version of Dubbo 2.7, and compatible for Dubbo 2.6, please refer to [here](https://github.com/apache/incubator-dubbo-ops/wiki/The-compatibility-of-service-governance)
### Frontend
- [Vue.js](https://vuejs.org) and [Vuetify](https://vuetifyjs.com)
diff --git a/README_ZH.md b/README_ZH.md
index f6879dc..625acfc 100644
--- a/README_ZH.md
+++ b/README_ZH.md
@@ -4,7 +4,7 @@
[![codecov](https://codecov.io/gh/apache/incubator-dubbo-ops/branch/develop/graph/badge.svg)](https://codecov.io/gh/apache/incubator-dubbo-ops)
![license](https://img.shields.io/github/license/apache/incubator-dubbo-ops.svg)
-English version goes [here](README.md).
+[English version](README.md).
### Demo地址
* http://47.91.207.147/#/service
* 该地址是`develop`分支的最新版本,在从源码构建之前,可以先尝试demo
@@ -12,6 +12,8 @@
![index](https://raw.githubusercontent.com/apache/incubator-dubbo-ops/develop/doc/images/index.png)
+### 服务治理
+服务治理的部分,按照Dubbo 2.7的格式进行配置,同时兼容Dubbo 2.6,详见[这里](https://github.com/apache/incubator-dubbo-ops/wiki/Dubbo-Admin%E6%9C%8D%E5%8A%A1%E6%B2%BB%E7%90%86%E5%85%BC%E5%AE%B9%E6%80%A7%E8%AF%B4%E6%98%8E)
### 前端部分
- 使用[Vue.js](https://vuejs.org)作为javascript框架,[Vuetify](https://vuetifyjs.com)作为UI框架
diff --git a/dubbo-admin-frontend/src/components/ServiceDetail.vue b/dubbo-admin-frontend/src/components/ServiceDetail.vue
index 3618c0c..544d556 100644
--- a/dubbo-admin-frontend/src/components/ServiceDetail.vue
+++ b/dubbo-admin-frontend/src/components/ServiceDetail.vue
@@ -236,7 +236,7 @@
Object.keys(meta).forEach(function (key) {
let item = {}
item.value = meta[key]
- item.name = key.charAt(0).toUpperCase() + key.substr(1)
+ item.name = vm.$t(key)
vm.basic.push(item)
})
}
diff --git a/dubbo-admin-frontend/src/components/ServiceSearch.vue b/dubbo-admin-frontend/src/components/ServiceSearch.vue
index 71c1156..293c6ce 100644
--- a/dubbo-admin-frontend/src/components/ServiceSearch.vue
+++ b/dubbo-admin-frontend/src/components/ServiceSearch.vue
@@ -104,7 +104,7 @@
:key="i"
:href='governanceHref(item.value, props.item.service, props.item.group, props.item.version)'
>
- <v-list-tile-title>{{ item.title }}</v-list-tile-title>
+ <v-list-tile-title>{{ $t(item.title) }}</v-list-tile-title>
</v-list-tile>
</v-list>
</v-menu>
@@ -127,22 +127,22 @@
{id: 2, title: 'app', value: 'application'}
],
options: [
- { title: 'Routing Rule',
+ { title: 'routingRule',
value: 'routingRule'
},
- { title: 'Tag Rule',
+ { title: 'tagRule',
value: 'tagRule'
},
- { title: 'Dynamic Config',
+ { title: 'dynamicConfig',
value: 'config'
},
- { title: 'Access Control',
+ { title: 'accessControl',
value: 'access'
},
- { title: 'Weight Adjust',
+ { title: 'weightAdjust',
value: 'weight'
},
- { title: 'Load Balance',
+ { title: 'loadBalance',
value: 'loadbalance'
}
],
@@ -159,7 +159,7 @@
}),
computed: {
queryBy () {
- return 'by ' + this.$t(this.items[this.selected].title)
+ return this.$t('by') + this.$t(this.items[this.selected].title)
},
hint () {
if (this.selected === 0) {
@@ -245,7 +245,7 @@
return '#/serviceDetail?' + query
},
governanceHref: function (type, service, group, version) {
- let base = '/#/governance/' + type
+ let base = '#/governance/' + type
let query = service
if (group !== null) {
query = group + '/' + query
diff --git a/dubbo-admin-frontend/src/components/governance/AccessControl.vue b/dubbo-admin-frontend/src/components/governance/AccessControl.vue
index 0b5f3c2..054cbc4 100644
--- a/dubbo-admin-frontend/src/components/governance/AccessControl.vue
+++ b/dubbo-admin-frontend/src/components/governance/AccessControl.vue
@@ -16,10 +16,8 @@
-->
<template>
- <v-container grid-list-xl
- fluid>
- <v-layout row
- wrap>
+ <v-container grid-list-xl fluid>
+ <v-layout row wrap>
<v-flex lg12>
<v-card flat color="transparent">
<v-card-text>
@@ -32,7 +30,7 @@
append-icon=""
hide-no-data
:suffix="queryBy"
- :label="$t('searchRoutingRule')"
+ :label="$t('searchAccessRule')"
></v-combobox>
<v-menu class="hidden-xs-only">
<v-btn slot="activator" large icon>
@@ -463,7 +461,7 @@
},
computed: {
queryBy () {
- return 'by ' + this.$t(this.items[this.selected].title)
+ return this.$t('by') + this.$t(this.items[this.selected].title)
}
},
watch: {
diff --git a/dubbo-admin-frontend/src/components/governance/LoadBalance.vue b/dubbo-admin-frontend/src/components/governance/LoadBalance.vue
index 6a1eb56..4d5d765 100644
--- a/dubbo-admin-frontend/src/components/governance/LoadBalance.vue
+++ b/dubbo-admin-frontend/src/components/governance/LoadBalance.vue
@@ -112,7 +112,7 @@
<v-dialog v-model="dialog" width="800px" persistent >
<v-card>
<v-card-title class="justify-center">
- <span class="headline">Create New LoadBalance Rule</span>
+ <span class="headline">{{$t('createNewLoadBalanceRule')}}</span>
</v-card-title>
<v-card-text >
<v-text-field
@@ -441,7 +441,7 @@
},
computed: {
queryBy () {
- return 'by ' + this.$t(this.items[this.selected].title)
+ return this.$t('by') + this.$t(this.items[this.selected].title)
}
},
watch: {
diff --git a/dubbo-admin-frontend/src/components/governance/Overrides.vue b/dubbo-admin-frontend/src/components/governance/Overrides.vue
index 9b51345..3861dfa 100644
--- a/dubbo-admin-frontend/src/components/governance/Overrides.vue
+++ b/dubbo-admin-frontend/src/components/governance/Overrides.vue
@@ -428,7 +428,7 @@
},
computed: {
queryBy () {
- return 'by ' + this.$t(this.items[this.selected].title)
+ return this.$t('by') + this.$t(this.items[this.selected].title)
}
},
watch: {
diff --git a/dubbo-admin-frontend/src/components/governance/RoutingRule.vue b/dubbo-admin-frontend/src/components/governance/RoutingRule.vue
index 97ef8cc..68bc7c0 100644
--- a/dubbo-admin-frontend/src/components/governance/RoutingRule.vue
+++ b/dubbo-admin-frontend/src/components/governance/RoutingRule.vue
@@ -436,7 +436,7 @@
},
computed: {
queryBy () {
- return 'by ' + this.$t(this.items[this.selected].title)
+ return this.$t('by') + this.$t(this.items[this.selected].title)
}
},
watch: {
diff --git a/dubbo-admin-frontend/src/components/governance/TagRule.vue b/dubbo-admin-frontend/src/components/governance/TagRule.vue
index 19242fe..e776576 100644
--- a/dubbo-admin-frontend/src/components/governance/TagRule.vue
+++ b/dubbo-admin-frontend/src/components/governance/TagRule.vue
@@ -155,7 +155,7 @@
]
},
submit: function () {
- this.filter = document.querySelector('#serviceSearch').value.trim()
+ this.filter = this.filter.trim()
this.search(this.filter, true)
},
search: function (filter, rewrite) {
diff --git a/dubbo-admin-frontend/src/components/governance/WeightAdjust.vue b/dubbo-admin-frontend/src/components/governance/WeightAdjust.vue
index 60515cd..1eccdf6 100644
--- a/dubbo-admin-frontend/src/components/governance/WeightAdjust.vue
+++ b/dubbo-admin-frontend/src/components/governance/WeightAdjust.vue
@@ -417,7 +417,7 @@
},
computed: {
queryBy () {
- return 'by ' + this.$t(this.items[this.selected].title)
+ return this.$t('by') + this.$t(this.items[this.selected].title)
}
},
watch: {
diff --git a/dubbo-admin-frontend/src/components/public/Toolbar.vue b/dubbo-admin-frontend/src/components/public/Toolbar.vue
index edb9143..66fdd35 100644
--- a/dubbo-admin-frontend/src/components/public/Toolbar.vue
+++ b/dubbo-admin-frontend/src/components/public/Toolbar.vue
@@ -28,8 +28,10 @@
hide-details
solo-inverted
prepend-inner-icon="search"
- :label="$t('search')"
+ :label="$t('serviceSearch')"
class="hidden-sm-and-down"
+ v-model="global"
+ @keyup.enter="submit"
>
</v-text-field>
@@ -96,6 +98,7 @@
name: 'toolbar',
data: () => ({
selectedLang: '',
+ global: '',
lang: [
'简体中文',
'English'
@@ -128,6 +131,15 @@
]
}),
methods: {
+ submit () {
+ if (window.location.href.includes('#/service')) {
+ window.location.href = '#/service?filter=' + this.global + '&pattern=service'
+ window.location.reload()
+ } else {
+ window.location.href = '#/service?filter=' + this.global + '&pattern=service'
+ }
+ this.global = ''
+ },
handleDrawerToggle () {
window.getApp.$emit('DRAWER_TOGGLED')
},
diff --git a/dubbo-admin-frontend/src/lang/en.js b/dubbo-admin-frontend/src/lang/en.js
index 0dd6d94..593206c 100644
--- a/dubbo-admin-frontend/src/lang/en.js
+++ b/dubbo-admin-frontend/src/lang/en.js
@@ -15,7 +15,8 @@
* limitations under the License.
*/
export default {
- serviceSearch: 'Service Search',
+ service: 'Service',
+ serviceSearch: 'Search service name',
serviceGovernance: 'Service Governance',
routingRule: 'Condition Rule',
tagRule: 'Tag Rule',
@@ -56,11 +57,13 @@
createNewTagRule: 'Create New Tag Rule',
createNewDynamicConfigRule: 'Create New Dynamic Config Rule',
createNewWeightRule: 'Create New Weight Rule',
+ createNewLoadBalanceRule: 'Create new load balancing rule',
serviceIdHint: 'Service ID',
view: 'View',
edit: 'Edit',
delete: 'Delete',
searchRoutingRule: 'Search Routing Rule',
+ searchAccess: 'Search Access Rule',
searchWeightRule: 'Search Weight Adjust Rule',
dataIdHint: 'A service ID in form of group/service:version, group and version are optional',
agree: 'Agree',
@@ -69,7 +72,7 @@
appNameHint: 'Application name the service belongs to',
basicInfo: 'BasicInfo',
metaData: 'MetaData',
- searchDubboService: 'Search Dubbo Services',
+ searchDubboService: 'Search Dubbo Services or applications',
serviceSearchHint: 'Service ID, org.apache.dubbo.demo.api.DemoService, * for all services',
ipSearchHint: 'Find all services provided by the target server on the specified IP address',
appSearchHint: 'Input an application name to find all services provided by one particular application, * for all',
@@ -96,5 +99,20 @@
metrics: 'Metrics will release later',
serviceTest: 'Service Test will release later',
serviceMock: 'Service Mock will release later'
+ },
+ by: 'by ',
+ $vuetify: {
+ dataIterator: {
+ rowsPerPageText: 'Items per page:',
+ rowsPerPageAll: 'All',
+ pageText: '{0}-{1} of {2}',
+ noResultsText: 'No matching records found',
+ nextPage: 'Next page',
+ prevPage: 'Previous page'
+ },
+ dataTable: {
+ rowsPerPageText: 'Rows per page:'
+ },
+ noDataText: 'No data available'
}
}
diff --git a/dubbo-admin-frontend/src/lang/zh.js b/dubbo-admin-frontend/src/lang/zh.js
index 85186ee..fc28529 100644
--- a/dubbo-admin-frontend/src/lang/zh.js
+++ b/dubbo-admin-frontend/src/lang/zh.js
@@ -15,6 +15,7 @@
* limitations under the License.
*/
export default {
+ service: '服务',
serviceSearch: '服务查询',
serviceGovernance: '服务治理',
routingRule: '条件路由',
@@ -56,11 +57,13 @@
createNewTagRule: '创建新标签规则',
createNewDynamicConfigRule: '创建新动态配置规则',
createNewWeightRule: '新建权重规则',
+ createNewLoadBalanceRule: '新建负载均衡规则',
serviceIdHint: '服务名',
view: '查看',
edit: '编辑',
delete: '删除',
searchRoutingRule: '搜索路由规则',
+ searchAccessRule: '搜索黑白名单',
searchWeightRule: '搜索权重调整规则',
dataIdHint: '组/服务:版本形式的服务ID,组和版本可选',
agree: '同意',
@@ -69,7 +72,7 @@
appNameHint: '服务所属的应用名称',
basicInfo: '基础信息',
metaData: '元数据',
- searchDubboService: '搜索Dubbo服务',
+ searchDubboService: '搜索Dubbo服务或应用',
serviceSearchHint: '服务ID, org.apache.dubbo.demo.api.DemoService, * 代表所有服务',
ipSearchHint: '在指定的IP地址上查找目标服务器提供的所有服务',
appSearchHint: '输入应用名称以查找由一个特定应用提供的所有服务, * 代表所有',
@@ -96,5 +99,20 @@
metrics: 'Metrics会在后续版本中发布,敬请期待',
serviceTest: '服务测试会在后续版本中发布,敬请期待',
serviceMock: '服务Mock会在后续版本中发布,敬请期待'
+ },
+ by: '按',
+ $vuetify: {
+ dataIterator: {
+ rowsPerPageText: '每页记录数:',
+ rowsPerPageAll: '全部',
+ pageText: '{0}-{1} 共 {2} 条',
+ noResultsText: '没有找到匹配记录',
+ nextPage: '下一页',
+ prevPage: '上一页'
+ },
+ dataTable: {
+ rowsPerPageText: '每页行数:'
+ },
+ noDataText: '无可用数据'
}
}
diff --git a/dubbo-admin-frontend/src/main.js b/dubbo-admin-frontend/src/main.js
index f323034..3a96519 100644
--- a/dubbo-admin-frontend/src/main.js
+++ b/dubbo-admin-frontend/src/main.js
@@ -27,7 +27,11 @@
import { AXIOS } from './components/http-common'
import i18n from './lang'
-Vue.use(Vuetify)
+Vue.use(Vuetify, {
+ lang: {
+ t: (key, ...params) => i18n.t(key, params)
+ }
+})
Vue.use(Notify)
Vue.prototype.$axios = AXIOS