From 58879c7dcf2bc27469ebcf34ebbe6a0f8bc48feb Mon Sep 17 00:00:00 2001 From: "Cheko.R" Date: Sun, 1 Sep 2019 21:33:16 +0800 Subject: [PATCH] bug fixed and support for properies file type editing (#680) * make the edit button of the properties file clickable * bug fixed - Service Management only shows one device status * bug fixed, the master server cannot be validated at startup because parameters 'masterZNode' are not initialized --- .../main/java/cn/escheduler/common/zk/AbstractZKClient.java | 3 +++ .../home/pages/resource/pages/file/pages/_source/common.js | 2 +- .../pages/resource/pages/file/pages/details/_source/utils.js | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/escheduler-common/src/main/java/cn/escheduler/common/zk/AbstractZKClient.java b/escheduler-common/src/main/java/cn/escheduler/common/zk/AbstractZKClient.java index dff9337ae4..aa88d8e2c5 100644 --- a/escheduler-common/src/main/java/cn/escheduler/common/zk/AbstractZKClient.java +++ b/escheduler-common/src/main/java/cn/escheduler/common/zk/AbstractZKClient.java @@ -344,9 +344,12 @@ public abstract class AbstractZKClient { String parentPath = getZNodeParentPath(zkNodeType); List masterServers = new ArrayList<>(); + int i = 0; for(String path : masterMap.keySet()){ MasterServer masterServer = ResInfo.parseHeartbeatForZKInfo(masterMap.get(path)); masterServer.setZkDirectory( parentPath + "/"+ path); + masterServer.setId(i); + i ++; masterServers.add(masterServer); } return masterServers; diff --git a/escheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/_source/common.js b/escheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/_source/common.js index 9079b334c1..8e534f9237 100644 --- a/escheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/_source/common.js +++ b/escheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/_source/common.js @@ -18,6 +18,6 @@ /** * Create file type */ -let filtTypeArr = ['txt', 'log', 'sh', 'conf', 'cfg', 'py', 'java', 'sql', 'xml', 'hql'] +let filtTypeArr = ['txt', 'log', 'sh', 'conf', 'cfg', 'py', 'java', 'sql', 'xml', 'hql', 'properties'] export { filtTypeArr } diff --git a/escheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/details/_source/utils.js b/escheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/details/_source/utils.js index 4fcbe832bc..b317d6ff2e 100644 --- a/escheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/details/_source/utils.js +++ b/escheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/details/_source/utils.js @@ -28,7 +28,8 @@ const handlerSuffix = { '.java': 'textile', '.sql': 'sql', '.hql': 'sql', - '.xml': 'xml' + '.xml': 'xml', + '.properties': 'textile' }