Authored by qinchao

切换lb改为异步

... ... @@ -158,6 +158,7 @@ public class HttpUriContants {
public static final String SWITCH_NGINX = "/nginxswitch/switchNginxConf";
public static final String VIEW_NGINX_CURRENT_CONF = "/nginxswitch/viewCurrentConf";
public static final String NGINX_SWTICH_LB_WEIGHT = "/nginxswitch/switchLbWeight";
public static final String NGINX_SWTICH_LB_RESULT = "/nginxswitch/getLbSwitchResult";
/**
* luaswitch
... ...
... ... @@ -165,4 +165,16 @@ public class TopoSwitchCtrl {
map.put("target",target);
return httpRestClient.defaultGet(HttpUriContants.NGINX_SWTICH_LB_WEIGHT,BaseResponse.class,map);
}
/**
* 切换lb权重结果查询
* @return
*/
@RequestMapping(value = "getLbSwitchResult")
@ResponseBody
public BaseResponse getLbSwitchResult(String rtnID) {
Map<String,String> map=new HashMap<>();
map.put("rtnID",rtnID);
return httpRestClient.defaultGet(HttpUriContants.NGINX_SWTICH_LB_RESULT,BaseResponse.class,map);
}
}
\ No newline at end of file
... ...
... ... @@ -254,7 +254,7 @@
</div>
<script src="<%=basePath %>script/common/genarate_left_panel.js?v=<%=ProjectConstant.MENU_VERSION %>"></script>
<script src="<%=basePath %>script/switch.js?v=20180601-007"></script>
<script src="<%=basePath %>script/switch.js?v=20180604-001"></script>
<script type="text/javascript">
$("#li_switch").addClass("active open");
... ...