Browse Source

Merge pull request #229 from samz406/dev

提示信息不准确
pull/2/head
bao liang 6 years ago committed by GitHub
parent
commit
ececcbdb91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      escheduler-api/src/main/java/cn/escheduler/api/service/ResourcesService.java
  2. 4
      escheduler-ui/src/js/module/i18n/locale/zh_CN.js

12
escheduler-api/src/main/java/cn/escheduler/api/service/ResourcesService.java

@ -701,17 +701,19 @@ public class ResourcesService extends BaseService {
if (checkAdmin(loginUser, result)) {
return result;
}
List<Resource> resourceList = resourcesMapper.queryResourceExceptUserId(userId);
Set<Resource> resourceSet = null;
List<Object> list ;
if (resourceList != null && resourceList.size() > 0) {
resourceSet = new HashSet<>(resourceList);
Set<Resource> resourceSet = new HashSet<>(resourceList);
List<Resource> authedResourceList = resourcesMapper.queryAuthorizedResourceList(userId);
getAuthorizedResourceList(resourceSet, authedResourceList);
list = new ArrayList<>(resourceSet);
}else {
list = new ArrayList<>(0);
}
result.put(Constants.DATA_LIST, new ArrayList<>(resourceSet));
result.put(Constants.DATA_LIST, list);
putMsg(result,Status.SUCCESS);
return result;
}

4
escheduler-ui/src/js/module/i18n/locale/zh_CN.js

@ -130,7 +130,7 @@ export default {
'Please enter database name': '请输入数据库名',
'jdbc connect parameters': 'jdbc连接参数',
'Test Connect': '测试连接',
'Please enter resource name': '请输入源名称',
'Please enter resource name': '请输入数据源名称',
'Please enter IP/hostname': '请输入IP/主机名',
'jdbc connection parameters is not a correct JSON format': 'jdbc连接参数不是一个正确的JSON格式',
'#': '编号',
@ -419,7 +419,7 @@ export default {
'Create token': '创建令牌',
'Edit token': '编辑令牌',
'Please enter the IP address separated by commas': '请输入IP地址多个用逗号隔开',
'Note: Multiple IP addresses have been comma separated': '注意多个IP地址逗号分割',
'Note: Multiple IP addresses have been comma separated': '注意多个IP地址逗号分割',
'Failure time': '失效时间',
'User': '用户',
'Please enter token': '请输入令牌',

Loading…
Cancel
Save