Authored by simba

update

... ... @@ -41,14 +41,17 @@
</div>
</div>
<div class="form-group" >
<label class="col-sm-2 control-label"></label>
<div class="col-sm-8" id="messageAlert"></div>
</div>
</form>
<script>
$(function () {
$("#groupId").select({
$("#hostInfoForm #groupId").select({
valueField : "id",
textField : "groupName",
firstText : "请选择主机组类型",
... ... @@ -75,12 +78,12 @@
contentHtml+='<input type="checkbox" name="appName" value="'+value.typeName+'">' +value.typeName+'&nbsp;&nbsp;';
});
$("#appNameContent").html(contentHtml);
$("#hostInfoForm #appNameContent").html(contentHtml);
}
});
if(paramObj.hoseInfoId > 0){
//加载form
$("#hostInfoForm").form({
loadUrl : contextPath + "/hostInfo/getHostInfoById.do",
... ... @@ -96,10 +99,9 @@
}
},
onLoadSuccess : function(data) {
$("#hostInfoForm #hostIp").prop("readonly",true);
}
});
}
});
</script>
\ No newline at end of file
... ...
... ... @@ -74,7 +74,7 @@
}, {
title : "updateTime",
field : "updateTime",
width : "5%"
width : "10%"
},{
title : "操作",
... ... @@ -88,7 +88,8 @@
});
return div;
}
},
width : "10%"
} ]
});
... ... @@ -96,7 +97,7 @@
//打开新增或修改页面
function editHostGroup(id,groupName) {
}
</script>
 
\ No newline at end of file
... ...
... ... @@ -93,7 +93,7 @@
return '其他';
}
},
width : "12%"
width : "5%"
}, {
title : "安装软件",
field : "tags",
... ... @@ -104,7 +104,11 @@
},
width : "12%"
}, {
}, {
title : "创建时间",
field : "createTime",
width : "10%"
},{
title : "操作",
field : "op",
formatter : function(value, rowData, rowIndex) {
... ... @@ -210,12 +214,22 @@
onclick : function() {
var btn = $(this);
this.prop("disabled", "disabled");
var hostIp=$("#hostInfoForm #hostIp").val();
var regIp= /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/;
if(!regIp.test(hostIp)){
$("#hostInfoForm #messageAlert").alerts({
content : "请输入正确IP地址格式!",
type : "danger"
});
btn.removeAttr("disabled");
return;
}
var tags="";
$("input[name='appName']:checked").each(function(){
tags += $(this).attr('value')+',';
});
$("#hostInfoForm").form("submit", {
submitUrl : contextPath + "/hostInfo/saveHostInfo.do",
submitUrl : contextPath + "/hostInfo/saveHostInfo",
submitData : {
id : hoseInfoId,
tags:tags
... ...