资源静态化、节点版本简单

This commit is contained in:
jiangzeyin 2019-04-28 16:33:50 +08:00
parent 2dcc052608
commit 98adf19ceb
8 changed files with 41 additions and 5 deletions

View File

@ -4,12 +4,13 @@
### 新增功能
1. 新增线程列表监控(感谢@其锋)
2. 新增节点脚本模板(感谢@其锋)
1. 【Agent】新增线程列表监控(感谢@其锋)
2. 【Agent】新增节点脚本模板(感谢@其锋)
### 解决BUG、优化功能
1. 【Server】节点首页右上角管理路径错误(感谢@其锋)
2. 【Server】查看用户操作日志支持筛选用户
-----------------------------------------------------------

View File

@ -1,10 +1,12 @@
package cn.keepbx.jpom.controller.node;
import cn.hutool.core.util.StrUtil;
import cn.jiangzeyin.common.JsonMessage;
import cn.keepbx.jpom.common.BaseServerController;
import cn.keepbx.jpom.common.forward.NodeForward;
import cn.keepbx.jpom.common.forward.NodeUrl;
import cn.keepbx.jpom.model.data.NodeModel;
import cn.keepbx.jpom.model.data.UserModel;
import cn.keepbx.jpom.model.system.JpomManifest;
import cn.keepbx.jpom.service.node.NodeService;
import org.springframework.http.MediaType;
@ -37,7 +39,7 @@ public class NodeIndexController extends BaseServerController {
}
@RequestMapping(value = "index.html", method = RequestMethod.GET, produces = MediaType.TEXT_HTML_VALUE)
public String index(String nodeId) {
public String index() {
List<NodeModel> nodeModels = nodeService.list();
setAttribute("array", nodeModels);
//
@ -45,6 +47,14 @@ public class NodeIndexController extends BaseServerController {
JpomManifest jpomManifest = NodeForward.toObj(jsonMessage, JpomManifest.class);
setAttribute("jpomManifest", jpomManifest);
setAttribute("installed", jsonMessage.getCode() == 200);
UserModel userModel = getUser();
// 版本提示
if (!JpomManifest.getInstance().isDebug() && jpomManifest != null && userModel.isSystemUser()) {
JpomManifest thisInfo = JpomManifest.getInstance();
if (!StrUtil.equals(jpomManifest.getVersion(), thisInfo.getVersion())) {
setAttribute("tipUpdate", true);
}
}
return "node/index";
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
<script src="//cdn.staticfile.org/js-sha1/0.6.0/sha1.min.js?v=$staticCacheTime"></script>
<script src="$!jpomProxyPath/static/js/sha1.min.js?v=$staticCacheTime"></script>
<script type="text/javascript">
## 格式化密码加密
function formatPwd(data, key) {

View File

@ -210,6 +210,10 @@
title: toFile + ' - 文件',
});
}
#if($tipUpdate)
layer.alert("当前节点和服务端版本不一致,请检查更新")
#end
}
</script>

View File

@ -51,7 +51,7 @@
width: 100%;
}
</style>
<script src="//echarts.baidu.com/dist/echarts.js?v=$staticCacheTime"></script>
<script src="$!jpomProxyPath/static/js/echarts.min.js?v=$staticCacheTime"></script>
</head>
<body>
<form action="" class="layui-form" id="form">

View File

@ -1,3 +1,4 @@
import cn.hutool.core.util.CharsetUtil;
import cn.hutool.core.util.ReUtil;
import java.util.regex.Pattern;
@ -19,5 +20,7 @@ public class TestString {
System.out.println(Math.pow(1024, 2));
System.out.println(Integer.MAX_VALUE);
System.out.println(CharsetUtil.defaultCharset());
}
}