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> | ||||||
| </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,24 +20,25 @@ | |||||||
| function hostGetSearchParams() { | function hostGetSearchParams() { | ||||||
|     var moreCriteria = [];	 |     var moreCriteria = [];	 | ||||||
|     |     | ||||||
|     /* |  | ||||||
| 	var $advancedSearchPopup = $("#advanced_search_popup"); | 	var $advancedSearchPopup = $("#advanced_search_popup"); | ||||||
| 	if (lastSearchType == "advanced_search" && $advancedSearchPopup.length > 0) { | 	if (lastSearchType == "advanced_search" && $advancedSearchPopup.length > 0) { | ||||||
| 	    var name = $advancedSearchPopup.find("#adv_search_name").val();							 | 	    var name = $advancedSearchPopup.find("#adv_search_name").val();							 | ||||||
| 		if (name!=null && trim(name).length > 0)  | 		if (name!=null && trim(name).length > 0)  | ||||||
| 			moreCriteria.push("&name="+todb(name));		 | 			moreCriteria.push("&name="+todb(name));		 | ||||||
|          |          | ||||||
|         if ($advancedSearchPopup.find("#adv_search_domain_li").css("display") != "none") {		 |         var state = $advancedSearchPopup.find("#adv_search_state").val();				 | ||||||
| 		    var domainId = $advancedSearchPopup.find("#adv_search_domain").val();		 | 	    if (state!=null && state.length > 0)  | ||||||
| 		    if (domainId!=null && domainId.length > 0)  | 		    moreCriteria.push("&state="+todb(state));	 | ||||||
| 			    moreCriteria.push("&domainid="+domainId);	 |  | ||||||
|     	}	 |  | ||||||
|          |          | ||||||
| 		if ($advancedSearchPopup.find("#adv_search_account_li").css("display") != "none") {	 |         var zone = $advancedSearchPopup.find("#adv_search_zone").val();	 | ||||||
| 		    var account = $advancedSearchPopup.find("#adv_search_account").val();		 | 	    if (zone!=null && zone.length > 0)  | ||||||
| 		    if (account!=null && account.length > 0)  | 			moreCriteria.push("&zoneId="+zone);	 | ||||||
| 			    moreCriteria.push("&account="+account);		 | 		 | ||||||
| 		}	 | 		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 {     			    		 | 	else {     			    		 | ||||||
| 	    var searchInput = $("#basic_search").find("#search_input").val();	  | 	    var searchInput = $("#basic_search").find("#search_input").val();	  | ||||||
| @ -45,7 +46,6 @@ function hostGetSearchParams() { | |||||||
|             moreCriteria.push("&keyword="+todb(searchInput));	        |             moreCriteria.push("&keyword="+todb(searchInput));	        | ||||||
|         }         |         }         | ||||||
| 	} | 	} | ||||||
| 	*/ |  | ||||||
| 		 | 		 | ||||||
| 	return moreCriteria.join("");           | 	return moreCriteria.join("");           | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user