You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

189 lines
5.8 KiB

<%@page import="org.wdk.module.auth.mount.bean.BaseSessionUser"%>
<%@page import="org.wdk.WDK"%>
<%@page import="org.wdk.module.auth.source.bean.TokenBean"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
BaseSessionUser su = WDK.getSessionUser(request, response);
if(null==su){
su = new BaseSessionUser();
}
String WDK_ROOT = WDKCore.WDK_ROOT;
String RSS_ROOT = WDK_ROOT +"/"+WDKConstant.Theme+"/"+WDKCore.THEME;
String commonURL = "/"+RSS_ROOT+"/module/public/common.jsp";
%>
<!DOCTYPE html>
<%@page import="org.wdk.WDKConstant"%>
<%@page import="org.wdk.WDKCore"%>
<html>
<head>
<base href="<%=basePath%>" target="_self">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>集群管理</title>
<script type="text/javascript" src="<%=RSS_ROOT%>/core/js/wdk.js"></script>
<script type="text/javascript">
<% if(null==su){%>
$.timeout();
//alert("登录超时,请重新登录!");
//$.getRoot().document.location.href = $.base()+"/console.jsp";
<%}%>
var _gridcode = "wdk.module.console.system.cluster.clustergrid";
var _gridid = 'layout_grid';
window.onload = function(){
//测试WQL与工作流的事务一致性
$.cuajax({
url: 'wdk?action=wdk.public&method=wftest&ajaxparam='+new Date().getTime(),
method:"post",
timeout:WDK_Timeout,
data:{},
success:function(result) {
alert(result);
},
error:function(result){
alert('网络错误!result='+result);
}
});
return false;
_gridid = $.grid({
containerid:_gridid,
gridcode:_gridcode,
fit: true,//自动大小
url:'wdk?action=wdk.public&method=cluster_load&ajaxparam='+new Date().getTime(),
idField:'nodeid'
});
};
function _handler_click(type,mgcode){
switch(type){
case 'edit':
break;
default:
break;
}
}
//新增一行
function _append(){
$("#dlg_nodeid").val('');
$("#dlg_nodename").val('');
$("#dlg_nodeip").val('');
$("#dlg_nodeport").val('');
$("#dlg_nodeurl").val('');
$("#dlg_remark").val('');
$('#dlg').dialog('open');
}
function _addnew(){
$('#dlg').dialog('close');
var _data = {
nodeid:$("#dlg_nodeid").val(),
nodename:$("#dlg_nodename").val(),
nodeip:$("#dlg_nodeip").val(),
nodeport:$("#dlg_nodeport").val(),
nodeurl:$("#dlg_nodeurl").val(),
remark:$("#dlg_remark").val()
};
$.cuajax({
url: 'wdk?action=wdk.public&method=cluster_add&ajaxparam='+new Date().getTime(),
method:"post",
timeout:WDK_Timeout,
data:_data,
success:function(result) {
var jres = $.str2json(result);
$.grid_reload({id:_gridid});
alert(jres.desc);
},
error:function(result){
alert('网络错误!result='+result);
}
});
}
//保存提交
function _update(){
var jrows = $.grid_getData({id:_gridid});
//保存提交
var _data = [
{name:"jrows",value:$.json2str(jrows)}
];
$.cuajax({
url: 'wdk?action=wdk.public&method=gridmanager_update&ajaxparam='+new Date().getTime(),
method:"post",
timeout:WDK_Timeout,
data:_data,
success:function(result) {
var jres = $.str2json(result);
alert(jres.desc);
$.grid_reload({id:_gridid});
},
error:function(result){
alert('网络错误!result='+result);
}
});
}
</script>
</head>
<body class="easyui-layout" data-options="fit:true" style="padding:0px;margin:0px;background-color:#FF0000;">
<div id="layout_grid" data-options="region:'center',border:false,collapsed:false" style="overflow:hidden;border:1px solid #ddd;" >
</div>
<div id="layout_grid_toolbar" data-options="region:'north',border:false,collapsed:false" style="height:30px;overflow:hidden;border:1px solid #ddd;text-align:left;" >
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="_append()">新增</a>
</div>
<div id="dlg" class="easyui-dialog" style="width:300px;height:250px;padding:10px 10px;overflow:hidden;" title="新增grid" closed="true" buttons="#dlg-buttons">
<fieldset>
<table class="condi_tb" cellpadding="0" cellspacing="0">
<tr>
<td class="condi_tdlbl">节点标识</td>
<td class="condi_tdipt">
<input id="dlg_nodeid" name="dlg_nodeid" class="txt" style="width:200px" required="true">
</td>
</tr>
<tr>
<td class="condi_tdlbl">节点名称</td>
<td class="condi_tdipt">
<input id="dlg_nodename" name="dlg_nodename" class="txt" style="width:200px" required="true">
</td>
</tr>
<tr>
<td class="condi_tdlbl">节点IP</td>
<td class="condi_tdipt">
<input id="dlg_nodeip" name="dlg_nodeip" class="txt" style="width:200px" required="true">
</td>
</tr>
<tr>
<td class="condi_tdlbl">节点port</td>
<td class="condi_tdipt">
<input id="dlg_nodeport" name="dlg_nodeport" class="txt" style="width:200px" required="true">
</td>
</tr>
<tr>
<td class="condi_tdlbl">节点url</td>
<td class="condi_tdipt">
<input id="dlg_nodeurl" name="dlg_nodeurl" class="txt" style="width:200px" required="true">
</td>
</tr>
<tr>
<td class="condi_tdlbl">备注</td>
<td class="condi_tdipt">
<input id="dlg_remark" name="dlg_remark" class="txt" style="width:200px" required="true">
</td>
</tr>
</table>
</fieldset>
</div>
<div id="dlg-buttons">
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" onclick="_addnew()">确定</a>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#dlg').dialog('close')">关闭</a>
</div>
</body>
</html>