未验证 提交 e01b96d1 编写于 作者: E easyscheduler 提交者: GitHub

Merge pull request #629 from lenboo/dev-1.1.0

update i18n, delete zk links 
......@@ -24,7 +24,6 @@ import cn.escheduler.dao.model.MasterServer;
import cn.escheduler.dao.model.MonitorRecord;
import cn.escheduler.dao.model.User;
import cn.escheduler.dao.model.ZookeeperRecord;
import org.apache.hadoop.mapred.Master;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
......@@ -65,7 +64,7 @@ public class MonitorService extends BaseService{
Map<String, Object> result = new HashMap<>(5);
List<MasterServer> masterServers = new ZookeeperMonitor().getMasterServers();
List<MasterServer> masterServers = getServerList(true);
result.put(Constants.DATA_LIST, masterServers);
putMsg(result,Status.SUCCESS);
......@@ -99,11 +98,25 @@ public class MonitorService extends BaseService{
public Map<String,Object> queryWorker(User loginUser) {
Map<String, Object> result = new HashMap<>(5);
List<MasterServer> workerServers = new ZookeeperMonitor().getWorkerServers();
List<MasterServer> workerServers = getServerList(false);
result.put(Constants.DATA_LIST, workerServers);
putMsg(result,Status.SUCCESS);
return result;
}
private List<MasterServer> getServerList(boolean isMaster){
List<MasterServer> servers = new ArrayList<>();
ZookeeperMonitor zookeeperMonitor = null;
try{
zookeeperMonitor = new ZookeeperMonitor();
servers = zookeeperMonitor.getServers(isMaster);
}catch (Exception e){
throw e;
}finally {
if(zookeeperMonitor != null){
zookeeperMonitor.close();
}
}
return servers;
}
}
......@@ -31,7 +31,7 @@
<form-tenant v-model="tenantId"></form-tenant>
</div>
<div class="title" style="padding-top: 6px;">
<span>超时告警</span>
<span class="text-b">{{$t('warning of timeout')}}</span>
<span style="padding-left: 6px;">
<x-switch v-model="checkedTimeout"></x-switch>
</span>
......
......@@ -462,7 +462,7 @@ export default {
'process number of waiting for running': 'process number of waiting for running',
'failure command number': 'failure command number',
'tasks number of waiting running': 'tasks number of waiting running',
'task number of ready to kill': '待杀死任务数',
'task number of ready to kill': 'task number of ready to kill',
'Statistics manage': 'Statistics manage',
'statistics': 'statistics',
'select tenant':'select tenant',
......@@ -470,5 +470,6 @@ export default {
'The start time must not be the same as the end': 'The start time must not be the same as the end',
'Startup parameter': 'Startup parameter',
'Startup type': 'Startup type',
'warning of timeout': 'warning of timeout',
'Complement range': 'Complement range'
}
......@@ -471,5 +471,6 @@ export default {
'The start time must not be the same as the end': '开始时间和结束时间不能相同',
'Startup parameter': '启动参数',
'Startup type': '启动类型',
'warning of timeout': '超时告警',
'Complement range': '补数范围'
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册