function getServiceState() {
$('#datagrid').datagrid({
url: $.navinfo.contextPath + '/MonitorSysAction.do?method=getHttpState',
striped: true,
collapsible: true,
remoteSort: false,
fit: true,
fitColumns: true,
singleSelect: true,
pageNumber: 1,
nowrap:false,
pageSize: 10,
pagination: false,
columns : [ [ {
field : 'serviceName',
title : '服务接口名称',
width : 10,
align:'left',
formatter : function(value, row, index) {
return row.serviceName;
}
}, {
field : 'serviceState',
title : '服务接口状态',
width : 10,
align:'left',
editor: {
type: 'validatebox',
options: { required: true }
},
formatter : function(value, row, index) {
if(row.serviceState == 200){
return row.serviceState;
}else{
return "<div style=\"width: 560px;margin:0 auto;border:red 0px solid;display:block;word-break: break-all;word-wrap: break-word;color:red \">"+row.serviceState+"</div>";
}
}
}
] ],
rownumbers: true,
onLoadSuccess: function(data){
}/*,onDblClickRow: function (rowIndex,rowData) {
//alert("出发双击事件");
$("#datagrid").datagrid("beginEdit", rowIndex);
//$("#datagrid").datagrid('endEdit',rowIndex);
//$("#datagrid").datagrid('beginEdit',rowIndex);
//$('#datagrid').datagrid('selectRow',rowIndex);
}*/
});
}