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
jack.xue
9 years ago
Commit
b107af4c9188cdb6c282cda6a3559f5eba96c52e
1 parent
6e54b655
update
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
9 deletions
monitor-ui-web/src/main/webapp/jsp/mobject/mobjectInfo.jsp
monitor-ui-web/src/main/webapp/script/yoho.type.tree.js
monitor-ui-web/src/main/webapp/jsp/mobject/mobjectInfo.jsp
View file @
b107af4
...
...
@@ -338,9 +338,10 @@
},
success: function (response) {
console.log(response.data);
//将查询到的数据,update到选择框中
genarateGroupSelectOption(response.data.groupList, response.data.selectGroup);
genarateIpSelectOption(response.data.ipList, response.data.selectIp);
genarateUpdateGroupSelectOption(response.data.groupList, response.data.selectGroup);
genarateUpdateIpSelectOption(response.data.ipList, response.data.selectIp);
},
error: function (e) {
}
...
...
@@ -353,12 +354,14 @@
* @param optionList
* @param selectedValue
*/
function genarateGroupSelectOption(optionList, selectedValue) {
var innerHTML = "<select id='updatemoHostIpGroup' class='form-control' style='width:40%;' onchange='groupSelectOnChange()'>";
function genarateUpdateGroupSelectOption(optionList, selectedValue) {
var innerHTML = "<select id='updatemoHostIpGroup' class='form-control' style='width:40%;' onchange='groupUpdateSelectOnChange()'>";
for (var i = 0; i < optionList.length; i++) {
innerHTML += "<option value='" + optionList[i] + "'>" + optionList[i] + "</option>";
}
innerHTML += "</select>";
console.log(innerHTML);
console.log(document.getElementById("updatemoHostIpGroupDiv"));
document.getElementById("updatemoHostIpGroupDiv").innerHTML = innerHTML;
document.getElementById("updatemoHostIpGroup").value = selectedValue;
}
...
...
@@ -369,8 +372,8 @@
* @param optionList
* @param selectedValue
*/
function genarateIpSelectOption(optionList, selectedValue) {
var innerHTML = "<select id='updatemoHostIpGroup' class='form-control' style='width:70%;'>";
function genarateUpdateIpSelectOption(optionList, selectedValue) {
var innerHTML = "<select id='updatemoHostIp' class='form-control' style='width:70%;'>";
for (var i = 0; i < optionList.length; i++) {
innerHTML += "<option value='" + optionList[i] + "'>" + optionList[i] + "</option>";
}
...
...
@@ -382,7 +385,7 @@
/**
* 主机组选择框选中属性发生变化时,则异步查询当前主机组号下的ip列表,并且刷新ip列表
*/
function groupSelectOnChange() {
function group
Update
SelectOnChange() {
var group = $('#updatemoHostIpGroup option:selected').val().replace(/\'/g, '\"');
$.ajax({
url: contextPath + "/mobject/queryHost",
...
...
@@ -395,7 +398,7 @@
success: function (response) {
//将查询到的数据,update到选择框中
console.log(response.data);
genarateIpSelectOption(response.data.ipList, response.data.selectIp);
genarate
Update
IpSelectOption(response.data.ipList, response.data.selectIp);
},
error: function (e) {
}
...
...
monitor-ui-web/src/main/webapp/script/yoho.type.tree.js
View file @
b107af4
...
...
@@ -160,7 +160,7 @@ function genarateIpSelectOption(optionList, selectedValue) {
if
(
optionList
==
null
)
{
}
var
innerHTML
=
"<select id='addmoHostIp
Group
' class='form-control' style='width:70%;'>"
;
var
innerHTML
=
"<select id='addmoHostIp' class='form-control' style='width:70%;'>"
;
for
(
var
i
=
0
;
i
<
optionList
.
length
;
i
++
)
{
innerHTML
+=
"<option value='"
+
optionList
[
i
]
+
"'>"
+
optionList
[
i
]
+
"</option>"
;
}
...
...
Please
register
or
login
to post a comment