generated from root/miduo_server
修改2
parent
dd05dfe07e
commit
bba5494d83
|
|
@ -316,7 +316,9 @@ public class ServerInfoController {
|
||||||
String[] serverIds = serverId.split(",");
|
String[] serverIds = serverId.split(",");
|
||||||
|
|
||||||
String status = request.getParameter("status");
|
String status = request.getParameter("status");
|
||||||
int crossId = Integer.parseInt(request.getParameter("crossId"));
|
String crossIdStr = request.getParameter("crossId");
|
||||||
|
String patch = "[-]?[0-9]+?";
|
||||||
|
boolean matches = patch.matches(crossIdStr);
|
||||||
|
|
||||||
Map<String, ServerInfo> allServerMap = serverInfoDao.getAllServerMap();
|
Map<String, ServerInfo> allServerMap = serverInfoDao.getAllServerMap();
|
||||||
for (String id : serverIds) {
|
for (String id : serverIds) {
|
||||||
|
|
@ -333,9 +335,9 @@ public class ServerInfoController {
|
||||||
}
|
}
|
||||||
// 修改服务器信息
|
// 修改服务器信息
|
||||||
serverInfoDao.updateServerInfo(id, status);
|
serverInfoDao.updateServerInfo(id, status);
|
||||||
// 修改跨服id,小于0不做修改
|
// 修改跨服id,空或者非整数不做修改
|
||||||
if (crossId > 0){
|
if (matches){
|
||||||
updateGmGroupId(id,crossId);
|
updateGmGroupId(id,Integer.parseInt(crossIdStr));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@
|
||||||
<option th:each="server:${serverInfos}" th:if="${server.getStatus() != '-2'}" th:value="${server.getServer_id()}"
|
<option th:each="server:${serverInfos}" th:if="${server.getStatus() != '-2'}" th:value="${server.getServer_id()}"
|
||||||
th:text="${server.getServer_id()}+'-'+${server.getName()}"></option>
|
th:text="${server.getServer_id()}+'-'+${server.getName()}"></option>
|
||||||
</select>
|
</select>
|
||||||
<select name="status2" class="input-text" id="status2" title="服务器状态" style="width: 80px;"><!--下拉列表-->
|
<select name="status2" class="input-text" id="status2" title="服务器状态,请选择不会进行修改" style="width: 80px;"><!--下拉列表-->
|
||||||
<option value="-999">请选择</option>
|
<option value="-999">请选择</option>
|
||||||
<option value="0">关闭</option>
|
<option value="0">关闭</option>
|
||||||
<option value="1">维护</option>
|
<option value="1">维护</option>
|
||||||
|
|
@ -54,7 +54,7 @@
|
||||||
<option value="3">拥挤</option>
|
<option value="3">拥挤</option>
|
||||||
<option value="4">爆满</option>
|
<option value="4">爆满</option>
|
||||||
</select>
|
</select>
|
||||||
<input type="number" id="crossId2" style="width: 55px;" title="跨服id" value="0" class="input-text"/>
|
<input type="text" id="crossId2" style="width: 55px;" title="跨服id,不填写或者中文不会进行修改" class="input-text"/>
|
||||||
<button class="btn btn-primary" type="button" onclick="updateServers()">批量修改</button>
|
<button class="btn btn-primary" type="button" onclick="updateServers()">批量修改</button>
|
||||||
<div style="float: right">
|
<div style="float: right">
|
||||||
刷新服务器缓存:【<a href="/findServerInfoNotCache">刷新</a>】
|
刷新服务器缓存:【<a href="/findServerInfoNotCache">刷新</a>】
|
||||||
|
|
@ -193,7 +193,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除服务器列表
|
// 重启服务器列表
|
||||||
function restartServer(obj) {
|
function restartServer(obj) {
|
||||||
var serverId = $(obj).attr("id");
|
var serverId = $(obj).attr("id");
|
||||||
var msg = "请问是否要重启该服务器:{"+serverId+"},\n\n请确认!";
|
var msg = "请问是否要重启该服务器:{"+serverId+"},\n\n请确认!";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue