Authored by qinchao

自动伸缩

@@ -181,7 +181,7 @@ @@ -181,7 +181,7 @@
181 </div> 181 </div>
182 182
183 <script src="<%=basePath%>script/common/genarate_left_panel.js"></script> 183 <script src="<%=basePath%>script/common/genarate_left_panel.js"></script>
184 -<script src="<%=basePath%>script/autoscaling/autoscaling_new.js?v=20171022-2"></script> 184 +<script src="<%=basePath%>script/autoscaling/autoscaling_new.js?v=20171022-3"></script>
185 <script> 185 <script>
186 $("#li_manager").addClass("active open"); 186 $("#li_manager").addClass("active open");
187 $("#li_autoscaling").addClass("active"); 187 $("#li_autoscaling").addClass("active");
@@ -322,7 +322,13 @@ function changeOk(){ @@ -322,7 +322,13 @@ function changeOk(){
322 //清空 322 //清空
323 $("#resultScalingMessage").html(""); 323 $("#resultScalingMessage").html("");
324 writeToText("第 0 步:获取原实例ip-->"); 324 writeToText("第 0 步:获取原实例ip-->");
325 - souInstanceIps = getIpByGroupId(scalingGroupName,souScalingGroupId); 325 + if(1 == $("#cloudType").val()){
  326 + souInstanceIps = getIpByGroupId(aws_scalingGroupName,souScalingGroupId);
  327 + }else{
  328 + souInstanceIps = getIpByGroupId(scalingGroupName,souScalingGroupId);
  329 + }
  330 +alert(souInstanceIps);
  331 + return ;
326 writeToText("获取原实例ip获取完成:"+souInstanceIps); 332 writeToText("获取原实例ip获取完成:"+souInstanceIps);
327 writeToText("获取原实例ip获取完成"); 333 writeToText("获取原实例ip获取完成");
328 souProjectNames = getDeployProjectNames(scalingGroupName); 334 souProjectNames = getDeployProjectNames(scalingGroupName);
@@ -373,7 +379,11 @@ function clear_Sour(){ @@ -373,7 +379,11 @@ function clear_Sour(){
373 379
374 //腾讯云:修改伸缩组后的下一个流程是查询伸缩活动 380 //腾讯云:修改伸缩组后的下一个流程是查询伸缩活动
375 function refCloudMessage(cloudType,showMessage, serverChangeCount,desiredCapacity){ 381 function refCloudMessage(cloudType,showMessage, serverChangeCount,desiredCapacity){
376 - var url = contextPath + 'autoScalingTool/getIpsByScalingGroupId?groupName='+scalingGroupName+'&groupId='+souScalingGroupId+"&cloudType="+$("#cloudType").val(); 382 + var tmpGroupName=scalingGroupName;
  383 + if(1 == $("#cloudType").val()){
  384 + tmpGroupName=aws_scalingGroupName;
  385 + }
  386 + var url = contextPath + 'autoScalingTool/getIpsByScalingGroupId?groupName='+tmpGroupName+'&groupId='+souScalingGroupId+"&cloudType="+$("#cloudType").val();
377 writeToText("开始.........."); 387 writeToText("开始..........");
378 var count = 0; 388 var count = 0;
379 var intervalIndex = setInterval(function() { 389 var intervalIndex = setInterval(function() {