|
@@ -219,6 +219,8 @@ var souMaxSize; |
|
@@ -219,6 +219,8 @@ var souMaxSize; |
219
|
var souBranch;
|
219
|
var souBranch;
|
220
|
//原实例ip
|
220
|
//原实例ip
|
221
|
var souInstanceIps;
|
221
|
var souInstanceIps;
|
|
|
222
|
+//原实例ip,并且非保护
|
|
|
223
|
+var souInstanceNoneProtectedIps;
|
222
|
var newInstanceIps;
|
224
|
var newInstanceIps;
|
223
|
var souProjectNames;
|
225
|
var souProjectNames;
|
224
|
//修改伸缩组
|
226
|
//修改伸缩组
|
|
@@ -233,6 +235,7 @@ function changeServer(scalingGroupId, groupName,awsGroupName, protectedFromCount |
|
@@ -233,6 +235,7 @@ function changeServer(scalingGroupId, groupName,awsGroupName, protectedFromCount |
233
|
souInstanceIps="";
|
235
|
souInstanceIps="";
|
234
|
newInstanceIps="";
|
236
|
newInstanceIps="";
|
235
|
souProjectNames="";
|
237
|
souProjectNames="";
|
|
|
238
|
+ souInstanceNoneProtectedIps="";
|
236
|
|
239
|
|
237
|
$("#myModalLabel").text("");
|
240
|
$("#myModalLabel").text("");
|
238
|
$("#protectedFromCount").val("");
|
241
|
$("#protectedFromCount").val("");
|
|
@@ -326,37 +329,133 @@ function changeOk(){ |
|
@@ -326,37 +329,133 @@ function changeOk(){ |
326
|
writeToText("获取原实例ip获取完成");
|
329
|
writeToText("获取原实例ip获取完成");
|
327
|
souProjectNames = getDeployProjectNames(scalingGroupName);
|
330
|
souProjectNames = getDeployProjectNames(scalingGroupName);
|
328
|
writeToText("该伸缩组部署的项目列表:"+souProjectNames);
|
331
|
writeToText("该伸缩组部署的项目列表:"+souProjectNames);
|
329
|
- $.ajax({
|
|
|
330
|
- url: contextPath + 'autoScalingTool/modifyScalingGroup?cloudType=' + parseInt($("#cloudType").val()),
|
|
|
331
|
- type: 'POST',
|
|
|
332
|
- data: cloudParms,
|
|
|
333
|
- dataType: 'json',
|
|
|
334
|
- success: function (data) {
|
|
|
335
|
- if (!data || data.code != 200) {
|
|
|
336
|
- alert('修改伸缩组失败:'+data.message);
|
332
|
+
|
|
|
333
|
+ $("#myModalMessageLabel").text(scalingGroupName + ":正在 " + showMessage);
|
|
|
334
|
+ $("#myModalMessage").modal('show');
|
|
|
335
|
+ $("#myModalMessage").unbind("keyup");
|
|
|
336
|
+ $(".modal-backdrop").unbind("click");
|
|
|
337
|
+
|
|
|
338
|
+ $("#closeButton").attr("disabled","disabled");
|
|
|
339
|
+
|
|
|
340
|
+ //如果是缩容,并且如果是java项目的缩容,需要先停止非保护机器(kill相关机器的java项目进程,从zk中移除),再执行缩容,再拉起
|
|
|
341
|
+ if( "缩容"==showMessage){
|
|
|
342
|
+ if(scalingGroupName!="PCH5-memcache"&&scalingGroupName!="java-gateway-memcache"
|
|
|
343
|
+ &&scalingGroupName!="PCH5-AutoScaling"&&scalingGroupName!="PCH5-NODE"
|
|
|
344
|
+ &&scalingGroupName!="ELASTICSEARCH"&&scalingGroupName.indexOf("nginx")<0)
|
|
|
345
|
+ {
|
|
|
346
|
+ writeToText("java项目的缩容,需要先停止非受保护机器,请稍后...");
|
|
|
347
|
+
|
|
|
348
|
+ var paramStopNoneProtectedJava={};
|
|
|
349
|
+ paramStopNoneProtectedJava.cloudType=$("#cloudType").val();
|
|
|
350
|
+ paramStopNoneProtectedJava.groupName=aws_scalingGroupName;
|
|
|
351
|
+ paramStopNoneProtectedJava.groupId=souScalingGroupId;
|
|
|
352
|
+ paramStopNoneProtectedJava.projects=souProjectNames;
|
|
|
353
|
+ var rtnProcMsgId=stopNoneProtectedJavaProcessForUnDeploy(paramStopNoneProtectedJava);
|
|
|
354
|
+
|
|
|
355
|
+ if(rtnProcMsgId.length>0){
|
|
|
356
|
+ var count=0;
|
|
|
357
|
+ var urlMsg=contextPath + "/javaRestart/getMessageStatus";
|
|
|
358
|
+ var intervalIndex = setInterval(function() {
|
|
|
359
|
+ $.ajax({
|
|
|
360
|
+ url: urlMsg,
|
|
|
361
|
+ type: "post",
|
|
|
362
|
+ dataType: "json",
|
|
|
363
|
+ //async: false,
|
|
|
364
|
+ //timeout:120000, //超时时间:120秒
|
|
|
365
|
+ data: {
|
|
|
366
|
+ ids:rtnProcMsgId
|
|
|
367
|
+ },
|
|
|
368
|
+ success: function (checkResponse) {
|
|
|
369
|
+ count++;
|
|
|
370
|
+ if(checkResponse!=null&&checkResponse.code==200&&checkResponse.data=="ok"){
|
|
|
371
|
+ clearInterval(intervalIndex);
|
|
|
372
|
+ writeToText(">>>---stop ok!");
|
|
|
373
|
+ beginModifyScalingGroup(cloudParms,showMessage);
|
|
|
374
|
+ }else if(count > 30){
|
|
|
375
|
+ clearInterval(intervalIndex);
|
|
|
376
|
+ writeToText(">>>---超过规定的次数,直接跳过,进入下一步!");//3分钟
|
|
|
377
|
+ beginModifyScalingGroup(cloudParms,showMessage);
|
|
|
378
|
+ }else{
|
|
|
379
|
+ writeToText("..........*return process status >>>>>>"+checkResponse.data);
|
|
|
380
|
+ }
|
|
|
381
|
+ },
|
|
|
382
|
+ error: function (e) {
|
|
|
383
|
+ clearInterval(intervalIndex);
|
|
|
384
|
+ writeToText("getMessageStatus发生错误, 程序终止..........");
|
|
|
385
|
+ requestError(urlMsg);
|
|
|
386
|
+ }
|
|
|
387
|
+ });
|
|
|
388
|
+ }, 6000);
|
337
|
}else{
|
389
|
}else{
|
338
|
- if(showMessage == "" || showMessage == undefined){
|
|
|
339
|
- alert("修改基础信息成功!");
|
|
|
340
|
- clear_Sour();
|
|
|
341
|
- return;
|
|
|
342
|
- }
|
|
|
343
|
- $("#myModalMessageLabel").text(scalingGroupName + ":正在 " + showMessage);
|
|
|
344
|
- $("#myModalMessage").modal('show');
|
|
|
345
|
- $("#myModalMessage").unbind("keyup");
|
|
|
346
|
- $(".modal-backdrop").unbind("click");
|
390
|
+ beginModifyScalingGroup(cloudParms,showMessage);
|
|
|
391
|
+ }
|
|
|
392
|
+ }else{
|
|
|
393
|
+ beginModifyScalingGroup(cloudParms,showMessage);
|
|
|
394
|
+ }
|
|
|
395
|
+ }else{
|
|
|
396
|
+ beginModifyScalingGroup(cloudParms,showMessage);
|
|
|
397
|
+ }
|
|
|
398
|
+ }
|
|
|
399
|
+}
|
347
|
|
400
|
|
348
|
- $("#closeButton").attr("disabled","disabled");
|
401
|
+function beginModifyScalingGroup(cloudParms,showMessage) {
|
|
|
402
|
+ writeToText("开始修改伸缩组信息..........");
|
|
|
403
|
+ $.ajax({
|
|
|
404
|
+ url: contextPath + 'autoScalingTool/modifyScalingGroup?cloudType=' + parseInt($("#cloudType").val()),
|
|
|
405
|
+ type: 'POST',
|
|
|
406
|
+ data: cloudParms,
|
|
|
407
|
+ dataType: 'json',
|
|
|
408
|
+ success: function (data) {
|
|
|
409
|
+ if (!data || data.code != 200) {
|
|
|
410
|
+ alert('修改伸缩组失败:'+data.message);
|
|
|
411
|
+ }else{
|
|
|
412
|
+ if(showMessage == "" || showMessage == undefined){
|
|
|
413
|
+ alert("修改基础信息成功!");
|
|
|
414
|
+ clear_Sour();
|
|
|
415
|
+ return;
|
|
|
416
|
+ }
|
349
|
|
417
|
|
350
|
- //1:开始伸缩通知,成功扩容后才能执行下一步
|
|
|
351
|
- refCloudMessage($("#cloudType").val(),showMessage, Math.abs(souDesiredCapacity - desiredCapacity),desiredCapacity);
|
418
|
+ //1:开始伸缩通知,成功扩容后才能执行下一步
|
|
|
419
|
+ refCloudMessage($("#cloudType").val(),showMessage, Math.abs(souDesiredCapacity - cloudParms.desiredCapacity),cloudParms.desiredCapacity);
|
|
|
420
|
+ }
|
|
|
421
|
+ },
|
|
|
422
|
+ error: function (e) {
|
|
|
423
|
+ alert('系统异常');
|
|
|
424
|
+ clear_Sour();
|
|
|
425
|
+ }
|
|
|
426
|
+ });
|
|
|
427
|
+}
|
|
|
428
|
+
|
|
|
429
|
+//调用java stop
|
|
|
430
|
+function stopNoneProtectedJavaProcessForUnDeploy(paramFront) {
|
|
|
431
|
+ writeToText(">>> 非保护 java 项目停止,开始检查,请稍后...");
|
|
|
432
|
+ var url = contextPath + "/autoScalingTool/stopNoneProtectedJavaProcess";
|
|
|
433
|
+ var rtnProcMsgId="";
|
|
|
434
|
+ $.ajax({
|
|
|
435
|
+ url: url,
|
|
|
436
|
+ type: "post",
|
|
|
437
|
+ dataType: "json",
|
|
|
438
|
+ async: false,
|
|
|
439
|
+ data: paramFront,
|
|
|
440
|
+ success: function (response) {
|
|
|
441
|
+ if(response!=null&&response.code==200){
|
|
|
442
|
+ rtnProcMsgId=response.data.rtnProcMsgId;
|
|
|
443
|
+ var stopJavaFlag=response.data.stopJavaFlag;
|
|
|
444
|
+ writeToText(">>> java 项目停止,免于停止的受保护ip..."+response.data.protectedIps);
|
|
|
445
|
+ if("1"==stopJavaFlag){
|
|
|
446
|
+ souInstanceNoneProtectedIps=response.data.noneProtectedIps;
|
|
|
447
|
+ writeToText(">>> java 项目停止,停止的ip..."+response.data.noneProtectedIps);
|
|
|
448
|
+ writeToText(">>> java 项目停止,返回操作进程列表..."+rtnProcMsgId);
|
|
|
449
|
+ }else{
|
|
|
450
|
+ writeToText(">>> java 项目停止, 不存在需要停止的机器,此步骤跳过!");
|
352
|
}
|
451
|
}
|
353
|
- },
|
|
|
354
|
- error: function (e) {
|
|
|
355
|
- alert('系统异常');
|
|
|
356
|
- clear_Sour();
|
|
|
357
|
}
|
452
|
}
|
358
|
- });
|
|
|
359
|
- }
|
453
|
+ },
|
|
|
454
|
+ error: function (e) {
|
|
|
455
|
+ requestError(url);
|
|
|
456
|
+ }
|
|
|
457
|
+ });
|
|
|
458
|
+ return rtnProcMsgId;
|
360
|
}
|
459
|
}
|
361
|
|
460
|
|
362
|
function clear_Sour(){
|
461
|
function clear_Sour(){
|
|
@@ -368,6 +467,7 @@ function clear_Sour(){ |
|
@@ -368,6 +467,7 @@ function clear_Sour(){ |
368
|
souInstanceIps ="";
|
467
|
souInstanceIps ="";
|
369
|
newInstanceIps="";
|
468
|
newInstanceIps="";
|
370
|
souProjectNames="";
|
469
|
souProjectNames="";
|
|
|
470
|
+ souInstanceNoneProtectedIps="";
|
371
|
}
|
471
|
}
|
372
|
|
472
|
|
373
|
//腾讯云:修改伸缩组后的下一个流程是查询伸缩活动
|
473
|
//腾讯云:修改伸缩组后的下一个流程是查询伸缩活动
|
|
@@ -523,12 +623,62 @@ function unDeploy(showMessage){ |
|
@@ -523,12 +623,62 @@ function unDeploy(showMessage){ |
523
|
}else if(scalingGroupName.indexOf("nginx")>=0){
|
623
|
}else if(scalingGroupName.indexOf("nginx")>=0){
|
524
|
updateNginxInfo(showMessage);
|
624
|
updateNginxInfo(showMessage);
|
525
|
}else{
|
625
|
}else{
|
526
|
- writeToText("正在更新git-iptables,请稍后...");
|
|
|
527
|
- //缩java之前先把主机从zk移除,即调用java的stop服务
|
|
|
528
|
- var suoProcessMsgId=stopJavaProcess();
|
626
|
+ //把之前停掉的机器启动
|
|
|
627
|
+ if(souInstanceNoneProtectedIps!=null&&souInstanceNoneProtectedIps.length>0){
|
|
|
628
|
+ writeToText("原stop的机器ip为 "+souInstanceNoneProtectedIps);
|
|
|
629
|
+ var restartProcessMsgId=restartJavaProcess();
|
|
|
630
|
+ if(restartProcessMsgId!=null&&restartProcessMsgId.length>0){
|
|
|
631
|
+ writeToText("等待java 进程重启,检查进程restartProcessMsgId "+restartProcessMsgId);
|
|
|
632
|
+
|
|
|
633
|
+ var urlMsg=contextPath + "/javaRestart/getMessageStatus";
|
|
|
634
|
+ var count=0;
|
|
|
635
|
+ var intervalIndex = setInterval(function() {
|
|
|
636
|
+ $.ajax({
|
|
|
637
|
+ url: urlMsg,
|
|
|
638
|
+ type: "post",
|
|
|
639
|
+ dataType: "json",
|
|
|
640
|
+ //async: false,
|
|
|
641
|
+ //timeout:120000, //超时时间:120秒
|
|
|
642
|
+ data: {
|
|
|
643
|
+ ids:restartProcessMsgId
|
|
|
644
|
+ },
|
|
|
645
|
+ success: function (checkResponse) {
|
|
|
646
|
+ count++;
|
|
|
647
|
+ if(checkResponse!=null&&checkResponse.code == 200&&checkResponse.data=="ok"){
|
|
|
648
|
+ clearInterval(intervalIndex);
|
|
|
649
|
+ writeToText(">>>---restart ok!");
|
|
|
650
|
+ //5:更新git文件
|
|
|
651
|
+ editToGit(showMessage);
|
|
|
652
|
+ }else if(count>=30){
|
|
|
653
|
+ clearInterval(intervalIndex);
|
|
|
654
|
+ writeToText(">>>---检查次数超过上线,直接跳过 !");
|
|
|
655
|
+ //5:更新git文件
|
|
|
656
|
+ editToGit(showMessage);
|
|
|
657
|
+ }else{
|
|
|
658
|
+ writeToText("..........*return process status >>>>>>"+checkResponse.data);
|
|
|
659
|
+ }
|
|
|
660
|
+ },
|
|
|
661
|
+ error: function (e) {
|
|
|
662
|
+ count++;
|
|
|
663
|
+ writeToText("Restart getMessageStatus发生错误,不影响整体步骤,继续");
|
|
|
664
|
+ //即使失败也继续进行
|
|
|
665
|
+ /*clearInterval(intervalIndex);
|
|
|
666
|
+ writeToText("getMessageStatus发生错误, 程序终止..........");
|
|
|
667
|
+ requestError(urlMsg);*/
|
|
|
668
|
+ }
|
|
|
669
|
+ });
|
|
|
670
|
+ }, 6000);
|
|
|
671
|
+
|
|
|
672
|
+ }else{
|
|
|
673
|
+ //5:更新git文件
|
|
|
674
|
+ editToGit(showMessage);
|
|
|
675
|
+ }
|
|
|
676
|
+ }else{
|
|
|
677
|
+ writeToText("不存在需要重启的机器,直接进入下一步 ");
|
|
|
678
|
+ //5:更新git文件
|
|
|
679
|
+ editToGit(showMessage);
|
|
|
680
|
+ }
|
529
|
|
681
|
|
530
|
- //5:更新git文件
|
|
|
531
|
- editToGit(showMessage);
|
|
|
532
|
}
|
682
|
}
|
533
|
}
|
683
|
}
|
534
|
|
684
|
|
|
@@ -920,101 +1070,72 @@ function updateAnsibleDeployForNode_2_gitupstream(showMessage){ |
|
@@ -920,101 +1070,72 @@ function updateAnsibleDeployForNode_2_gitupstream(showMessage){ |
920
|
}
|
1070
|
}
|
921
|
|
1071
|
|
922
|
//调用java stop
|
1072
|
//调用java stop
|
923
|
-function stopJavaProcess() {
|
|
|
924
|
- writeToText(">>>java 项目 stop,请稍后...");
|
1073
|
+function restartJavaProcess() {
|
|
|
1074
|
+ writeToText(">>>java 项目 restart,请稍后...");
|
|
|
1075
|
+
|
925
|
var rtnProcMsgId="";
|
1076
|
var rtnProcMsgId="";
|
926
|
var suoIps="";
|
1077
|
var suoIps="";
|
927
|
var tmpNewIps=newInstanceIps+",";
|
1078
|
var tmpNewIps=newInstanceIps+",";
|
928
|
- var array_souInstanceIps=souInstanceIps.split(",");
|
1079
|
+ var array_souInstanceIps=souInstanceNoneProtectedIps.split(",");
|
929
|
for(var i=0;i<array_souInstanceIps.length;i++){
|
1080
|
for(var i=0;i<array_souInstanceIps.length;i++){
|
930
|
var oldTmpIp=array_souInstanceIps[i];
|
1081
|
var oldTmpIp=array_souInstanceIps[i];
|
931
|
var tmpWithComm=oldTmpIp+",";
|
1082
|
var tmpWithComm=oldTmpIp+",";
|
932
|
- if(tmpNewIps.indexOf(tmpWithComm)<0){
|
1083
|
+ if(tmpNewIps.indexOf(tmpWithComm)>=0){
|
933
|
if(suoIps.length>0){
|
1084
|
if(suoIps.length>0){
|
934
|
suoIps+=",";
|
1085
|
suoIps+=",";
|
935
|
}
|
1086
|
}
|
936
|
suoIps += oldTmpIp;
|
1087
|
suoIps += oldTmpIp;
|
937
|
}
|
1088
|
}
|
938
|
}
|
1089
|
}
|
939
|
- writeToText(">>>java 项目缩调的ip为:"+suoIps);
|
|
|
940
|
- var url = contextPath + "/javaRestart/stopOrRestart";
|
|
|
941
|
- var array_souProjectNames=souProjectNames.split(",");
|
|
|
942
|
- var array_suoIps=suoIps.split(",");
|
|
|
943
|
- for(var tmp_m=0;tmp_m<array_souProjectNames.length;tmp_m++)
|
|
|
944
|
- {
|
|
|
945
|
- for(var tmp_n=0;tmp_n<array_suoIps.length;tmp_n++)
|
1090
|
+ if(suoIps.length<=0){
|
|
|
1091
|
+ writeToText(">>>java进程 不存在需要重启拉起的机器!"+suoIps);
|
|
|
1092
|
+ return "";
|
|
|
1093
|
+ }else{
|
|
|
1094
|
+ writeToText(">>>java进程 需要重启拉起的机器的ip为:"+suoIps);
|
|
|
1095
|
+ var url = contextPath + "/javaRestart/stopOrRestart";
|
|
|
1096
|
+ var array_souProjectNames=souProjectNames.split(",");
|
|
|
1097
|
+ var array_suoIps=suoIps.split(",");
|
|
|
1098
|
+ for(var tmp_m=0;tmp_m<array_souProjectNames.length;tmp_m++)
|
946
|
{
|
1099
|
{
|
947
|
- var project=array_souProjectNames[tmp_m];
|
|
|
948
|
- var ip=array_suoIps[tmp_n];
|
|
|
949
|
- writeToText(">>>开始java 项目 stop,..."+project+"--"+ip);
|
|
|
950
|
-
|
|
|
951
|
- $.ajax({
|
|
|
952
|
- url: url,
|
|
|
953
|
- type: "post",
|
|
|
954
|
- dataType: "json",
|
|
|
955
|
- async: false,
|
|
|
956
|
- data: {
|
|
|
957
|
- cloud : "single",
|
|
|
958
|
- exe :"stop",
|
|
|
959
|
- ip :ip,
|
|
|
960
|
- project :project
|
|
|
961
|
- },
|
|
|
962
|
- success: function (response) {
|
|
|
963
|
- if(response!=null&&response.code==200){
|
|
|
964
|
- if(rtnProcMsgId.length>0){
|
|
|
965
|
- rtnProcMsgId += ",";
|
1100
|
+ for(var tmp_n=0;tmp_n<array_suoIps.length;tmp_n++)
|
|
|
1101
|
+ {
|
|
|
1102
|
+ var project=array_souProjectNames[tmp_m];
|
|
|
1103
|
+ var ip=array_suoIps[tmp_n];
|
|
|
1104
|
+ writeToText(">>>开始java 项目 restart,..."+project+"--"+ip);
|
|
|
1105
|
+
|
|
|
1106
|
+ $.ajax({
|
|
|
1107
|
+ url: url,
|
|
|
1108
|
+ type: "post",
|
|
|
1109
|
+ dataType: "json",
|
|
|
1110
|
+ async: false,
|
|
|
1111
|
+ data: {
|
|
|
1112
|
+ cloud : "single",
|
|
|
1113
|
+ exe :"restart",
|
|
|
1114
|
+ ip :ip,
|
|
|
1115
|
+ project :project
|
|
|
1116
|
+ },
|
|
|
1117
|
+ success: function (response) {
|
|
|
1118
|
+ if(response!=null&&response.code==200){
|
|
|
1119
|
+ if(rtnProcMsgId.length>0){
|
|
|
1120
|
+ rtnProcMsgId += ",";
|
|
|
1121
|
+ }
|
|
|
1122
|
+ rtnProcMsgId += response.data[0].id;
|
966
|
}
|
1123
|
}
|
967
|
- rtnProcMsgId += response.data[0].id;
|
1124
|
+ },
|
|
|
1125
|
+ error: function (e) {
|
|
|
1126
|
+ requestError(url);
|
968
|
}
|
1127
|
}
|
969
|
- },
|
|
|
970
|
- error: function (e) {
|
|
|
971
|
- requestError(url);
|
|
|
972
|
- }
|
|
|
973
|
- });
|
1128
|
+ });
|
|
|
1129
|
+ }
|
974
|
}
|
1130
|
}
|
|
|
1131
|
+ writeToText(">>>java 项目 restart,返回操作进程列表:"+rtnProcMsgId);
|
|
|
1132
|
+ return rtnProcMsgId;
|
975
|
}
|
1133
|
}
|
976
|
- writeToText(">>>java 项目 stop,返回操作进程列表:"+rtnProcMsgId);
|
|
|
977
|
-
|
|
|
978
|
-
|
|
|
979
|
- //writeToText("java 项目 stop,..."+project+"--"+ip+"---执行进程:"+currentMsgId);
|
|
|
980
|
- var urlMsg=contextPath + "/javaRestart/getMessageStatus";
|
|
|
981
|
- var intervalIndex = setInterval(function() {
|
|
|
982
|
- $.ajax({
|
|
|
983
|
- url: urlMsg,
|
|
|
984
|
- type: "post",
|
|
|
985
|
- dataType: "json",
|
|
|
986
|
- //async: false,
|
|
|
987
|
- //timeout:120000, //超时时间:120秒
|
|
|
988
|
- data: {
|
|
|
989
|
- ids:rtnProcMsgId
|
|
|
990
|
- },
|
|
|
991
|
- success: function (checkResponse) {
|
|
|
992
|
- if (!checkResponse || checkResponse.code != 200) {
|
|
|
993
|
- clearInterval(intervalIndex);
|
|
|
994
|
- writeToText("发生错误,getMessageStatus code 程序终止..........");
|
|
|
995
|
- responseError(checkResponse);
|
|
|
996
|
- }else{
|
|
|
997
|
- if(checkResponse.data=="ok"){
|
|
|
998
|
- clearInterval(intervalIndex);
|
|
|
999
|
- writeToText(">>>---stop ok!");
|
|
|
1000
|
- }else{
|
|
|
1001
|
- writeToText("..........*return process status >>>>>>"+checkResponse.data);
|
|
|
1002
|
- }
|
|
|
1003
|
- }
|
|
|
1004
|
- },
|
|
|
1005
|
- error: function (e) {
|
|
|
1006
|
- clearInterval(intervalIndex);
|
|
|
1007
|
- writeToText("getMessageStatus发生错误, 程序终止..........");
|
|
|
1008
|
- requestError(urlMsg);
|
|
|
1009
|
- }
|
|
|
1010
|
- });
|
|
|
1011
|
- }, 5000);
|
|
|
1012
|
-
|
|
|
1013
|
- return rtnProcMsgId;
|
|
|
1014
|
}
|
1134
|
}
|
1015
|
|
1135
|
|
1016
|
//5 和 6:ip写入git
|
1136
|
//5 和 6:ip写入git
|
1017
|
function editToGit(showMessage){
|
1137
|
function editToGit(showMessage){
|
|
|
1138
|
+ writeToText("正在更新git-iptables,请稍后...");
|
1018
|
var upDownFlag="up";//伸缩标志 :1 伸
|
1139
|
var upDownFlag="up";//伸缩标志 :1 伸
|
1019
|
if(showMessage != null && showMessage != undefined){
|
1140
|
if(showMessage != null && showMessage != undefined){
|
1020
|
upDownFlag="down"; //缩减
|
1141
|
upDownFlag="down"; //缩减
|