|
|
@ -33,7 +33,6 @@ $(function() {
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"data": 'jobGroup',
|
|
|
|
"data": 'jobGroup',
|
|
|
|
"visible" : false,
|
|
|
|
"visible" : false,
|
|
|
|
"width":'20%',
|
|
|
|
|
|
|
|
"render": function ( data, type, row ) {
|
|
|
|
"render": function ( data, type, row ) {
|
|
|
|
var groupMenu = $("#jobGroup").find("option");
|
|
|
|
var groupMenu = $("#jobGroup").find("option");
|
|
|
|
for ( var index in $("#jobGroup").find("option")) {
|
|
|
|
for ( var index in $("#jobGroup").find("option")) {
|
|
|
@ -100,37 +99,48 @@ $(function() {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"data": I18n.system_opt ,
|
|
|
|
"data": I18n.system_opt ,
|
|
|
|
"width":'15%',
|
|
|
|
"width":'10%',
|
|
|
|
"render": function ( data, type, row ) {
|
|
|
|
"render": function ( data, type, row ) {
|
|
|
|
return function(){
|
|
|
|
return function(){
|
|
|
|
|
|
|
|
|
|
|
|
// status
|
|
|
|
// status
|
|
|
|
var start_stop = "";
|
|
|
|
var start_stop_div = "";
|
|
|
|
if (1 == row.triggerStatus ) {
|
|
|
|
if (1 == row.triggerStatus ) {
|
|
|
|
start_stop = '<button class="btn btn-primary btn-xs job_operate" _type="job_pause" type="button">'+ I18n.jobinfo_opt_stop +'</button> ';
|
|
|
|
start_stop_div = '<li><a href="javascript:void(0);" class="job_operate" _type="job_pause" >'+ I18n.jobinfo_opt_stop +'</a></li>\n';
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
start_stop = '<button class="btn btn-primary btn-xs job_operate" _type="job_resume" type="button">'+ I18n.jobinfo_opt_start +'</button> ';
|
|
|
|
start_stop_div = '<li><a href="javascript:void(0);" class="job_operate" _type="job_resume" >'+ I18n.jobinfo_opt_start +'</a></li>\n';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// log url
|
|
|
|
// log url
|
|
|
|
var logUrl = base_url +'/joblog?jobId='+ row.id;
|
|
|
|
var logHref = base_url +'/joblog?jobId='+ row.id;
|
|
|
|
|
|
|
|
|
|
|
|
// log url
|
|
|
|
// log url
|
|
|
|
var codeBtn = "";
|
|
|
|
var codeBtn = "";
|
|
|
|
if ('BEAN' != row.glueType) {
|
|
|
|
if ('BEAN' != row.glueType) {
|
|
|
|
var codeUrl = base_url +'/jobcode?jobId='+ row.id;
|
|
|
|
var codeUrl = base_url +'/jobcode?jobId='+ row.id;
|
|
|
|
codeBtn = '<a href="'+ codeUrl +'" target="_blank" > <button class="btn btn-warning btn-xs" type="button" >GLUE</button> </a> '
|
|
|
|
codeBtn = '<li><a href="'+ codeUrl +'" target="_blank" >GLUE IDE</a></li>\n';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// html
|
|
|
|
// data
|
|
|
|
tableData['key'+row.id] = row;
|
|
|
|
tableData['key'+row.id] = row;
|
|
|
|
var html = '<p id="'+ row.id +'" >'+
|
|
|
|
|
|
|
|
'<button class="btn btn-primary btn-xs job_trigger" type="button">'+ I18n.jobinfo_opt_run +'</button> '+
|
|
|
|
// opt
|
|
|
|
start_stop +
|
|
|
|
var html = '<div class="btn-group">\n' +
|
|
|
|
'<a href="'+ logUrl +'"> <button class="btn btn-primary btn-xs" type="job_del" type="button" >'+ I18n.jobinfo_opt_log +'</button> </a> <br> '+
|
|
|
|
' <button type="button" class="btn btn-primary btn-sm">'+ I18n.system_opt +'</button>\n' +
|
|
|
|
'<button class="btn btn-warning btn-xs update" type="button">'+ I18n.system_opt_edit +'</button> '+
|
|
|
|
' <button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown">\n' +
|
|
|
|
|
|
|
|
' <span class="caret"></span>\n' +
|
|
|
|
|
|
|
|
' <span class="sr-only">Toggle Dropdown</span>\n' +
|
|
|
|
|
|
|
|
' </button>\n' +
|
|
|
|
|
|
|
|
' <ul class="dropdown-menu" role="menu" _id="'+ row.id +'" >\n' +
|
|
|
|
|
|
|
|
' <li><a href="javascript:void(0);" class="job_trigger" >'+ I18n.jobinfo_opt_run +'</a></li>\n' +
|
|
|
|
|
|
|
|
start_stop_div +
|
|
|
|
|
|
|
|
' <li><a href="'+ logHref +'">'+ I18n.jobinfo_opt_log +'</a></li>\n' +
|
|
|
|
|
|
|
|
' <li class="divider"></li>\n' +
|
|
|
|
|
|
|
|
' <li><a href="javascript:void(0);" class="update" >'+ I18n.system_opt_edit +'</a></li>\n' +
|
|
|
|
codeBtn +
|
|
|
|
codeBtn +
|
|
|
|
'<button class="btn btn-danger btn-xs job_operate" _type="job_del" type="button">'+ I18n.system_opt_del +'</button> '+
|
|
|
|
' <li><a href="javascript:void(0);" class="job_operate" _type="job_del" >'+ I18n.system_opt_del +'</a></li>\n' +
|
|
|
|
'</p>';
|
|
|
|
' </ul>\n' +
|
|
|
|
|
|
|
|
' </div>';
|
|
|
|
|
|
|
|
|
|
|
|
return html;
|
|
|
|
return html;
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -201,7 +211,7 @@ $(function() {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var id = $(this).parent('p').attr("id");
|
|
|
|
var id = $(this).parents('ul').attr("_id");
|
|
|
|
|
|
|
|
|
|
|
|
layer.confirm( I18n.system_ok + typeName + '?', {
|
|
|
|
layer.confirm( I18n.system_ok + typeName + '?', {
|
|
|
|
icon: 3,
|
|
|
|
icon: 3,
|
|
|
@ -234,7 +244,7 @@ $(function() {
|
|
|
|
|
|
|
|
|
|
|
|
// job trigger
|
|
|
|
// job trigger
|
|
|
|
$("#job_list").on('click', '.job_trigger',function() {
|
|
|
|
$("#job_list").on('click', '.job_trigger',function() {
|
|
|
|
var id = $(this).parent('p').attr("id");
|
|
|
|
var id = $(this).parents('ul').attr("_id");
|
|
|
|
var row = tableData['key'+id];
|
|
|
|
var row = tableData['key'+id];
|
|
|
|
|
|
|
|
|
|
|
|
$("#jobTriggerModal .form input[name='id']").val( row.id );
|
|
|
|
$("#jobTriggerModal .form input[name='id']").val( row.id );
|
|
|
@ -404,7 +414,7 @@ $(function() {
|
|
|
|
// update
|
|
|
|
// update
|
|
|
|
$("#job_list").on('click', '.update',function() {
|
|
|
|
$("#job_list").on('click', '.update',function() {
|
|
|
|
|
|
|
|
|
|
|
|
var id = $(this).parent('p').attr("id");
|
|
|
|
var id = $(this).parents('ul').attr("_id");
|
|
|
|
var row = tableData['key'+id];
|
|
|
|
var row = tableData['key'+id];
|
|
|
|
|
|
|
|
|
|
|
|
// base data
|
|
|
|
// base data
|
|
|
|