执行器界面,完整国际化定制

master
xuxueli 7 years ago
parent 7b3db058be
commit e7b61fb75c
  1. 21
      xxl-job-admin/src/main/resources/i18n/message.properties
  2. 72
      xxl-job-admin/src/main/webapp/WEB-INF/template/jobgroup/jobgroup.index.ftl
  3. 72
      xxl-job-admin/src/main/webapp/static/js/jobgroup.index.1.js
  4. 6
      xxl-job-admin/src/main/webapp/static/js/jobinfo.index.1.js

@ -24,6 +24,8 @@ system_show=查看
system_empty=无
system_opt_suc=操作成功
system_opt_fail=操作失败
system_opt_edit=编辑
system_opt_del=删除
## daterangepicker
daterangepicker_ranges_recent_hour=最近一小时
@ -117,8 +119,6 @@ jobinfo_opt_pause=暂停
jobinfo_opt_resume=恢复
jobinfo_opt_log=日志
jobinfo_opt_run=执行
jobinfo_opt_edit=编辑
jobinfo_opt_del=删除
## job log
joblog_name=调度日志
@ -157,7 +157,22 @@ joblog_rolling_log_failoften=终止请求Rolling日志,请求失败次数超上
## job group
jobgroup_name=执行器管理
jobgroup_list=执行器列表
jobgroup_add=新增执行器
jobgroup_edit=编辑执行器
jobgroup_del=删除执行器
jobgroup_field_order=排序
jobgroup_field_title=名称
jobgroup_field_addressType=注册方式
jobgroup_field_addressType_0=自动注册
jobgroup_field_addressType_1=手动录入
jobgroup_field_registryList=机器地址
jobgroup_field_registryList_placeholder=请输入执行器地址列表,多地址逗号分隔
jobgroup_field_appName_limit=限制以小写字母开头,由小写字母、数字和中划线组成
jobgroup_field_appName_length=AppName长度限制为4~64
jobgroup_field_title_length=名称长度限制为4~12
jobgroup_field_order_digits=请输入整数
jobgroup_field_orderrange=取值范围为1~1000
## help
job_help=使用教程

@ -28,20 +28,20 @@
<div class="col-xs-12">
<div class="box">
<div class="box-header">
<h3 class="box-title">执行器列表</h3>&nbsp;&nbsp;
<button class="btn btn-info btn-xs pull-left2 add" >+新增执行器</button>
<h3 class="box-title">${I18n.jobgroup_list}</h3>&nbsp;&nbsp;
<button class="btn btn-info btn-xs pull-left2 add" >${I18n.jobgroup_add}</button>
</div>
<div class="box-body">
<table id="joblog_list" class="table table-bordered table-striped display" width="100%" >
<thead>
<tr>
<#--<th name="id" >ID</th>-->
<th name="order" >排序</th>
<th name="order" >${I18n.jobgroup_field_order}</th>
<th name="appName" >AppName</th>
<th name="title" >名称</th>
<th name="addressType" >注册方式</th>
<th name="registryList" >OnLine 机器</th>
<th name="operate" >操作</th>
<th name="title" >${I18n.jobgroup_field_title}</th>
<th name="addressType" >${I18n.jobgroup_field_addressType}</th>
<th name="registryList" >OnLine ${I18n.jobgroup_field_registryList}</th>
<th name="operate" >${I18n.system_opt}</th>
</tr>
</thead>
<tbody>
@ -52,7 +52,7 @@
<td>${group.order}</td>
<td>${group.appName}</td>
<td>${group.title}</td>
<td><#if group.addressType==0>自动注册<#else>手动录入</#if></td>
<td><#if group.addressType==0>${I18n.jobgroup_field_addressType_0}<#else>${I18n.jobgroup_field_addressType_1}</#if></td>
<td>
<#if group.registryList?exists>
<#list group.registryList as item>
@ -74,8 +74,8 @@
title="${group.title}"
order="${group.order}"
addressType="${group.addressType}"
addressList="${group.addressList}" >编辑</button>
<button class="btn btn-danger btn-xs remove" id="${group.id}" >删除</button>
addressList="${group.addressList}" >${I18n.system_opt_edit}</button>
<button class="btn btn-danger btn-xs remove" id="${group.id}" >${I18n.system_opt_del}</button>
</td>
</tr>
</#list>
@ -94,41 +94,41 @@
<div class="modal-dialog ">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" >新增执行器</h4>
<h4 class="modal-title" >${I18n.jobgroup_add}</h4>
</div>
<div class="modal-body">
<form class="form-horizontal form" role="form" >
<div class="form-group">
<label for="lastname" class="col-sm-2 control-label">AppName<font color="red">*</font></label>
<div class="col-sm-10"><input type="text" class="form-control" name="appName" placeholder="请输入“AppName”" maxlength="64" ></div>
<div class="col-sm-10"><input type="text" class="form-control" name="appName" placeholder="${I18n.system_please_input}AppName" maxlength="64" ></div>
</div>
<div class="form-group">
<label for="lastname" class="col-sm-2 control-label">名称<font color="red">*</font></label>
<div class="col-sm-10"><input type="text" class="form-control" name="title" placeholder="请输入“名称”" maxlength="12" ></div>
<label for="lastname" class="col-sm-2 control-label">${I18n.jobgroup_field_title}<font color="red">*</font></label>
<div class="col-sm-10"><input type="text" class="form-control" name="title" placeholder="${I18n.system_please_input}${I18n.jobgroup_field_title}" maxlength="12" ></div>
</div>
<div class="form-group">
<label for="lastname" class="col-sm-2 control-label">排序<font color="red">*</font></label>
<div class="col-sm-10"><input type="text" class="form-control" name="order" placeholder="请输入“排序”" maxlength="50" ></div>
<label for="lastname" class="col-sm-2 control-label">${I18n.jobgroup_field_order}<font color="red">*</font></label>
<div class="col-sm-10"><input type="text" class="form-control" name="order" placeholder="${I18n.system_please_input}${I18n.jobgroup_field_order}" maxlength="50" ></div>
</div>
<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.jobgroup_field_addressType}<font color="red">*</font></label>
<div class="col-sm-10">
<input type="radio" name="addressType" value="0" checked />自动注册
<input type="radio" name="addressType" value="0" checked />${I18n.jobgroup_field_addressType_0}
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="radio" name="addressType" value="1" />手动录入
<input type="radio" name="addressType" value="1" />${I18n.jobgroup_field_addressType_1}
</div>
</div>
<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.jobgroup_field_registryList}<font color="red">*</font></label>
<div class="col-sm-10">
<textarea class="textarea" name="addressList" maxlength="512" placeholder="请输入执行器地址列表,多地址逗号分隔" readonly="readonly" style="background-color:#eee; width: 100%; height: 100px; font-size: 14px; line-height: 10px; border: 1px solid #dddddd; padding: 10px;"></textarea>
<textarea class="textarea" name="addressList" maxlength="512" placeholder="${I18n.jobgroup_field_registryList_placeholder}" readonly="readonly" style="background-color:#eee; width: 100%; height: 100px; font-size: 14px; line-height: 10px; border: 1px solid #dddddd; padding: 10px;"></textarea>
</div>
</div>
<hr>
<div class="form-group">
<div class="col-sm-offset-3 col-sm-6">
<button type="submit" class="btn btn-primary" >保存</button>
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
<button type="submit" class="btn btn-primary" >${I18n.system_save}</button>
<button type="button" class="btn btn-default" data-dismiss="modal">${I18n.system_cancel}</button>
</div>
</div>
</form>
@ -142,41 +142,41 @@
<div class="modal-dialog ">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" >编辑执行器</h4>
<h4 class="modal-title" >${I18n.jobgroup_edit}</h4>
</div>
<div class="modal-body">
<form class="form-horizontal form" role="form" >
<div class="form-group">
<label for="lastname" class="col-sm-2 control-label">AppName<font color="red">*</font></label>
<div class="col-sm-10"><input type="text" class="form-control" name="appName" placeholder="请输入“AppName”" maxlength="64" ></div>
<div class="col-sm-10"><input type="text" class="form-control" name="appName" placeholder="${I18n.system_please_input}AppName" maxlength="64" ></div>
</div>
<div class="form-group">
<label for="lastname" class="col-sm-2 control-label">名称<font color="red">*</font></label>
<div class="col-sm-10"><input type="text" class="form-control" name="title" placeholder="请输入“名称”" maxlength="12" ></div>
<label for="lastname" class="col-sm-2 control-label">${I18n.jobgroup_field_title}<font color="red">*</font></label>
<div class="col-sm-10"><input type="text" class="form-control" name="title" placeholder="${I18n.system_please_input}${I18n.jobgroup_field_title}" maxlength="12" ></div>
</div>
<div class="form-group">
<label for="lastname" class="col-sm-2 control-label">排序<font color="red">*</font></label>
<div class="col-sm-10"><input type="text" class="form-control" name="order" placeholder="请输入“排序”" maxlength="50" ></div>
<label for="lastname" class="col-sm-2 control-label">${I18n.jobgroup_field_order}<font color="red">*</font></label>
<div class="col-sm-10"><input type="text" class="form-control" name="order" placeholder="${I18n.system_please_input}${I18n.jobgroup_field_order}" maxlength="50" ></div>
</div>
<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.jobgroup_field_addressType}<font color="red">*</font></label>
<div class="col-sm-10">
<input type="radio" name="addressType" value="0" />自动注册
<input type="radio" name="addressType" value="0" />${I18n.jobgroup_field_addressType_0}
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="radio" name="addressType" value="1" />手动录入
<input type="radio" name="addressType" value="1" />${I18n.jobgroup_field_addressType_1}
</div>
</div>
<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.jobgroup_field_registryList}<font color="red">*</font></label>
<div class="col-sm-10">
<textarea class="textarea" name="addressList" maxlength="512" placeholder="请输入执行器地址列表,多地址逗号分隔" readonly="readonly" style="background-color:#eee; width: 100%; height: 100px; font-size: 14px; line-height: 10px; border: 1px solid #dddddd; padding: 10px;"></textarea>
<textarea class="textarea" name="addressList" maxlength="512" placeholder="${I18n.jobgroup_field_registryList_placeholder}" readonly="readonly" style="background-color:#eee; width: 100%; height: 100px; font-size: 14px; line-height: 10px; border: 1px solid #dddddd; padding: 10px;"></textarea>
</div>
</div>
<hr>
<div class="form-group">
<div class="col-sm-offset-3 col-sm-6">
<button type="submit" class="btn btn-primary" >保存</button>
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
<button type="submit" class="btn btn-primary" >${I18n.system_save}</button>
<button type="button" class="btn btn-default" data-dismiss="modal">${I18n.system_cancel}</button>
<input type="hidden" name="id" >
</div>
</div>

@ -4,7 +4,7 @@ $(function() {
$('.remove').on('click', function(){
var id = $(this).attr('id');
layer.confirm('确认删除分组?', {icon: 3, title:'系统提示'}, function(index){
layer.confirm( (I18n.system_ok + I18n.jobgroup_del + '?') , {icon: 3, title: I18n.system_tips }, function(index){
layer.close(index);
$.ajax({
@ -15,8 +15,8 @@ $(function() {
success : function(data){
if (data.code == 200) {
layer.open({
title: '系统提示',
content: '删除成功',
title: I18n.system_tips ,
content: (I18n.jobgroup_del + I18n.system_success),
icon: '1',
end: function(layero, index){
window.location.reload();
@ -24,8 +24,8 @@ $(function() {
});
} else {
layer.open({
title: '系统提示',
content: (data.msg || "删除失败"),
title: I18n.system_tips,
content: (data.msg || (I18n.jobgroup_del + I18n.system_fail)),
icon: '2'
});
}
@ -40,7 +40,7 @@ $(function() {
var length = value.length;
var valid = /^[a-z][a-zA-Z0-9-]*$/;
return this.optional(element) || valid.test(value);
}, "限制以小写字母开头,由小写字母、数字和中划线组成");
}, I18n.jobgroup_field_appName_limit );
$('.add').on('click', function(){
$('#addModal').modal({backdrop: false, keyboard: false}).modal('show');
@ -67,18 +67,18 @@ $(function() {
},
messages : {
appName : {
required :"请输入“AppName",
rangelength:"AppName长度限制为4~64",
myValid01: "限制以小写字母开头,由小写字母、数字和中划线组成"
required : I18n.system_please_input+"AppName",
rangelength: I18n.jobgroup_field_appName_length ,
myValid01: I18n.jobgroup_field_appName_limit
},
title : {
required :"请输入“执行器名称”",
rangelength:"长度限制为4~12"
required : I18n.system_please_input + I18n.jobgroup_field_title ,
rangelength: I18n.jobgroup_field_title_length
},
order : {
required :"请输入“排序”",
digits: "请输入整数",
range: "取值范围为1~1000"
required : I18n.system_please_input + I18n.jobgroup_field_order ,
digits: I18n.jobgroup_field_order_digits ,
range: I18n.jobgroup_field_orderrange
}
},
highlight : function(element) {
@ -96,8 +96,8 @@ $(function() {
if (data.code == "200") {
$('#addModal').modal('hide');
layer.open({
title: '系统提示',
content: '新增成功',
title: I18n.system_tips ,
content: I18n.system_add_suc ,
icon: '1',
end: function(layero, index){
window.location.reload();
@ -105,8 +105,8 @@ $(function() {
});
} else {
layer.open({
title: '系统提示',
content: (data.msg || "新增失败"),
title: I18n.system_tips,
content: (data.msg || I18n.system_add_fail ),
icon: '2'
});
}
@ -171,20 +171,20 @@ $(function() {
}
},
messages : {
appName : {
required :"请输入“AppName",
rangelength:"AppName长度限制为4~64",
myValid01: "限制以小写字母开头,由小写字母、数字和中划线组成"
},
title : {
required :"请输入“执行器名称”",
rangelength:"长度限制为4~12"
},
order : {
required :"请输入“排序”",
digits: "请输入整数",
range: "取值范围为1~1000"
}
appName : {
required : I18n.system_please_input+"AppName",
rangelength: I18n.jobgroup_field_appName_length ,
myValid01: I18n.jobgroup_field_appName_limit
},
title : {
required : I18n.system_please_input + I18n.jobgroup_field_title ,
rangelength: I18n.jobgroup_field_title_length
},
order : {
required : I18n.system_please_input + I18n.jobgroup_field_order ,
digits: I18n.jobgroup_field_order_digits ,
range: I18n.jobgroup_field_orderrange
}
},
highlight : function(element) {
$(element).closest('.form-group').addClass('has-error');
@ -202,8 +202,8 @@ $(function() {
$('#addModal').modal('hide');
layer.open({
title: '系统提示',
content: '更新成功',
title: I18n.system_tips ,
content: I18n.system_update_suc ,
icon: '1',
end: function(layero, index){
window.location.reload();
@ -211,8 +211,8 @@ $(function() {
});
} else {
layer.open({
title: '系统提示',
content: (data.msg || "更新失败"),
title: I18n.system_tips,
content: (data.msg || I18n.system_update_fail ),
icon: '2'
});
}

@ -125,9 +125,9 @@ $(function() {
'<button class="btn btn-primary btn-xs job_operate" _type="job_trigger" type="button">'+ I18n.jobinfo_opt_run +'</button> '+
pause_resume +
'<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">'+ I18n.jobinfo_opt_edit +'</button> '+
'<button class="btn btn-warning btn-xs update" type="button">'+ I18n.system_opt_edit +'</button> '+
codeBtn +
'<button class="btn btn-danger btn-xs job_operate" _type="job_del" type="button">'+ I18n.jobinfo_opt_del +'</button> '+
'<button class="btn btn-danger btn-xs job_operate" _type="job_del" type="button">'+ I18n.system_opt_del +'</button> '+
'</p>';
return html;
@ -192,7 +192,7 @@ $(function() {
url = base_url + "/jobinfo/resume";
needFresh = true;
} else if ("job_del" == type) {
typeName = I18n.jobinfo_opt_del ;
typeName = I18n.system_opt_del ;
url = base_url + "/jobinfo/remove";
needFresh = true;
} else if ("job_trigger" == type) {

Loading…
Cancel
Save