RuoYi/bps-kettle/src/main/resources/templates/kettle/job/add.html

111 lines
4.9 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增作业调度')" />
<th:block th:include="include :: datetimepicker-css" />
<th:block th:include="include :: select2-css" />
<th:block th:include="include :: bootstrap-select-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-job-add">
<input name="jobRepositoryId" class="form-control" type="hidden" id="jobRepositoryId" required>
<div class="form-group">
<label class="col-sm-3 control-label is-required">选择转换:</label>
<div class="col-sm-8">
<input name="jobName" class="form-control" type="text" id="treeName" onclick="chooseJob();" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">描述:</label>
<div class="col-sm-8">
<textarea name="jobDescription" class="form-control"></textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">作业类型(file,ftp,sf)</label>
<div class="col-sm-8">
<select name="jobType" class="form-control m-b" th:with="type=${@dict.getType('repository_type')}" disabled="disabled">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">路径:</label>
<div class="col-sm-8">
<input name="jobPath" id="jobPath" class="form-control" type="text" required readonly>
</div>
</div>
<!-- <div class="form-group">
<label class="col-sm-3 control-label">资源库id</label>
<div class="col-sm-8">
<input name="jobRepositoryId" class="form-control" type="text">
</div>
</div>-->
<div class="form-group">
<label class="col-sm-3 control-label">日志级别:</label>
<div class="col-sm-8">
<select name="jobLogLevel" class="form-control m-b" th:with="type=${@dict.getType('kettle_log_level')}" >
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">角色key:</label>
<div class="col-sm-8">
<select class="form-control noselect2 selectpicker m-b" name="roleKey" data-none-selected-text="可以执行该转换的角色组合" multiple >
<option th:each="allRoles:${allRoles}" th:value="${allRoles}" th:text="${allRoles}" ></option>
</select>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: select2-js" />
<th:block th:include="include :: bootstrap-select-js" />
<script th:inline="javascript">
var prefix = ctx + "kettle/job"
$("#form-job-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-job-add').serialize());
}
}
$("input[name='createdTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
function chooseJob(){
var treeId = $("#treeId").val();
var type="job";
//var repoid = $.common.isEmpty(treeId) ? "999999" : $("#treeId").val();
var url = ctx + "kettle/repository/selectRepositoryTree/"+type
var options = {
title: '选择资源库',
width: "380",
url: url,
callBack: doSubmit
};
$.modal.openOptions(options);
}
function doSubmit(index, layero){
var tree = layero.find("iframe")[0].contentWindow.$._tree;
var body = layer.getChildFrame('body', index);
$("#treeId").val(body.find('#treeId').val());
$("#treeName").val(body.find('#treeName').val());
$("#jobRepositoryId").val(body.find('#transRepositoryId').val());
$("#jobPath").val(body.find('#transPath').val());
layer.close(index);
}
</script>
</body>
</html>