Authored by FengRuwei

Merge branch 'master' of http://git.yoho.cn/ops/monitor-ui

... ... @@ -18,6 +18,8 @@ public class HttpUriContants {
public static String TYPE_ADD = "/type/add";
public static String TYPE_DEL = "/type/delete";
public static String TYPE_UPDATE = "/type/update";
public static String TYPE_QUERY_NODE = "/type/queryNode";
/*** 主机信息 ****/
public static final String GET_HOST_INFOS = "/hostInfo/getHostInfos";
... ...
... ... @@ -3,6 +3,7 @@ package com.ui.ctrl;
import com.alibaba.fastjson.JSONObject;
import com.ui.contants.HttpUriContants;
import com.ui.http.HttpRestClient;
import com.ui.model.BaseResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
... ... @@ -88,4 +89,11 @@ public class TypeCtrl {
return rel;
}
@RequestMapping("/queryNode")
@ResponseBody
public BaseResponse queryNode() throws Exception {
BaseResponse response=httpClient.defaultGet(HttpUriContants.TYPE_QUERY_NODE, BaseResponse.class);
return response;
}
}
... ...
... ... @@ -37,8 +37,8 @@
<div class="form-group" >
<label class="col-sm-2 control-label"> <span style="color:red">*</span>安装软件:</label>
<div class="col-sm-8">
<input type="checkbox" name="appName" value="JAVA"> JAVA <input type="checkbox" name="appName" value="Redis" > Redis
<div class="col-sm-8" id="appNameContent">
</div>
</div>
... ... @@ -62,12 +62,20 @@
});
$.ajax({
url : contextPath +"/PushTemplateController/deletePushTemplateById.do",
url : contextPath +"/type/queryNode",
type : 'post',
async : false,
dataType : "json",
success : function(data) {
var contentHtml='';
$.each(data.data,function(n,value) {
if(n%6==0){
contentHtml+='</br>';
}
contentHtml+='<input type="checkbox" name="appName" value="'+value.typeName+'">' +value.typeName+'&nbsp;&nbsp;';
});
$("#appNameContent").html(contentHtml);
}
});
... ...