|
@@ -45,7 +45,6 @@ $(function() {
|
45
|
45
|
},
|
46
|
46
|
{ "data": 'jobDesc', "visible" : true},
|
47
|
47
|
{ "data": 'jobCron', "visible" : true},
|
48
|
|
- { "data": 'executorAppname', "visible" : false},
|
49
|
48
|
{ "data": 'executorAddress', "visible" : false},
|
50
|
49
|
{
|
51
|
50
|
"data": 'executorHandler',
|
|
@@ -114,7 +113,6 @@ $(function() {
|
114
|
113
|
' jobDesc="'+ row.jobDesc +'" '+
|
115
|
114
|
' author="'+ row.author +'" '+
|
116
|
115
|
' alarmEmail="'+ row.alarmEmail +'" '+
|
117
|
|
- ' executorAppname="'+row.executorAppname +'" '+
|
118
|
116
|
' executorAddress="'+row.executorAddress +'" '+
|
119
|
117
|
' executorHandler="'+row.executorHandler +'" '+
|
120
|
118
|
' executorParam="'+ row.executorParam +'" '+
|
|
@@ -312,29 +310,18 @@ $(function() {
|
312
|
310
|
$(".remote_panel").show(); // remote
|
313
|
311
|
|
314
|
312
|
$("#addModal .form input[name='executorHandler']").removeAttr("readonly");
|
315
|
|
-
|
316
|
|
- // 注册模式
|
317
|
|
- $("#addModal .form .executorAddress").show();
|
318
|
|
- $("#addModal .form .executorAppname").hide();
|
319
|
313
|
});
|
320
|
314
|
|
321
|
|
- // 注册模式
|
322
|
|
- $(".ifAppName").click(function(){
|
323
|
|
- var ifAppName = $(this).is(':checked');
|
324
|
|
-
|
|
315
|
+ // Auto 注册模式
|
|
316
|
+ $(".addressAuto").click(function(){
|
|
317
|
+ var addressAuto = $(this).is(':checked');
|
325
|
318
|
var $executorAddress = $(this).parents("form").find("input[name='executorAddress']");
|
326
|
|
- var $executorAppname = $(this).parents("form").find("input[name='executorAppname']");
|
327
|
|
- $($executorAddress).val("");
|
328
|
|
- $($executorAppname).val("");
|
329
|
|
-
|
330
|
|
- var $executorAddressDiv = $(this).parents("form").find(".executorAddress");
|
331
|
|
- var $executorAppnameDiv = $(this).parents("form").find(".executorAppname");
|
332
|
|
- if (ifAppName) {
|
333
|
|
- $($executorAddressDiv).hide();
|
334
|
|
- $($executorAppnameDiv).show();
|
|
319
|
+ if (addressAuto) {
|
|
320
|
+ $executorAddress.val("");
|
|
321
|
+ $executorAddress.attr("readonly","readonly");
|
335
|
322
|
} else {
|
336
|
|
- $($executorAddressDiv).show();
|
337
|
|
- $($executorAppnameDiv).hide();
|
|
323
|
+ $executorAddress.val("");
|
|
324
|
+ $executorAddress.removeAttr("readonly");
|
338
|
325
|
}
|
339
|
326
|
});
|
340
|
327
|
|
|
@@ -363,28 +350,27 @@ $(function() {
|
363
|
350
|
$("#updateModal .form input[name='jobCron']").val($(this).parent('p').attr("jobCron"));
|
364
|
351
|
$("#updateModal .form input[name='author']").val($(this).parent('p').attr("author"));
|
365
|
352
|
$("#updateModal .form input[name='alarmEmail']").val($(this).parent('p').attr("alarmEmail"));
|
366
|
|
- $("#updateModal .form input[name='executorAppname']").val($(this).parent('p').attr("executorAppname"));
|
367
|
353
|
$("#updateModal .form input[name='executorAddress']").val($(this).parent('p').attr("executorAddress"));
|
368
|
354
|
$("#updateModal .form input[name='executorHandler']").val($(this).parent('p').attr("executorHandler"));
|
369
|
355
|
$("#updateModal .form input[name='executorParam']").val($(this).parent('p').attr("executorParam"));
|
370
|
356
|
$("#updateModal .form input[name='childJobKey']").val($(this).parent('p').attr("childJobKey"));
|
371
|
357
|
|
|
358
|
+ // addressAuto
|
|
359
|
+ var executorAddress = $(this).parent('p').attr("executorAddress");
|
|
360
|
+ var $addressAuto = $("#updateModal .addressAuto");
|
|
361
|
+ var $executorAddress = $("#updateModal .form input[name='executorAddress']");
|
|
362
|
+ if (executorAddress) {
|
|
363
|
+ $addressAuto.attr("checked", false);
|
|
364
|
+ $executorAddress.removeAttr("readonly");
|
|
365
|
+ } else {
|
|
366
|
+ $addressAuto.attr("checked", true);
|
|
367
|
+ $executorAddress.attr("readonly","readonly");
|
|
368
|
+ }
|
|
369
|
+
|
372
|
370
|
// jobGroupTitle
|
373
|
371
|
var jobGroupTitle = $("#addModal .form select[name='jobGroup']").find("option[value='" + $(this).parent('p').attr("jobGroup") + "']").text();
|
374
|
372
|
$("#updateModal .form .jobGroupTitle").val(jobGroupTitle);
|
375
|
373
|
|
376
|
|
- // appname / address, switch
|
377
|
|
- var $executorAppname = $(this).parent('p').attr("executorAppname");
|
378
|
|
- if ($executorAppname) {
|
379
|
|
- $("#updateModal .form .ifAppName").attr("checked", true);
|
380
|
|
- $("#updateModal .form .executorAppname").show();
|
381
|
|
- $("#updateModal .form .executorAddress").hide();
|
382
|
|
- } else {
|
383
|
|
- $("#updateModal .form .ifAppName").attr("checked", false);
|
384
|
|
- $("#updateModal .form .executorAppname").hide();
|
385
|
|
- $("#updateModal .form .executorAddress").show();
|
386
|
|
- }
|
387
|
|
-
|
388
|
374
|
// glueSwitch
|
389
|
375
|
var glueSwitch = $(this).parent('p').attr("glueSwitch");
|
390
|
376
|
$("#updateModal .form input[name='glueSwitch']").val(glueSwitch);
|