Authored by qinchao

主机管理

@@ -19,23 +19,7 @@ @@ -19,23 +19,7 @@
19 <label class="col-sm-2 control-label">云类型:</label> 19 <label class="col-sm-2 control-label">云类型:</label>
20 <div class="col-sm-8"> 20 <div class="col-sm-8">
21 <select id="cloudTags" class="form-control" style="width:150px;"> 21 <select id="cloudTags" class="form-control" style="width:150px;">
22 - <option value="">全部</option>  
23 - <c:choose>  
24 - <c:when test="${param.oldCloudTags=='1'}">  
25 - <option value="1" selected>AWS</option>  
26 - </c:when>  
27 - <c:otherwise>  
28 - <option value="1">AWS</option>  
29 - </c:otherwise>  
30 - </c:choose>  
31 - <c:choose>  
32 - <c:when test="${param.oldCloudTags=='2'}">  
33 - <option value="2" selected>腾讯云</option>  
34 - </c:when>  
35 - <c:otherwise>  
36 - <option value="2">腾讯云</option>  
37 - </c:otherwise>  
38 - </c:choose> 22 + <option value="2" selected>腾讯云</option>
39 </select> 23 </select>
40 </div> 24 </div>
41 25
@@ -65,38 +49,6 @@ @@ -65,38 +49,6 @@
65 } 49 }
66 50
67 $(function () { 51 $(function () {
68 - /* $.ajax({  
69 - url : contextPath +"/hostGroup/getAllTagsGroupByType",  
70 - type : 'post',  
71 - async : false,  
72 - dataType : "json",  
73 - success : function(data) {  
74 - var contentHtml='';  
75 - contentHtml += "<table border=1>";  
76 -  
77 - for (var key in tagTypes) {  
78 - contentHtml += "<tr>";  
79 - contentHtml += "<td width='60'>";  
80 - contentHtml += tagTypes[key] ;  
81 - contentHtml += "</td>";  
82 - contentHtml += "<td>";  
83 -  
84 - $.each(data.data[key],function(n,value) {  
85 - if(n>0&&n%6==0){  
86 - contentHtml+='</br>';  
87 - }  
88 - contentHtml+='<input type="checkbox" name="appName" value="'+value.groupName+'">' +value.groupName+'&nbsp;&nbsp;';  
89 -  
90 - });  
91 - contentHtml += "</td>";  
92 - contentHtml += "</tr>";  
93 -  
94 - }  
95 - contentHtml += "</table>";  
96 - $("#appNameContent").html(contentHtml);  
97 - }  
98 - });*/  
99 -  
100 $.ajax({ 52 $.ajax({
101 url : contextPath +"/hostGroup/getAllTagsGroupTreegridByType", 53 url : contextPath +"/hostGroup/getAllTagsGroupTreegridByType",
102 type : 'post', 54 type : 'post',
@@ -111,11 +63,7 @@ @@ -111,11 +63,7 @@
111 contentHtml += tagTypes[key] ; 63 contentHtml += tagTypes[key] ;
112 contentHtml += "</td>"; 64 contentHtml += "</td>";
113 contentHtml += "<td>"; 65 contentHtml += "<td>";
114 - if(key=="app"||key=="mid"){  
115 - contentHtml += constructTr(data.data[key],1);  
116 - }else{  
117 - contentHtml += constructTr(data.data[key]);  
118 - } 66 + contentHtml += constructTr(data.data[key]);
119 67
120 contentHtml += "</td>"; 68 contentHtml += "</td>";
121 contentHtml += "</tr>"; 69 contentHtml += "</tr>";
@@ -137,39 +85,6 @@ @@ -137,39 +85,6 @@
137 } 85 }
138 } 86 }
139 87
140 - function constructTrLevel2(treeData,levelnum){  
141 - var contentHtml="";  
142 - $.each(treeData,function(n,value) {  
143 - if(!endWithChars(contentHtml,"</br>")){  
144 - if((n>0&&n%6==0)){  
145 - contentHtml+='</br>';  
146 - }  
147 - }  
148 - contentHtml+='<input type="checkbox" name="appName" value="'+value.groupName+'">' +value.groupName+'&nbsp;&nbsp;';  
149 - if(value.children!=null&&value.children.length>0){  
150 - levelnum++;  
151 - if(!endWithChars(contentHtml,"</br>")){  
152 - contentHtml+='</br>';  
153 - }  
154 - if(levelnum<=3){  
155 - if(levelnum==2){  
156 - contentHtml+='&nbsp;&nbsp;&nbsp;&nbsp;';  
157 - }else {  
158 - contentHtml+='&nbsp;&nbsp;&nbsp;&nbsp;';  
159 - contentHtml+='&nbsp;&nbsp;&nbsp;&nbsp;';  
160 - }  
161 - }  
162 - // }  
163 - contentHtml += constructTrLevel2(value.children,levelnum);  
164 - levelnum--;  
165 - if(!endWithChars(contentHtml,"</br>")){  
166 - contentHtml+='</br>';  
167 - }  
168 - }  
169 - });  
170 - return contentHtml;  
171 - }  
172 -  
173 function constructTr(treeData){ 88 function constructTr(treeData){
174 var contentHtml=""; 89 var contentHtml="";
175 $.each(treeData,function(n,value) { 90 $.each(treeData,function(n,value) {