<!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">
        <form class="form-horizontal m" id="form-datamsg-add">
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">站点描述：</label>
                    <div class="col-sm-8">
                        <input name="sitename" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">扫描链接：</label>
                    <div class="col-sm-8">
                        <input name="url" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">muffet扫描命令：</label>
                    <div class="col-sm-8">
                        <textarea name="command" class="form-control" required>muffet -v --format json </textarea>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">json文件存放路径：</label>
                    <div class="col-sm-8">
                        <input name="jsonpath" class="form-control" type="text" value="D:\\work\\doc\\temp\\report.json" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">操作系统类型：</label>
                    <div class="col-sm-8">
                        <select name="ostype" class="form-control" th:with="type=${@dict.getType('sys_os')}" required>
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                        </select>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/datamsg"
        $("#form-datamsg-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-datamsg-add').serialize());
            }
        }
    </script>
</body>
</html>