Toggle navigation
Toggle navigation
This project
Loading...
Sign in
ops
/
monitor-ui
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
simba
9 years ago
Commit
d3cf451c39277e9f7c3025855f3f86b6395b23a7
1 parent
715f0a5d
update
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
43 additions
and
24 deletions
monitor-ui-common/src/main/java/com/ui/contants/HttpUriContants.java
monitor-ui-ctrl/src/main/java/com/ui/ctrl/HostGroupCtrl.java
monitor-ui-ctrl/src/main/java/com/ui/ctrl/HostInfoCtrl.java
monitor-ui-web/src/main/webapp/index.jsp
monitor-ui-web/src/main/webapp/jsp/host/editHostInfo.jsp
monitor-ui-web/src/main/webapp/jsp/host/hostInfoList.jsp
monitor-ui-common/src/main/java/com/ui/contants/HttpUriContants.java
View file @
d3cf451
...
...
@@ -18,4 +18,14 @@ public class HttpUriContants {
public
static
String
TYPE_DEL
=
"/type/delete"
;
public
static
String
TYPE_UPDATE
=
"/type/update"
;
/*** 主机信息 ****/
public
static
final
String
GET_HOST_INFOS
=
"/hostInfo/getHostInfos"
;
public
static
final
String
SAVE_HOST_INFOS
=
"/hostInfo/saveHostInfo"
;
public
static
final
String
DEL_HOST_INFOS
=
"/hostInfo/delHostInfo"
;
public
static
final
String
GET_HOST_INFO_BY_ID
=
"/hostInfo/getHostInfoById"
;
/*** 主机信息 ****/
}
...
...
monitor-ui-ctrl/src/main/java/com/ui/ctrl/HostGroupCtrl.java
View file @
d3cf451
...
...
@@ -50,6 +50,5 @@ public class HostGroupCtrl {
}
}
...
...
monitor-ui-ctrl/src/main/java/com/ui/ctrl/HostInfoCtrl.java
View file @
d3cf451
package
com
.
ui
.
ctrl
;
import
com.ui.contants.HttpUriContants
;
import
com.ui.http.HttpRestClient
;
import
com.ui.model.BaseResponse
;
import
com.ui.model.req.HostInfoReq
;
...
...
@@ -28,7 +29,7 @@ public class HostInfoCtrl {
@RequestMapping
(
"/getHostInfos"
)
@ResponseBody
public
BaseResponse
getHostInfos
(
HostInfoReq
req
)
throws
Exception
{
BaseResponse
response
=
httpRestClient
.
defaultPost
(
"/hostInfo/getHostInfos"
,
req
,
BaseResponse
.
class
);
BaseResponse
response
=
httpRestClient
.
defaultPost
(
HttpUriContants
.
GET_HOST_INFOS
,
req
,
BaseResponse
.
class
);
return
response
;
}
...
...
@@ -36,7 +37,7 @@ public class HostInfoCtrl {
@RequestMapping
(
"/saveHostInfo"
)
@ResponseBody
public
BaseResponse
saveHostInfo
(
HostInfoReq
req
)
throws
Exception
{
BaseResponse
response
=
httpRestClient
.
defaultPost
(
"/hostInfo/saveHostInfo"
,
req
,
BaseResponse
.
class
);
BaseResponse
response
=
httpRestClient
.
defaultPost
(
HttpUriContants
.
SAVE_HOST_INFOS
,
req
,
BaseResponse
.
class
);
return
response
;
}
...
...
@@ -44,14 +45,14 @@ public class HostInfoCtrl {
@RequestMapping
(
"/delHostInfo"
)
@ResponseBody
public
BaseResponse
<
Integer
>
delHostInfo
(
int
id
)
throws
Exception
{
BaseResponse
response
=
httpRestClient
.
defaultGet
(
"/hostInfo/delHostInfo
?id="
+
id
,
BaseResponse
.
class
);
BaseResponse
response
=
httpRestClient
.
defaultGet
(
HttpUriContants
.
DEL_HOST_INFOS
+
"
?id="
+
id
,
BaseResponse
.
class
);
return
response
;
}
@RequestMapping
(
"/getHostInfoById"
)
@ResponseBody
public
BaseResponse
getHostInfoById
(
int
id
)
throws
Exception
{
BaseResponse
response
=
httpRestClient
.
defaultGet
(
"/hostInfo/getHostInfoById
?id="
+
id
,
BaseResponse
.
class
);
BaseResponse
response
=
httpRestClient
.
defaultGet
(
HttpUriContants
.
GET_HOST_INFO_BY_ID
+
"
?id="
+
id
,
BaseResponse
.
class
);
return
response
;
}
...
...
monitor-ui-web/src/main/webapp/index.jsp
View file @
d3cf451
...
...
@@ -35,6 +35,7 @@
<script
src=
"<%=basePath %>js/bootstrap-plugin/bootstrap.breadcrumb.js"
charset=
"UTF-8"
type=
"text/javascript"
></script>
<script
src=
"<%=basePath %>js/bootstrap-plugin/bootstrap.validate.js"
charset=
"UTF-8"
type=
"text/javascript"
></script>
<script
src=
"<%=basePath %>js/bootstrap-plugin/bootstrap.form.js"
charset=
"UTF-8"
type=
"text/javascript"
></script>
<script
src=
"<%=basePath %>js/bootstrap-plugin/bootstrap.select.js"
charset=
"UTF-8"
type=
"text/javascript"
></script>
<script
src=
"<%=basePath %>js/jstree/jstree.min.js"
></script>
<script
src=
"<%=basePath %>js/jquery.toaster.js"
></script>
...
...
monitor-ui-web/src/main/webapp/jsp/host/editHostInfo.jsp
View file @
d3cf451
...
...
@@ -29,10 +29,8 @@
<div class="form-group" >
<label class="col-sm-2 control-label"> <span style="color:red">*</span>主机组:</label>
<div class="col-sm-8">
<select id="groupId" name="groupId" class="form-control">
<option value="1">AWS</option>
<option value="2">腾讯云</option>
<option value="3">其他</option>
<select id="groupId" name="groupId">
</select>
</div>
</div>
...
...
@@ -50,8 +48,31 @@
<script>
$(function () {
if(paramObj.hoseInfoId > 0){
$("#groupId").select({
valueField : "id",
textField : "groupName",
firstText : "请选择主机组类型",
firstValue : 0,
className : "form-control",
url : contextPath + "/hostGroup/getAllGroups",
loadFilter : function(data) {
return defaultLoadFilter(data);
},
value : 0
});
$.ajax({
url : contextPath +"/PushTemplateController/deletePushTemplateById.do",
type : 'post',
async : false,
dataType : "json",
success : function(data) {
}
});
if(paramObj.hoseInfoId > 0){
//加载form
$("#hostInfoForm").form({
loadUrl : contextPath + "/hostInfo/getHostInfoById.do",
...
...
@@ -72,18 +93,5 @@
});
}
$("#groupId").select({
firstText : "请选择分组类型",
firstValue : 0,
className : "form-control",
url : contextPath + "/NoFilterController.do?method=getEnumForSelect",
queryParams : {
className : "GroupTypeEnum"
},
loadFilter : function(data) {
return defaultLoadFilter(data);
},
value : 0
});
});
</script>
\ No newline at end of file
...
...
monitor-ui-web/src/main/webapp/jsp/host/hostInfoList.jsp
View file @
d3cf451
...
...
@@ -156,7 +156,7 @@
}]
});
}
$("#
smsList
Table").table("load");
$("#
hostInfo
Table").table("load");
}
});
}
...
...
Please
register
or
login
to post a comment