|
@@ -22,6 +22,7 @@
|
|
|
<div id="runtimePanel" class="tab-pane">
|
|
<div id="runtimePanel" class="tab-pane">
|
|
|
<div style="margin-bottom:8px">
|
|
<div style="margin-bottom:8px">
|
|
|
<button type="button" class="btn btn-sm btn-primary" onclick="$('#runtimeGrid').trigger('reloadGrid')"><i class="fa fa-refresh"></i> 刷新</button>
|
|
<button type="button" class="btn btn-sm btn-primary" onclick="$('#runtimeGrid').trigger('reloadGrid')"><i class="fa fa-refresh"></i> 刷新</button>
|
|
|
|
|
+ <button type="button" class="btn btn-sm btn-default" id="btnShowOffline"><i class="fa fa-eye"></i> 显示离线</button>
|
|
|
<span style="color:#888;margin-left:8px;font-size:12px">列表每次切到本页也会自动刷新</span>
|
|
<span style="color:#888;margin-left:8px;font-size:12px">列表每次切到本页也会自动刷新</span>
|
|
|
</div>
|
|
</div>
|
|
|
<table id="runtimeGrid"></table><div id="runtimeGridPage"></div>
|
|
<table id="runtimeGrid"></table><div id="runtimeGridPage"></div>
|
|
@@ -57,6 +58,7 @@ window.addEventListener('storage', function(e){
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
// —— 客户端监控 grid ——
|
|
// —— 客户端监控 grid ——
|
|
|
|
|
+var showOffline = false;
|
|
|
function pad2(n){return (n<10?'0':'')+n;}
|
|
function pad2(n){return (n<10?'0':'')+n;}
|
|
|
function heartbeatCell(v){
|
|
function heartbeatCell(v){
|
|
|
if(!v) return '<span class="label label-default">未知</span>';
|
|
if(!v) return '<span class="label label-default">未知</span>';
|
|
@@ -73,6 +75,7 @@ function heartbeatCell(v){
|
|
|
|
|
|
|
|
$('#runtimeGrid').dataGrid({
|
|
$('#runtimeGrid').dataGrid({
|
|
|
url: '${ctx}/mes/clientRuntime/listData',
|
|
url: '${ctx}/mes/clientRuntime/listData',
|
|
|
|
|
+ postData: {showOffline: 'false'},
|
|
|
// 与版本发布列表使用相同的分页配置,容器由 dataGrid 按表格 ID 自动匹配
|
|
// 与版本发布列表使用相同的分页配置,容器由 dataGrid 按表格 ID 自动匹配
|
|
|
columnModel: [
|
|
columnModel: [
|
|
|
{header:'类型', name:'clientType', width:110, formatter:function(v){return clientTypeName(v);}},
|
|
{header:'类型', name:'clientType', width:110, formatter:function(v){return clientTypeName(v);}},
|
|
@@ -86,6 +89,12 @@ $('#runtimeGrid').dataGrid({
|
|
|
]
|
|
]
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+$('#btnShowOffline').on('click', function(){
|
|
|
|
|
+ showOffline = !showOffline;
|
|
|
|
|
+ $(this).html(showOffline ? '<i class="fa fa-eye-slash"></i> 隐藏离线' : '<i class="fa fa-eye"></i> 显示离线');
|
|
|
|
|
+ $('#runtimeGrid').jqGrid('setGridParam', {postData: {showOffline: String(showOffline)}}).trigger('reloadGrid');
|
|
|
|
|
+});
|
|
|
|
|
+
|
|
|
// —— 配置/升级弹窗 ——
|
|
// —— 配置/升级弹窗 ——
|
|
|
function openRuntimeDialog(id){
|
|
function openRuntimeDialog(id){
|
|
|
$.getJSON('${ctx}/mes/clientRuntime/get', {id:id}, function(resp){
|
|
$.getJSON('${ctx}/mes/clientRuntime/get', {id:id}, function(resp){
|