RuoYi/ruoyi-admin/src/main/resources/templates/template/tmplServer/edit.html

107 lines
3.1 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改服务器模板')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
2019-06-12 16:12:29 +08:00
<form class="form-horizontal m" id="form-tmplServer-edit" th:object="${tmplServer}">
<input id="serverId" name="serverId" th:field="*{serverId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">服务器品牌:</label>
<div class="col-sm-8">
<input id="serverBrand" name="serverBrand" th:field="*{serverBrand}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">服务器型号:</label>
<div class="col-sm-8">
<input id="serverType" name="serverType" th:field="*{serverType}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">CPU主频</label>
<div class="col-sm-8">
<input id="cpuFreq" name="cpuFreq" th:field="*{cpuFreq}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">CPU数量</label>
<div class="col-sm-8">
<input id="cpuNum" name="cpuNum" th:field="*{cpuNum}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">IPMI端口</label>
<div class="col-sm-8">
<input id="ipmiPort" name="ipmiPort" th:field="*{ipmiPort}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">服务器电源数量:</label>
<div class="col-sm-8">
<input id="powerNum" name="powerNum" th:field="*{powerNum}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">服务器raid卡</label>
<div class="col-sm-8">
<input id="raidCard" name="raidCard" th:field="*{raidCard}" class="form-control" type="text">
</div>
</div>
</form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
2019-06-12 16:12:29 +08:00
var prefix = ctx + "template/tmplServer";
2019-06-12 23:17:45 +08:00
$("#form-tmplServer-add").validate({
onkeyup: false,
rules: {
serverBrand: {
required: true,
minlength: 2,
maxlength: 20
},
serverType: {
required: true,
minlength: 2,
maxlength: 20
},
cpuFreq: {
required: true,
minlength: 1,
maxlength: 10
},
cpuNum: {
required: true,
minlength: 1,
maxlength: 2
},
ipmiPort: {
required: true,
minlength: 1,
maxlength: 2
},
powerNum: {
required: true,
minlength: 1,
maxlength: 2
},
raidCard: {
required: true,
minlength: 1,
maxlength: 2
},
},
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
2019-06-12 16:12:29 +08:00
$.operate.save(prefix + "/edit", $('#form-tmplServer-edit').serialize());
}
}
</script>
</body>
</html>