You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2020/07/23 08:13:00 UTC
[shardingsphere-elasticjob-ui] 28/44: Revise connected tips
This is an automated email from the ASF dual-hosted git repository.
zhangyonglun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere-elasticjob-ui.git
commit dfd5d045ab9147477a9a8a73a8b6bd54b505c503
Author: menghaoranss <lo...@163.com>
AuthorDate: Tue Jul 21 16:46:41 2020 +0800
Revise connected tips
---
.../elasticjob/ui/web/controller/RegistryCenterController.java | 4 ++--
shardingsphere-elasticjob-ui-frontend/src/lang/zh-CN.js | 2 +-
.../src/views/data-source/module/dataSource.vue | 2 +-
.../src/views/registry-center/api.js | 6 ++----
.../src/views/registry-center/module/registryCenter.vue | 4 ++--
5 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/shardingsphere-elasticjob-ui-backend/src/main/java/org/apache/shardingsphere/elasticjob/ui/web/controller/RegistryCenterController.java b/shardingsphere-elasticjob-ui-backend/src/main/java/org/apache/shardingsphere/elasticjob/ui/web/controller/RegistryCenterController.java
index 15c57ef..dce36bf 100644
--- a/shardingsphere-elasticjob-ui-backend/src/main/java/org/apache/shardingsphere/elasticjob/ui/web/controller/RegistryCenterController.java
+++ b/shardingsphere-elasticjob-ui-backend/src/main/java/org/apache/shardingsphere/elasticjob/ui/web/controller/RegistryCenterController.java
@@ -58,8 +58,8 @@ public final class RegistryCenterController {
* @return registry center is activated or not
*/
@GetMapping("/activated")
- public boolean activated() {
- return regCenterService.loadActivated().isPresent();
+ public ResponseResult<RegistryCenterConfiguration> activated() {
+ return ResponseResultUtil.build(regCenterService.loadActivated().get());
}
/**
diff --git a/shardingsphere-elasticjob-ui-frontend/src/lang/zh-CN.js b/shardingsphere-elasticjob-ui-frontend/src/lang/zh-CN.js
index 3acdf64..24d69c6 100644
--- a/shardingsphere-elasticjob-ui-frontend/src/lang/zh-CN.js
+++ b/shardingsphere-elasticjob-ui-frontend/src/lang/zh-CN.js
@@ -123,7 +123,7 @@ export default {
table: {
operate: '操作',
operateConnect: '连接',
- operateConnected: '已激活',
+ operateConnected: '已连接',
operateDel: '删除',
operateEdit: '编辑'
},
diff --git a/shardingsphere-elasticjob-ui-frontend/src/views/data-source/module/dataSource.vue b/shardingsphere-elasticjob-ui-frontend/src/views/data-source/module/dataSource.vue
index 10ccf74..e64fd32 100644
--- a/shardingsphere-elasticjob-ui-frontend/src/views/data-source/module/dataSource.vue
+++ b/shardingsphere-elasticjob-ui-frontend/src/views/data-source/module/dataSource.vue
@@ -44,7 +44,7 @@
placement="top"
>
<el-button
- type="primary"
+ :type="scope.row.activated ? 'success' : 'primary'"
icon="el-icon-link"
size="small"
:disabled="isGuest"
diff --git a/shardingsphere-elasticjob-ui-frontend/src/views/registry-center/api.js b/shardingsphere-elasticjob-ui-frontend/src/views/registry-center/api.js
index 43147ec..db972ca 100644
--- a/shardingsphere-elasticjob-ui-frontend/src/views/registry-center/api.js
+++ b/shardingsphere-elasticjob-ui-frontend/src/views/registry-center/api.js
@@ -21,8 +21,6 @@ export default {
getRegCenter: (params = {}) => API.get(`/api/registry-center/load`, params),
deleteRegCenter: (params = {}) => API.delete(`/api/registry-center`, params),
postRegCenter: (params = {}) => API.post(`/api/registry-center/add`, params),
- getRegCenterActivated: (params = {}) => API.get(`/api/reg-center/activated`, params),
- postRegCenterConnect: (params = {}) => API.post(`/api/registry-center/connect`, params),
- updateRegCenter: (params = {}) => API.post(`/api/reg-center/update`, params)
-
+ getRegCenterActivated: (params = {}) => API.get(`/api/registry-center/activated`, params),
+ postRegCenterConnect: (params = {}) => API.post(`/api/registry-center/connect`, params)
}
diff --git a/shardingsphere-elasticjob-ui-frontend/src/views/registry-center/module/registryCenter.vue b/shardingsphere-elasticjob-ui-frontend/src/views/registry-center/module/registryCenter.vue
index 338dea2..2c308ba 100644
--- a/shardingsphere-elasticjob-ui-frontend/src/views/registry-center/module/registryCenter.vue
+++ b/shardingsphere-elasticjob-ui-frontend/src/views/registry-center/module/registryCenter.vue
@@ -44,7 +44,7 @@
placement="top"
>
<el-button
- type="primary"
+ :type="scope.row.activated ? 'success' : 'primary'"
icon="el-icon-link"
size="small"
:disabled="isGuest"
@@ -209,7 +209,7 @@ export default {
this.cloneTableData = clone(res.model)
this.tableData = data.splice(0, this.pageSize)
})
- //this.getRegCenterActivated()
+ this.getRegCenterActivated()
},
getRegCenterActivated() {
API.getRegCenterActivated().then(res => {