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

pull/6/head
xuxueli 7 years ago
parent 7b3db058be
commit e7b61fb75c

@ -24,6 +24,8 @@ system_show=查看
system_empty= system_empty=
system_opt_suc=操作成功 system_opt_suc=操作成功
system_opt_fail=操作失败 system_opt_fail=操作失败
system_opt_edit=编辑
system_opt_del=删除
## daterangepicker ## daterangepicker
daterangepicker_ranges_recent_hour=最近一小时 daterangepicker_ranges_recent_hour=最近一小时
@ -117,8 +119,6 @@ jobinfo_opt_pause=暂停
jobinfo_opt_resume=恢复 jobinfo_opt_resume=恢复
jobinfo_opt_log=日志 jobinfo_opt_log=日志
jobinfo_opt_run=执行 jobinfo_opt_run=执行
jobinfo_opt_edit=编辑
jobinfo_opt_del=删除
## job log ## job log
joblog_name=调度日志 joblog_name=调度日志
@ -157,7 +157,22 @@ joblog_rolling_log_failoften=终止请求Rolling日志,请求失败次数超上
## job group ## job group
jobgroup_name=执行器管理 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 ## help
job_help=使用教程 job_help=使用教程

@ -28,20 +28,20 @@
<div class="col-xs-12"> <div class="col-xs-12">
<div class="box"> <div class="box">
<div class="box-header"> <div class="box-header">
<h3 class="box-title"></h3>&nbsp;&nbsp; <h3 class="box-title">${I18n.jobgroup_list}</h3>&nbsp;&nbsp;
<button class="btn btn-info btn-xs pull-left2 add" >+</button> <button class="btn btn-info btn-xs pull-left2 add" >${I18n.jobgroup_add}</button>
</div> </div>
<div class="box-body"> <div class="box-body">
<table id="joblog_list" class="table table-bordered table-striped display" width="100%" > <table id="joblog_list" class="table table-bordered table-striped display" width="100%" >
<thead> <thead>
<tr> <tr>
<#--<th name="id" >ID</th>--> <#--<th name="id" >ID</th>-->
<th name="order" ></th> <th name="order" >${I18n.jobgroup_field_order}</th>
<th name="appName" >AppName</th> <th name="appName" >AppName</th>
<th name="title" ></th> <th name="title" >${I18n.jobgroup_field_title}</th>
<th name="addressType" ></th> <th name="addressType" >${I18n.jobgroup_field_addressType}</th>
<th name="registryList" >OnLine </th> <th name="registryList" >OnLine ${I18n.jobgroup_field_registryList}</th>
<th name="operate" ></th> <th name="operate" >${I18n.system_opt}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -52,7 +52,7 @@
<td>${group.order}</td> <td>${group.order}</td>
<td>${group.appName}</td> <td>${group.appName}</td>
<td>${group.title}</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> <td>
<#if group.registryList?exists> <#if group.registryList?exists>
<#list group.registryList as item> <#list group.registryList as item>
@ -74,8 +74,8 @@
title="${group.title}" title="${group.title}"
order="${group.order}" order="${group.order}"
addressType="${group.addressType}" addressType="${group.addressType}"
addressList="${group.addressList}" ></button> addressList="${group.addressList}" >${I18n.system_opt_edit}</button>
<button class="btn btn-danger btn-xs remove" id="${group.id}" ></button> <button class="btn btn-danger btn-xs remove" id="${group.id}" >${I18n.system_opt_del}</button>
</td> </td>
</tr> </tr>
</#list> </#list>
@ -94,41 +94,41 @@
<div class="modal-dialog "> <div class="modal-dialog ">
<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.jobgroup_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="lastname" class="col-sm-2 control-label">AppName<font color="red">*</font></label> <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>
<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.jobgroup_field_title}<font color="red">*</font></label>
<div class="col-sm-10"><input type="text" class="form-control" name="title" placeholder="请输入“名称”" maxlength="12" ></div> <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>
<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.jobgroup_field_order}<font color="red">*</font></label>
<div class="col-sm-10"><input type="text" class="form-control" name="order" placeholder="请输入“排序”" maxlength="50" ></div> <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>
<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.jobgroup_field_addressType}<font color="red">*</font></label>
<div class="col-sm-10"> <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; &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> </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.jobgroup_field_registryList}<font color="red">*</font></label>
<div class="col-sm-10"> <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>
</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>
</form> </form>
@ -142,41 +142,41 @@
<div class="modal-dialog "> <div class="modal-dialog ">
<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.jobgroup_edit}</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="lastname" class="col-sm-2 control-label">AppName<font color="red">*</font></label> <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>
<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.jobgroup_field_title}<font color="red">*</font></label>
<div class="col-sm-10"><input type="text" class="form-control" name="title" placeholder="请输入“名称”" maxlength="12" ></div> <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>
<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.jobgroup_field_order}<font color="red">*</font></label>
<div class="col-sm-10"><input type="text" class="form-control" name="order" placeholder="请输入“排序”" maxlength="50" ></div> <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>
<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.jobgroup_field_addressType}<font color="red">*</font></label>
<div class="col-sm-10"> <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; &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> </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.jobgroup_field_registryList}<font color="red">*</font></label>
<div class="col-sm-10"> <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>
</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>

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

@ -125,9 +125,9 @@ $(function() {
'<button class="btn btn-primary btn-xs job_operate" _type="job_trigger" type="button">'+ I18n.jobinfo_opt_run +'</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 + '\')" >'+ I18n.jobinfo_opt_log +'</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">'+ I18n.jobinfo_opt_edit +'</button> '+ '<button class="btn btn-warning btn-xs update" type="button">'+ I18n.system_opt_edit +'</button> '+
codeBtn + 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>'; '</p>';
return html; return html;
@ -192,7 +192,7 @@ $(function() {
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 = I18n.jobinfo_opt_del ; typeName = I18n.system_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) {

Loading…
Cancel
Save