任务操作界面,界面操作完整国际化迁移

pull/6/head
xuxueli 7 years ago
parent 8e0f686431
commit 844f51c549

@ -6,6 +6,49 @@ admin_version=1.9.1(快照版本)
system_tips=系统提示 system_tips=系统提示
system_ok=确定 system_ok=确定
system_close=关闭 system_close=关闭
system_save=保存
system_cancel=取消
system_search=搜索
system_status=状态
system_opt=操作
system_please_input=请输入
system_success=成功
system_fail=失败
system_add_suc=新增成功
system_add_fail=新增失败
system_update_suc=更新成功
system_update_fail=更新失败
## daterangepicker
daterangepicker_ranges_today=今日
daterangepicker_ranges_yesterday=昨日
daterangepicker_ranges_this_month=本月
daterangepicker_ranges_last_month=上个月
daterangepicker_ranges_recent_week=最近1周
daterangepicker_ranges_recent_month=最近1月
daterangepicker_custom_name=自定义
daterangepicker_custom_starttime=起始时间
daterangepicker_custom_endtime=结束时间
daterangepicker_custom_daysofweek=日,一,二,三,四,五,六
daterangepicker_custom_monthnames=一月,二月,三月,四月,五月,六月,七月,八月,九月,十月,十一月,十二月
## dataTable
dataTable_sProcessing=处理中...
dataTable_sLengthMenu=每页 _MENU_ 条记录
dataTable_sZeroRecords=没有匹配结果
dataTable_sInfo=第 _PAGE_ 页 ( 总共 _PAGES_ 页_TOTAL_ 条记录 )
dataTable_sInfoEmpty=无记录
dataTable_sInfoFiltered=(由 _MAX_ 项结果过滤)
dataTable_sSearch=搜索
dataTable_sEmptyTable=表中数据为空
dataTable_sLoadingRecords=载入中...
dataTable_sFirst=首页
dataTable_sPrevious=上页
dataTable_sNext=下页
dataTable_sLast=末页
dataTable_sSortAscending=: 以升序排列此列
dataTable_sSortDescending=: 以降序排列此列
## login ## login
login_btn=登录 login_btn=登录
@ -33,12 +76,46 @@ job_dashboard_trigger_num=调度次数
job_dashboard_trigger_num_tip=调度中心触发的调度次数 job_dashboard_trigger_num_tip=调度中心触发的调度次数
job_dashboard_jobgroup_num=执行器数量 job_dashboard_jobgroup_num=执行器数量
job_dashboard_jobgroup_num_tip=调度中心在线的执行器机器数量 job_dashboard_jobgroup_num_tip=调度中心在线的执行器机器数量
job_dashboard_report=调度报表 job_dashboard_report=调度报表
job_dashboard_report_loaddata_fail=调度报表数据加载异常
job_dashboard_date_report=日期分布图
job_dashboard_date_report_suc_count=成功调度次数
job_dashboard_date_report_fail_count=失败调度次数
job_dashboard_rate_report=成功比例图
job_dashboard_rate_report_suc_count=成功调度次数
job_dashboard_rate_report_fail_count=失败调度次数
## job info ## job info
jobinfo_name=任务管理 jobinfo_name=任务管理
jobinfo_field_add=新增任务
jobinfo_field_update=更新任务
jobinfo_field_id=任务ID
jobinfo_field_jobgroup=执行器
jobinfo_field_jobdesc=任务描述
jobinfo_field_gluetype=运行模式
jobinfo_field_executorparam=执行参数
jobinfo_field_author=负责人
jobinfo_field_alarmemail=报警邮件
jobinfo_field_alarmemail_placeholder=请输入报警邮件,多个邮件地址则逗号分隔
jobinfo_field_executorRouteStrategy=路由策略
jobinfo_field_childJobId=子任务ID
jobinfo_field_childJobId_placeholder=请输入子任务的任务ID,如存在多个则逗号分隔
jobinfo_field_executorBlockStrategy=阻塞处理策略
jobinfo_field_executorFailStrategy=失败处理策略
jobinfo_script_location=脚本位置
jobinfo_shard_index=分片序号
jobinfo_shard_total=分片总数
jobinfo_opt_pause=暂停
jobinfo_opt_resume=恢复
jobinfo_opt_log=日志
jobinfo_opt_run=执行
jobinfo_opt_edit=编辑
jobinfo_opt_del=删除
## job log
joblog_name=调度日志 joblog_name=调度日志
## job group
jobgroup_name=执行器管理 jobgroup_name=执行器管理

@ -19,12 +19,6 @@
<!-- Content Header (Page header) --> <!-- Content Header (Page header) -->
<section class="content-header"> <section class="content-header">
<h1>${I18n.jobinfo_name}</h1> <h1>${I18n.jobinfo_name}</h1>
<!--
<ol class="breadcrumb">
<li><a><i class="fa fa-dashboard"></i></a></li>
<li class="active"></li>
</ol>
-->
</section> </section>
<!-- Main content --> <!-- Main content -->
@ -33,7 +27,7 @@
<div class="row"> <div class="row">
<div class="col-xs-3"> <div class="col-xs-3">
<div class="input-group"> <div class="input-group">
<span class="input-group-addon"></span> <span class="input-group-addon">${I18n.jobinfo_field_jobgroup}</span>
<select class="form-control" id="jobGroup" > <select class="form-control" id="jobGroup" >
<#list JobGroupList as group> <#list JobGroupList as group>
<option value="${group.id}" <#if jobGroup==group.id>selected</#if> >${group.title}</option> <option value="${group.id}" <#if jobGroup==group.id>selected</#if> >${group.title}</option>
@ -43,7 +37,7 @@
</div> </div>
<div class="col-xs-3"> <div class="col-xs-3">
<div class="input-group"> <div class="input-group">
<span class="input-group-addon"></span> <span class="input-group-addon">${I18n.jobinfo_field_jobdesc}</span>
<input type="text" class="form-control" id="jobDesc" autocomplete="on" > <input type="text" class="form-control" id="jobDesc" autocomplete="on" >
</div> </div>
</div> </div>
@ -54,36 +48,35 @@
</div> </div>
</div> </div>
<div class="col-xs-1"> <div class="col-xs-1">
<button class="btn btn-block btn-info" id="searchBtn"></button> <button class="btn btn-block btn-info" id="searchBtn">${I18n.system_search}</button>
</div> </div>
<div class="col-xs-2"> <div class="col-xs-2">
<button class="btn btn-block btn-success add" type="button">+</button> <button class="btn btn-block btn-success add" type="button">${I18n.jobinfo_field_add}</button>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-xs-12">
<div class="box"> <div class="box">
<div class="box-header hide"> <#--<div class="box-header hide">
<h3 class="box-title"></h3> <h3 class="box-title"></h3>
</div> </div>-->
<div class="box-body" > <div class="box-body" >
<table id="job_list" class="table table-bordered table-striped" width="100%" > <table id="job_list" class="table table-bordered table-striped" width="100%" >
<thead> <thead>
<tr> <tr>
<th name="id" >ID</th> <th name="id" >${I18n.jobinfo_field_id}</th>
<th name="jobGroup" >jobGroup</th> <th name="jobGroup" >${I18n.jobinfo_field_jobgroup}</th>
<th name="jobDesc" ></th> <th name="jobDesc" >${I18n.jobinfo_field_jobdesc}</th>
<th name="glueType" ></th> <th name="glueType" >${I18n.jobinfo_field_gluetype}</th>
<th name="executorParam" ></th> <th name="executorParam" >${I18n.jobinfo_field_executorparam}</th>
<th name="jobCron" >Cron</th> <th name="jobCron" >Cron</th>
<th name="addTime" ></th> <th name="addTime" >addTime</th>
<th name="updateTime" ></th> <th name="updateTime" >updateTime</th>
<th name="author" ></th> <th name="author" >${I18n.jobinfo_field_author}</th>
<th name="alarmEmail" ></th> <th name="alarmEmail" >${I18n.jobinfo_field_alarmemail}</th>
<th name="glueType" ></th> <th name="jobStatus" >${I18n.system_status}</th>
<th name="jobStatus" ></th> <th>${I18n.system_opt}</th>
<th></th>
</tr> </tr>
</thead> </thead>
<tbody></tbody> <tbody></tbody>
@ -105,12 +98,12 @@
<div class="modal-dialog modal-lg"> <div class="modal-dialog modal-lg">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h4 class="modal-title" ></h4> <h4 class="modal-title" >${I18n.jobinfo_field_add}</h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<form class="form-horizontal form" role="form" > <form class="form-horizontal form" role="form" >
<div class="form-group"> <div class="form-group">
<label for="firstname" class="col-sm-2 control-label"><font color="red">*</font></label> <label for="firstname" class="col-sm-2 control-label">${I18n.jobinfo_field_jobgroup}<font color="red">*</font></label>
<div class="col-sm-4"> <div class="col-sm-4">
<select class="form-control" name="jobGroup" > <select class="form-control" name="jobGroup" >
<#list JobGroupList as group> <#list JobGroupList as group>
@ -118,11 +111,11 @@
</#list> </#list>
</select> </select>
</div> </div>
<label for="lastname" class="col-sm-2 control-label"><font color="red">*</font></label> <label for="lastname" class="col-sm-2 control-label">${I18n.jobinfo_field_jobdesc}<font color="red">*</font></label>
<div class="col-sm-4"><input type="text" class="form-control" name="jobDesc" placeholder="请输入“描述”" maxlength="50" ></div> <div class="col-sm-4"><input type="text" class="form-control" name="jobDesc" placeholder="${I18n.system_please_input}${I18n.jobinfo_field_jobdesc}" maxlength="50" ></div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="firstname" class="col-sm-2 control-label"><font color="red">*</font></label> <label for="firstname" class="col-sm-2 control-label">${I18n.jobinfo_field_executorRouteStrategy}<font color="red">*</font></label>
<div class="col-sm-4"> <div class="col-sm-4">
<select class="form-control" name="executorRouteStrategy" > <select class="form-control" name="executorRouteStrategy" >
<#list ExecutorRouteStrategyEnum as item> <#list ExecutorRouteStrategyEnum as item>
@ -131,10 +124,10 @@
</select> </select>
</div> </div>
<label for="lastname" class="col-sm-2 control-label">Cron<font color="red">*</font></label> <label for="lastname" class="col-sm-2 control-label">Cron<font color="red">*</font></label>
<div class="col-sm-4"><input type="text" class="form-control" name="jobCron" placeholder="请输入“Cron”" maxlength="128" ></div> <div class="col-sm-4"><input type="text" class="form-control" name="jobCron" placeholder="${I18n.system_please_input}Cron" maxlength="128" ></div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="firstname" class="col-sm-2 control-label"><font color="red">*</font></label> <label for="firstname" class="col-sm-2 control-label">${I18n.jobinfo_field_gluetype}<font color="red">*</font></label>
<div class="col-sm-4"> <div class="col-sm-4">
<select class="form-control glueType" name="glueType" > <select class="form-control glueType" name="glueType" >
<#list GlueTypeEnum as item> <#list GlueTypeEnum as item>
@ -143,16 +136,16 @@
</select> </select>
</div> </div>
<label for="firstname" class="col-sm-2 control-label">JobHandler<font color="black">*</font></label> <label for="firstname" class="col-sm-2 control-label">JobHandler<font color="black">*</font></label>
<div class="col-sm-4"><input type="text" class="form-control" name="executorHandler" placeholder="请输入“JobHandler”" maxlength="100" ></div> <div class="col-sm-4"><input type="text" class="form-control" name="executorHandler" placeholder="${I18n.system_please_input}JobHandler" maxlength="100" ></div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="firstname" class="col-sm-2 control-label"><font color="black">*</font></label> <label for="firstname" class="col-sm-2 control-label">${I18n.jobinfo_field_executorparam}<font color="black">*</font></label>
<div class="col-sm-4"><input type="text" class="form-control" name="executorParam" placeholder="请输入“执行参数”" maxlength="512" ></div> <div class="col-sm-4"><input type="text" class="form-control" name="executorParam" placeholder="${I18n.system_please_input}${I18n.jobinfo_field_executorparam}" maxlength="512" ></div>
<label for="lastname" class="col-sm-2 control-label">ID<font color="black">*</font></label> <label for="lastname" class="col-sm-2 control-label">${I18n.jobinfo_field_childJobId}<font color="black">*</font></label>
<div class="col-sm-4"><input type="text" class="form-control" name="childJobId" placeholder="请输入子任务的任务ID,如存在多个逗号分隔" maxlength="100" ></div> <div class="col-sm-4"><input type="text" class="form-control" name="childJobId" placeholder="${I18n.jobinfo_field_childJobId_placeholder}" maxlength="100" ></div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="firstname" class="col-sm-2 control-label"><font color="red">*</font></label> <label for="firstname" class="col-sm-2 control-label">${I18n.jobinfo_field_executorBlockStrategy}<font color="red">*</font></label>
<div class="col-sm-4"> <div class="col-sm-4">
<select class="form-control" name="executorBlockStrategy" > <select class="form-control" name="executorBlockStrategy" >
<#list ExecutorBlockStrategyEnum as item> <#list ExecutorBlockStrategyEnum as item>
@ -160,7 +153,7 @@
</#list> </#list>
</select> </select>
</div> </div>
<label for="lastname" class="col-sm-2 control-label"><font color="red">*</font></label> <label for="lastname" class="col-sm-2 control-label">${I18n.jobinfo_field_executorFailStrategy}<font color="red">*</font></label>
<div class="col-sm-4"> <div class="col-sm-4">
<select class="form-control" name="executorFailStrategy" > <select class="form-control" name="executorFailStrategy" >
<#list ExecutorFailStrategyEnum as item> <#list ExecutorFailStrategyEnum as item>
@ -170,17 +163,17 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="lastname" class="col-sm-2 control-label"><font color="red">*</font></label> <label for="lastname" class="col-sm-2 control-label">${I18n.jobinfo_field_author}<font color="red">*</font></label>
<div class="col-sm-4"><input type="text" class="form-control" name="author" placeholder="请输入“负责人”" maxlength="50" ></div> <div class="col-sm-4"><input type="text" class="form-control" name="author" placeholder="${I18n.system_please_input}${I18n.jobinfo_field_author}" maxlength="50" ></div>
<label for="lastname" class="col-sm-2 control-label"><font color="black">*</font></label> <label for="lastname" class="col-sm-2 control-label">${I18n.jobinfo_field_alarmemail}<font color="black">*</font></label>
<div class="col-sm-4"><input type="text" class="form-control" name="alarmEmail" placeholder="请输入“报警邮件”,多个邮件地址逗号分隔" maxlength="100" ></div> <div class="col-sm-4"><input type="text" class="form-control" name="alarmEmail" placeholder="${I18n.jobinfo_field_alarmemail_placeholder}" maxlength="100" ></div>
</div> </div>
<hr> <hr>
<div class="form-group"> <div class="form-group">
<div class="col-sm-offset-3 col-sm-6"> <div class="col-sm-offset-3 col-sm-6">
<button type="submit" class="btn btn-primary" ></button> <button type="submit" class="btn btn-primary" >${I18n.system_save}</button>
<button type="button" class="btn btn-default" data-dismiss="modal"></button> <button type="button" class="btn btn-default" data-dismiss="modal">${I18n.system_cancel}</button>
</div> </div>
</div> </div>
@ -207,10 +200,10 @@ public class DemoGlueJobHandler extends IJobHandler {
#!/bin/bash #!/bin/bash
echo "xxl-job: hello shell" echo "xxl-job: hello shell"
echo "脚本位置$0" echo "${I18n.jobinfo_script_location}$0"
echo "任务参数$1" echo "${I18n.jobinfo_field_executorparam}$1"
echo "分片序号 = $2" echo "${I18n.jobinfo_shard_index} = $2"
echo "分片总数 = $3" echo "${I18n.jobinfo_shard_total} = $3"
<#--echo "参数数量:$#" <#--echo "参数数量:$#"
for param in $* for param in $*
do do
@ -229,10 +222,10 @@ import sys
print "xxl-job: hello python" print "xxl-job: hello python"
print "脚本文件", sys.argv[0] print "${I18n.jobinfo_script_location}", sys.argv[0]
print "任务参数", sys.argv[1] print "${I18n.jobinfo_field_executorparam}", sys.argv[1]
print "分片序号", sys.argv[2] print "${I18n.jobinfo_shard_index}", sys.argv[2]
print "分片总数", sys.argv[3] print "${I18n.jobinfo_shard_total}", sys.argv[3]
<#--for i in range(1, len(sys.argv)): <#--for i in range(1, len(sys.argv)):
time.sleep(1) time.sleep(1)
print "参数", i, sys.argv[i]--> print "参数", i, sys.argv[i]-->
@ -251,10 +244,10 @@ console.log("xxl-job: hello nodejs")
var arguments = process.argv var arguments = process.argv
console.log("脚本文件: " + arguments[1]) console.log("${I18n.jobinfo_script_location}: " + arguments[1])
console.log("任务参数: " + arguments[2]) console.log("${I18n.jobinfo_field_executorparam}: " + arguments[2])
console.log("分片序号: " + arguments[3]) console.log("${I18n.jobinfo_shard_index}: " + arguments[3])
console.log("分片总数: " + arguments[4]) console.log("${I18n.jobinfo_shard_total}: " + arguments[4])
<#--for (var i = 2; i < arguments.length; i++){ <#--for (var i = 2; i < arguments.length; i++){
console.log("参数 %s = %s", (i-1), arguments[i]); console.log("参数 %s = %s", (i-1), arguments[i]);
}--> }-->
@ -273,12 +266,12 @@ process.exit(0)
<div class="modal-dialog modal-lg"> <div class="modal-dialog modal-lg">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h4 class="modal-title" ></h4> <h4 class="modal-title" >${I18n.jobinfo_field_update}</h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<form class="form-horizontal form" role="form" > <form class="form-horizontal form" role="form" >
<div class="form-group"> <div class="form-group">
<label for="firstname" class="col-sm-2 control-label"><font color="red">*</font></label> <label for="firstname" class="col-sm-2 control-label">${I18n.jobinfo_field_jobgroup}<font color="red">*</font></label>
<div class="col-sm-4"> <div class="col-sm-4">
<select class="form-control" name="jobGroup" disabled > <select class="form-control" name="jobGroup" disabled >
<#list JobGroupList as group> <#list JobGroupList as group>
@ -286,11 +279,11 @@ process.exit(0)
</#list> </#list>
</select> </select>
</div> </div>
<label for="lastname" class="col-sm-2 control-label"><font color="red">*</font></label> <label for="lastname" class="col-sm-2 control-label">${I18n.jobinfo_field_jobdesc}<font color="red">*</font></label>
<div class="col-sm-4"><input type="text" class="form-control" name="jobDesc" placeholder="请输入“描述”" maxlength="50" ></div> <div class="col-sm-4"><input type="text" class="form-control" name="jobDesc" placeholder="${I18n.system_please_input}${I18n.jobinfo_field_jobdesc}" maxlength="50" ></div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="firstname" class="col-sm-2 control-label"><font color="red">*</font></label> <label for="firstname" class="col-sm-2 control-label">${I18n.jobinfo_field_executorRouteStrategy}<font color="red">*</font></label>
<div class="col-sm-4"> <div class="col-sm-4">
<select class="form-control" name="executorRouteStrategy" > <select class="form-control" name="executorRouteStrategy" >
<#list ExecutorRouteStrategyEnum as item> <#list ExecutorRouteStrategyEnum as item>
@ -299,10 +292,10 @@ process.exit(0)
</select> </select>
</div> </div>
<label for="lastname" class="col-sm-2 control-label">Cron<font color="red">*</font></label> <label for="lastname" class="col-sm-2 control-label">Cron<font color="red">*</font></label>
<div class="col-sm-4"><input type="text" class="form-control" name="jobCron" placeholder="请输入“Cron”" maxlength="128" ></div> <div class="col-sm-4"><input type="text" class="form-control" name="jobCron" placeholder="${I18n.system_please_input}Cron" maxlength="128" ></div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="firstname" class="col-sm-2 control-label"><font color="red">*</font></label> <label for="firstname" class="col-sm-2 control-label">${I18n.jobinfo_field_gluetype}<font color="red">*</font></label>
<div class="col-sm-4"> <div class="col-sm-4">
<select class="form-control glueType" name="glueType" disabled > <select class="form-control glueType" name="glueType" disabled >
<#list GlueTypeEnum as item> <#list GlueTypeEnum as item>
@ -311,16 +304,16 @@ process.exit(0)
</select> </select>
</div> </div>
<label for="firstname" class="col-sm-2 control-label">JobHandler<font color="black">*</font></label> <label for="firstname" class="col-sm-2 control-label">JobHandler<font color="black">*</font></label>
<div class="col-sm-4"><input type="text" class="form-control" name="executorHandler" placeholder="请输入“JobHandler”" maxlength="100" ></div> <div class="col-sm-4"><input type="text" class="form-control" name="executorHandler" placeholder="${I18n.system_please_input}JobHandler" maxlength="100" ></div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="firstname" class="col-sm-2 control-label"><font color="black">*</font></label> <label for="firstname" class="col-sm-2 control-label">${I18n.jobinfo_field_executorparam}<font color="black">*</font></label>
<div class="col-sm-4"><input type="text" class="form-control" name="executorParam" placeholder="请输入“执行参数”" maxlength="512" ></div> <div class="col-sm-4"><input type="text" class="form-control" name="executorParam" placeholder="${I18n.system_please_input}${I18n.jobinfo_field_executorparam}" maxlength="512" ></div>
<label for="lastname" class="col-sm-2 control-label">ID<font color="black">*</font></label> <label for="lastname" class="col-sm-2 control-label">${I18n.jobinfo_field_childJobId}<font color="black">*</font></label>
<div class="col-sm-4"><input type="text" class="form-control" name="childJobId" placeholder="请输入子任务的任务ID,如存在多个逗号分隔" maxlength="100" ></div> <div class="col-sm-4"><input type="text" class="form-control" name="childJobId" placeholder="${I18n.jobinfo_field_childJobId_placeholder}" maxlength="100" ></div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="firstname" class="col-sm-2 control-label"><font color="red">*</font></label> <label for="firstname" class="col-sm-2 control-label">${I18n.jobinfo_field_executorBlockStrategy}<font color="red">*</font></label>
<div class="col-sm-4"> <div class="col-sm-4">
<select class="form-control" name="executorBlockStrategy" > <select class="form-control" name="executorBlockStrategy" >
<#list ExecutorBlockStrategyEnum as item> <#list ExecutorBlockStrategyEnum as item>
@ -328,7 +321,7 @@ process.exit(0)
</#list> </#list>
</select> </select>
</div> </div>
<label for="lastname" class="col-sm-2 control-label"><font color="red">*</font></label> <label for="lastname" class="col-sm-2 control-label">${I18n.jobinfo_field_executorFailStrategy}<font color="red">*</font></label>
<div class="col-sm-4"> <div class="col-sm-4">
<select class="form-control" name="executorFailStrategy" > <select class="form-control" name="executorFailStrategy" >
<#list ExecutorFailStrategyEnum as item> <#list ExecutorFailStrategyEnum as item>
@ -338,20 +331,21 @@ process.exit(0)
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="lastname" class="col-sm-2 control-label"><font color="red">*</font></label> <label for="lastname" class="col-sm-2 control-label">${I18n.jobinfo_field_author}<font color="red">*</font></label>
<div class="col-sm-4"><input type="text" class="form-control" name="author" placeholder="请输入“负责人”" maxlength="50" ></div> <div class="col-sm-4"><input type="text" class="form-control" name="author" placeholder="${I18n.system_please_input}${I18n.jobinfo_field_author}" maxlength="50" ></div>
<label for="lastname" class="col-sm-2 control-label"><font color="black">*</font></label> <label for="lastname" class="col-sm-2 control-label">${I18n.jobinfo_field_alarmemail}<font color="black">*</font></label>
<div class="col-sm-4"><input type="text" class="form-control" name="alarmEmail" placeholder="请输入“报警邮件”,多个邮件地址逗号分隔" maxlength="100" ></div> <div class="col-sm-4"><input type="text" class="form-control" name="alarmEmail" placeholder="${I18n.jobinfo_field_alarmemail_placeholder}" maxlength="100" ></div>
</div> </div>
<hr> <hr>
<div class="form-group"> <div class="form-group">
<div class="col-sm-offset-3 col-sm-6"> <div class="col-sm-offset-3 col-sm-6">
<button type="submit" class="btn btn-primary" ></button> <button type="submit" class="btn btn-primary" >${I18n.system_save}</button>
<button type="button" class="btn btn-default" data-dismiss="modal"></button> <button type="button" class="btn btn-default" data-dismiss="modal">${I18n.system_cancel}</button>
<input type="hidden" name="id" > <input type="hidden" name="id" >
</div> </div>
</div> </div>
</form> </form>
</div> </div>
</div> </div>

@ -4,8 +4,17 @@
$(function () { $(function () {
// filter Time // filter Time
var _startDate = moment().subtract(1, 'months'); // 默认,最近一月 var _startDate = moment().subtract(1, 'months'); // defaultrecent_month
var _endDate = moment(); var _endDate = moment();
var rangesConf = {};
rangesConf[I18n.daterangepicker_ranges_today] = [moment().startOf('day'), moment().endOf('day')];
rangesConf[I18n.daterangepicker_ranges_yesterday] = [moment().subtract(1, 'days').startOf('day'), moment().subtract(1, 'days').endOf('day')];
rangesConf[I18n.daterangepicker_ranges_this_month] = [moment().startOf('month'), moment().endOf('month')];
rangesConf[I18n.daterangepicker_ranges_last_month] = [moment().subtract(1, 'months').startOf('month'), moment().subtract(1, 'months').endOf('month')];
rangesConf[I18n.daterangepicker_ranges_recent_week] = [moment().subtract(1, 'weeks'), moment()];
rangesConf[I18n.daterangepicker_ranges_recent_month] = [_startDate, _endDate];
$('#filterTime').daterangepicker({ $('#filterTime').daterangepicker({
autoApply:false, autoApply:false,
singleDatePicker:false, singleDatePicker:false,
@ -14,25 +23,17 @@ $(function () {
timePickerIncrement: 10, // 时间的增量,单位为分钟 timePickerIncrement: 10, // 时间的增量,单位为分钟
timePicker24Hour : true, timePicker24Hour : true,
opens : 'left', //日期选择框的弹出位置 opens : 'left', //日期选择框的弹出位置
ranges: { ranges: rangesConf,
//'最近1小时': [moment().subtract(1, 'hours'), moment()],
'': [moment().startOf('day'), moment().endOf('day')],
'': [moment().subtract(1, 'days').startOf('day'), moment().subtract(1, 'days').endOf('day')],
'': [moment().startOf('month'), moment().endOf('month')],
'': [moment().subtract(1, 'months').startOf('month'), moment().subtract(1, 'months').endOf('month')],
'1': [moment().subtract(1, 'weeks'), moment()],
'1': [_startDate, _endDate]
},
locale : { locale : {
format: 'YYYY-MM-DD HH:mm:ss', format: 'YYYY-MM-DD HH:mm:ss',
separator : ' - ', separator : ' - ',
customRangeLabel : '', customRangeLabel : I18n.daterangepicker_custom_name ,
applyLabel : '', applyLabel : I18n.system_ok ,
cancelLabel : '', cancelLabel : I18n.system_cancel ,
fromLabel : '', fromLabel : I18n.daterangepicker_custom_starttime ,
toLabel : '', toLabel : I18n.daterangepicker_custom_endtime ,
daysOfWeek : [ '日', '一', '二', '三', '四', '五', '六' ], daysOfWeek : I18n.daterangepicker_custom_daysofweek.split(',') , // '日', '一', '二', '三', '四', '五', '六'
monthNames : [ '', '', '', '', '', '', '', '', '', '', '', '' ], monthNames : I18n.daterangepicker_custom_monthnames.split(',') , // '一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'
firstDay : 1 firstDay : 1
}, },
startDate:_startDate, startDate:_startDate,
@ -64,7 +65,7 @@ $(function () {
} else { } else {
layer.open({ layer.open({
title: I18n.system_tips , title: I18n.system_tips ,
content: (data.msg || ''), content: (data.msg || I18n.job_dashboard_report_loaddata_fail ),
icon: '2' icon: '2'
}); });
} }
@ -78,7 +79,7 @@ $(function () {
function lineChartInit(data) { function lineChartInit(data) {
var option = { var option = {
title: { title: {
text: '' text: I18n.job_dashboard_date_report
}, },
tooltip : { tooltip : {
trigger: 'axis', trigger: 'axis',
@ -90,7 +91,7 @@ $(function () {
} }
}, },
legend: { legend: {
data:['',''] data:[I18n.job_dashboard_date_report_suc_count, I18n.job_dashboard_date_report_fail_count]
}, },
toolbox: { toolbox: {
feature: { feature: {
@ -117,16 +118,16 @@ $(function () {
], ],
series : [ series : [
{ {
name:'', name:I18n.job_dashboard_date_report_suc_count,
type:'line', type:'line',
stack: '', stack: 'Total',
areaStyle: {normal: {}}, areaStyle: {normal: {}},
data: data.content.triggerDayCountSucList data: data.content.triggerDayCountSucList
}, },
{ {
name:'', name:I18n.job_dashboard_date_report_fail_count,
type:'line', type:'line',
stack: '', stack: 'Total',
label: { label: {
normal: { normal: {
show: true, show: true,
@ -150,7 +151,7 @@ $(function () {
function pieChartInit(data) { function pieChartInit(data) {
var option = { var option = {
title : { title : {
text: '', text: I18n.job_dashboard_rate_report ,
/*subtext: 'subtext',*/ /*subtext: 'subtext',*/
x:'center' x:'center'
}, },
@ -161,7 +162,7 @@ $(function () {
legend: { legend: {
orient: 'vertical', orient: 'vertical',
left: 'left', left: 'left',
data: ['',''] data: [I18n.job_dashboard_rate_report_suc_count, I18n.job_dashboard_rate_report_fail_count ]
}, },
series : [ series : [
{ {
@ -172,11 +173,11 @@ $(function () {
data:[ data:[
{ {
value:data.content.triggerCountSucTotal, value:data.content.triggerCountSucTotal,
name:'' name:I18n.job_dashboard_rate_report_suc_count
}, },
{ {
value:data.content.triggerCountFailTotal, value:data.content.triggerCountFailTotal,
name:'' name:I18n.job_dashboard_rate_report_fail_count
} }
], ],
itemStyle: { itemStyle: {

@ -52,18 +52,12 @@ $(function() {
"width":'20%', "width":'20%',
"visible" : true, "visible" : true,
"render": function ( data, type, row ) { "render": function ( data, type, row ) {
if ('GLUE_GROOVY'==row.glueType) { var glueTypeTitle = findGlueTypeTitle(row.glueType);
return "GLUE模式(Java)"; if (row.executorHandler) {
} else if ('GLUE_SHELL'==row.glueType) { return glueTypeTitle +"" + row.executorHandler;
return "GLUE模式(Shell)"; } else {
} else if ('GLUE_PYTHON'==row.glueType) { return glueTypeTitle;
return "GLUE模式(Python)"; }
}else if ('GLUE_NODEJS'==row.glueType){
return "GLUE模式(Nodejs)";
} else if ('BEAN'==row.glueType) {
return "BEAN模式" + row.executorHandler;
}
return row.executorHandler;
} }
}, },
{ "data": 'executorParam', "visible" : false}, { "data": 'executorParam', "visible" : false},
@ -88,7 +82,6 @@ $(function() {
}, },
{ "data": 'author', "visible" : true, "width":'10%'}, { "data": 'author', "visible" : true, "width":'10%'},
{ "data": 'alarmEmail', "visible" : false}, { "data": 'alarmEmail', "visible" : false},
{ "data": 'glueType', "visible" : false},
{ {
"data": 'jobStatus', "data": 'jobStatus',
"width":'10%', "width":'10%',
@ -97,24 +90,24 @@ $(function() {
if ('NORMAL' == data) { if ('NORMAL' == data) {
return '<small class="label label-success" ><i class="fa fa-clock-o"></i>'+ data +'</small>'; return '<small class="label label-success" ><i class="fa fa-clock-o"></i>'+ data +'</small>';
} else if ('PAUSED' == data){ } else if ('PAUSED' == data){
return '<small class="label label-default" title="暂停" ><i class="fa fa-clock-o"></i>'+ data +'</small>'; return '<small class="label label-default" ><i class="fa fa-clock-o"></i>'+ data +'</small>';
} else if ('BLOCKED' == data){ } else if ('BLOCKED' == data){
return '<small class="label label-default" title="阻塞[串行]" ><i class="fa fa-clock-o"></i>'+ data +'</small>'; return '<small class="label label-default" ><i class="fa fa-clock-o"></i>'+ data +'</small>';
} }
return data; return data;
} }
}, },
{ {
"data": '' , "data": I18n.system_opt ,
"width":'15%', "width":'15%',
"render": function ( data, type, row ) { "render": function ( data, type, row ) {
return function(){ return function(){
// status // status
var pause_resume = ""; var pause_resume = "";
if ('NORMAL' == row.jobStatus) { if ('NORMAL' == row.jobStatus) {
pause_resume = '<button class="btn btn-primary btn-xs job_operate" _type="job_pause" type="button"></button> '; pause_resume = '<button class="btn btn-primary btn-xs job_operate" _type="job_pause" type="button">'+ I18n.jobinfo_opt_pause +'</button> ';
} else if ('PAUSED' == row.jobStatus){ } else if ('PAUSED' == row.jobStatus){
pause_resume = '<button class="btn btn-primary btn-xs job_operate" _type="job_resume" type="button"></button> '; pause_resume = '<button class="btn btn-primary btn-xs job_operate" _type="job_resume" type="button">'+ I18n.jobinfo_opt_resume +'</button> ';
} }
// log url // log url
var logUrl = base_url +'/joblog?jobId='+ row.id; var logUrl = base_url +'/joblog?jobId='+ row.id;
@ -129,12 +122,12 @@ $(function() {
// html // html
tableData['key'+row.id] = row; tableData['key'+row.id] = row;
var html = '<p id="'+ row.id +'" >'+ var html = '<p id="'+ row.id +'" >'+
'<button class="btn btn-primary btn-xs job_operate" _type="job_trigger" type="button"></button> '+ '<button class="btn btn-primary btn-xs job_operate" _type="job_trigger" type="button">'+ I18n.jobinfo_opt_run +'</button> '+
pause_resume + pause_resume +
'<button class="btn btn-primary btn-xs" type="job_del" type="button" onclick="javascript:window.open(\'' + logUrl + '\')" ></button><br> '+ '<button class="btn btn-primary btn-xs" type="job_del" type="button" onclick="javascript:window.open(\'' + logUrl + '\')" >'+ I18n.jobinfo_opt_log +'</button><br> '+
'<button class="btn btn-warning btn-xs update" type="button"></button> '+ '<button class="btn btn-warning btn-xs update" type="button">'+ I18n.jobinfo_opt_edit +'</button> '+
codeBtn + codeBtn +
'<button class="btn btn-danger btn-xs job_operate" _type="job_del" type="button"></button> '+ '<button class="btn btn-danger btn-xs job_operate" _type="job_del" type="button">'+ I18n.jobinfo_opt_del +'</button> '+
'</p>'; '</p>';
return html; return html;
@ -143,27 +136,27 @@ $(function() {
} }
], ],
"language" : { "language" : {
"sProcessing" : "处理中...", "sProcessing" : I18n.dataTable_sProcessing ,
"sLengthMenu" : "每页 _MENU_ 条记录", "sLengthMenu" : I18n.dataTable_sLengthMenu ,
"sZeroRecords" : "没有匹配结果", "sZeroRecords" : I18n.dataTable_sZeroRecords ,
"sInfo" : "第 _PAGE_ 页 ( 总共 _PAGES_ 页_TOTAL_ 条记录 )", "sInfo" : I18n.dataTable_sInfo ,
"sInfoEmpty" : "无记录", "sInfoEmpty" : I18n.dataTable_sInfoEmpty ,
"sInfoFiltered" : "(由 _MAX_ 项结果过滤)", "sInfoFiltered" : I18n.dataTable_sInfoFiltered ,
"sInfoPostFix" : "", "sInfoPostFix" : "",
"sSearch" : "搜索:", "sSearch" : I18n.dataTable_sSearch ,
"sUrl" : "", "sUrl" : "",
"sEmptyTable" : "表中数据为空", "sEmptyTable" : I18n.dataTable_sEmptyTable ,
"sLoadingRecords" : "载入中...", "sLoadingRecords" : I18n.dataTable_sLoadingRecords ,
"sInfoThousands" : ",", "sInfoThousands" : ",",
"oPaginate" : { "oPaginate" : {
"sFirst" : "首页", "sFirst" : I18n.dataTable_sFirst ,
"sPrevious" : "上页", "sPrevious" : I18n.dataTable_sPrevious ,
"sNext" : "下页", "sNext" : I18n.dataTable_sNext ,
"sLast" : "末页" "sLast" : I18n.dataTable_sLast
}, },
"oAria" : { "oAria" : {
"sSortAscending" : ": 以升序排列此列", "sSortAscending" : I18n.dataTable_sSortAscending ,
"sSortDescending" : ": 以降序排列此列" "sSortDescending" : I18n.dataTable_sSortDescending
} }
} }
}); });
@ -191,19 +184,19 @@ $(function() {
var type = $(this).attr("_type"); var type = $(this).attr("_type");
if ("job_pause" == type) { if ("job_pause" == type) {
typeName = "暂停"; typeName = I18n.jobinfo_opt_pause ;
url = base_url + "/jobinfo/pause"; url = base_url + "/jobinfo/pause";
needFresh = true; needFresh = true;
} else if ("job_resume" == type) { } else if ("job_resume" == type) {
typeName = "恢复"; typeName = I18n.jobinfo_opt_resume ;
url = base_url + "/jobinfo/resume"; url = base_url + "/jobinfo/resume";
needFresh = true; needFresh = true;
} else if ("job_del" == type) { } else if ("job_del" == type) {
typeName = "删除"; typeName = I18n.jobinfo_opt_del ;
url = base_url + "/jobinfo/remove"; url = base_url + "/jobinfo/remove";
needFresh = true; needFresh = true;
} else if ("job_trigger" == type) { } else if ("job_trigger" == type) {
typeName = "执行"; typeName = I18n.jobinfo_opt_run ;
url = base_url + "/jobinfo/trigger"; url = base_url + "/jobinfo/trigger";
} else { } else {
return; return;
@ -211,7 +204,7 @@ $(function() {
var id = $(this).parent('p').attr("id"); var id = $(this).parent('p').attr("id");
layer.confirm('' + typeName + '?', {icon: 3, title:''}, function(index){ layer.confirm( I18n.system_ok + typeName + '?', {icon: 3, title: I18n.system_tips }, function(index){
layer.close(index); layer.close(index);
$.ajax({ $.ajax({
@ -225,8 +218,9 @@ $(function() {
if (data.code == 200) { if (data.code == 200) {
layer.open({ layer.open({
title: '', title: I18n.system_tips,
content: typeName + "成功", btn: [ I18n.system_ok , I18n.system_close ],
content: typeName + I18n.system_success ,
icon: '1', icon: '1',
end: function(layero, index){ end: function(layero, index){
if (needFresh) { if (needFresh) {
@ -237,8 +231,9 @@ $(function() {
}); });
} else { } else {
layer.open({ layer.open({
title: '', title: I18n.system_tips,
content: (data.msg || typeName + "失败"), btn: [ I18n.system_ok , I18n.system_close ],
content: (data.msg || typeName + I18n.system_fail ),
icon: '2' icon: '2'
}); });
} }
@ -269,13 +264,13 @@ $(function() {
}, },
messages : { messages : {
jobDesc : { jobDesc : {
required :"请输入“描述”." required : I18n.system_please_input + I18n.jobinfo_field_jobdesc
}, },
jobCron : { jobCron : {
required :"请输入“Cron”." required : I18n.system_please_input + "Cron"
}, },
author : { author : {
required : "请输入“负责人”." required : I18n.system_please_input + I18n.jobinfo_field_author
} }
}, },
highlight : function(element) { highlight : function(element) {
@ -293,8 +288,8 @@ $(function() {
if (data.code == "200") { if (data.code == "200") {
$('#addModal').modal('hide'); $('#addModal').modal('hide');
layer.open({ layer.open({
title: '', title: I18n.system_tips ,
content: '', content: I18n.system_add_suc ,
icon: '1', icon: '1',
end: function(layero, index){ end: function(layero, index){
jobTable.fnDraw(); jobTable.fnDraw();
@ -303,8 +298,8 @@ $(function() {
}); });
} else { } else {
layer.open({ layer.open({
title: '', title: I18n.system_tips ,
content: (data.msg || "新增失败"), content: (data.msg || I18n.system_add_fail),
icon: '2' icon: '2'
}); });
} }
@ -353,14 +348,14 @@ $(function() {
var id = $(this).parent('p').attr("id"); var id = $(this).parent('p').attr("id");
var row = tableData['key'+id]; var row = tableData['key'+id];
if (!row) { /*if (!row) {
layer.open({ layer.open({
title: '', title: I18n.system_tips ,
content: ("任务信息加载失败,请刷新页面"), content: ("数据加载失败,请刷新页面"),
icon: '2' icon: '2'
}); });
return; return;
} }*/
// base data // base data
$("#updateModal .form input[name='id']").val( row.id ); $("#updateModal .form input[name='id']").val( row.id );
@ -401,13 +396,13 @@ $(function() {
}, },
messages : { messages : {
jobDesc : { jobDesc : {
required :"请输入“描述”." required : I18n.system_please_input + I18n.jobinfo_field_jobdesc
}, },
jobCron : { jobCron : {
required :"请输入“Cron”." required : I18n.system_please_input + "Cron"
}, },
author : { author : {
required : "请输入“负责人”." required : I18n.system_please_input + I18n.jobinfo_field_author
} }
}, },
highlight : function(element) { highlight : function(element) {
@ -426,8 +421,8 @@ $(function() {
if (data.code == "200") { if (data.code == "200") {
$('#updateModal').modal('hide'); $('#updateModal').modal('hide');
layer.open({ layer.open({
title: '', title: I18n.system_tips ,
content: '', content: I18n.system_update_suc ,
icon: '1', icon: '1',
end: function(layero, index){ end: function(layero, index){
//window.location.reload(); //window.location.reload();
@ -436,8 +431,8 @@ $(function() {
}); });
} else { } else {
layer.open({ layer.open({
title: '', title: I18n.system_tips ,
content: (data.msg || "更新失败"), content: (data.msg || I18n.system_update_fail ),
icon: '2' icon: '2'
}); });
} }
@ -448,4 +443,20 @@ $(function() {
$("#updateModal .form")[0].reset() $("#updateModal .form")[0].reset()
}); });
/**
* find title by name, GlueType
*/
function findGlueTypeTitle(glueType) {
var glueTypeTitle;
$("#addModal .form select[name=glueType] option").each(function () {
var name = $(this).val();
var title = $(this).text();
if (glueType == name) {
glueTypeTitle = title;
return false
}
});
return glueTypeTitle;
}
}); });

Loading…
Cancel
Save