mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	Host page - implement basic search and advanced search.
This commit is contained in:
		
							parent
							
								
									a8e62cf669
								
							
						
					
					
						commit
						4c44ffec5d
					
				| @ -993,3 +993,54 @@ | ||||
|     </div> | ||||
| </div> | ||||
| 
 | ||||
| 
 | ||||
| <!-- advanced search template (begin) --> | ||||
| <div id="advanced_search_template" class="adv_searchpopup" style="display: none;"> | ||||
|     <div class="adv_searchformbox"> | ||||
|         <h3> | ||||
|             Advance Search</h3> | ||||
|         <a id="advanced_search_close" href="#">Close </a> | ||||
|         <form action="#" method="post"> | ||||
|         <ol> | ||||
|             <li> | ||||
|                 <label> | ||||
|                     Name:</label> | ||||
|                 <input class="text" type="text" id="adv_search_name" /> | ||||
|             </li> | ||||
|              | ||||
|             <li> | ||||
|                 <label>Status:</label> | ||||
|             	<select class="select" id="adv_search_state"> | ||||
| 					<option value=""></option> | ||||
| 					<option value="Up">Up</option> | ||||
| 					<option value="Down">Down</option> | ||||
| 					<option value="Disconnected">Disconnected</option> | ||||
| 					<option value="Updating">Updating</option> | ||||
| 					<option value="Alert">Alert</option> | ||||
| 					<option value="PrepareForMaintenance">PrepareForMaintenance</option> | ||||
| 					<option value="Maintenance">Maintenance</option> | ||||
| 					<option value="ErrorInMaintenance">ErrorInMaintenance</option> | ||||
|                 </select> | ||||
|             </li> | ||||
|              | ||||
|             <li> | ||||
|                 <label> | ||||
|                     Zone:</label> | ||||
|                 <select class="select" id="adv_search_zone"> | ||||
|                 </select> | ||||
|             </li> | ||||
|             <li id="adv_search_pod_li" style="display: none;"> | ||||
|                 <label> | ||||
|                     Pod:</label> | ||||
|                 <select class="select" id="adv_search_pod"> | ||||
|                 </select> | ||||
|             </li>            | ||||
|         </ol> | ||||
|         </form> | ||||
|         <div class="adv_search_actionbox"> | ||||
|             <div class="adv_searchpopup_button" id="adv_search_button"> | ||||
|             </div> | ||||
|         </div> | ||||
|     </div> | ||||
| </div> | ||||
| <!-- advanced search template (end) --> | ||||
|  | ||||
| @ -20,23 +20,24 @@ | ||||
| function hostGetSearchParams() { | ||||
|     var moreCriteria = [];	 | ||||
|     | ||||
|     /* | ||||
| 	var $advancedSearchPopup = $("#advanced_search_popup"); | ||||
| 	if (lastSearchType == "advanced_search" && $advancedSearchPopup.length > 0) { | ||||
| 	    var name = $advancedSearchPopup.find("#adv_search_name").val();							 | ||||
| 		if (name!=null && trim(name).length > 0)  | ||||
| 			moreCriteria.push("&name="+todb(name));		 | ||||
|          | ||||
|         if ($advancedSearchPopup.find("#adv_search_domain_li").css("display") != "none") {		 | ||||
| 		    var domainId = $advancedSearchPopup.find("#adv_search_domain").val();		 | ||||
| 		    if (domainId!=null && domainId.length > 0)  | ||||
| 			    moreCriteria.push("&domainid="+domainId);	 | ||||
|     	}	 | ||||
|         var state = $advancedSearchPopup.find("#adv_search_state").val();				 | ||||
| 	    if (state!=null && state.length > 0)  | ||||
| 		    moreCriteria.push("&state="+todb(state));	 | ||||
|          | ||||
| 		if ($advancedSearchPopup.find("#adv_search_account_li").css("display") != "none") {	 | ||||
| 		    var account = $advancedSearchPopup.find("#adv_search_account").val();		 | ||||
| 		    if (account!=null && account.length > 0)  | ||||
| 			    moreCriteria.push("&account="+account);		 | ||||
|         var zone = $advancedSearchPopup.find("#adv_search_zone").val();	 | ||||
| 	    if (zone!=null && zone.length > 0)  | ||||
| 			moreCriteria.push("&zoneId="+zone);	 | ||||
| 		 | ||||
| 		if ($advancedSearchPopup.find("#adv_search_pod_li").css("display") != "none") {	 | ||||
| 		    var pod = $advancedSearchPopup.find("#adv_search_pod").val();		 | ||||
| 	        if (pod!=null && pod.length > 0)  | ||||
| 			    moreCriteria.push("&podId="+pod); | ||||
|         } | ||||
| 	}  | ||||
| 	else {     			    		 | ||||
| @ -45,7 +46,6 @@ function hostGetSearchParams() { | ||||
|             moreCriteria.push("&keyword="+todb(searchInput));	        | ||||
|         }         | ||||
| 	} | ||||
| 	*/ | ||||
| 		 | ||||
| 	return moreCriteria.join("");           | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user