mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	networkdevicetype parameter in listNetworkDevice API has been changed from required to optional. When networkdevicetype parameter is not specified, listNetworkDevice API returns network devices of all types. Thus, UI only needs to make 1 API call to get all network devices now.
This commit is contained in:
		
							parent
							
								
									e365b0ac48
								
							
						
					
					
						commit
						07ed87b14f
					
				| @ -207,19 +207,17 @@ function podJsonToNetworkDeviceTab() { | ||||
| 	$thisTab.find("#tab_container").hide();  | ||||
|     $thisTab.find("#tab_spinning_wheel").show();   		  | ||||
|       | ||||
|     var $container = $thisTab.find("#tab_container").empty(); | ||||
|      | ||||
|     var array1 = [];    | ||||
|     array1.push("&networkdeviceparameterlist[0].zoneid=" + fromdb(jsonObj.zoneid)); | ||||
| 	array1.push("&networkdeviceparameterlist[0].podid=" + fromdb(jsonObj.id));	    | ||||
| 	 | ||||
| 	array1.push("&networkdeviceparameterlist[0].podid=" + fromdb(jsonObj.id));	 	 | ||||
|     $.ajax({ | ||||
| 		data: createURL("command=listNetworkDevice&networkdevicetype=ExternalDhcp"+array1.join("")), | ||||
| 		data: createURL("command=listNetworkDevice"+array1.join("")), | ||||
| 		dataType: "json", | ||||
| 		async: false, | ||||
| 		success: function(json) {	 | ||||
| 			var items = json.listnetworkdevice.networkdevice;			 | ||||
| 			var template = $("#network_device_tab_template");	 | ||||
| 			var $container = $thisTab.find("#tab_container").empty(); | ||||
| 			if (items != null && items.length > 0) {					     | ||||
| 				for (var i = 0; i < items.length; i++) {	 | ||||
| 				    var newTemplate = template.clone(true);	                | ||||
| @ -229,23 +227,7 @@ function podJsonToNetworkDeviceTab() { | ||||
| 			}			 | ||||
| 		}	        | ||||
| 	});	            | ||||
|     $.ajax({ | ||||
| 		data: createURL("command=listNetworkDevice&networkdevicetype=PxeServer"+array1.join("")), | ||||
| 		dataType: "json", | ||||
| 		async: false, | ||||
| 		success: function(json) {	 | ||||
| 			var items = json.listnetworkdevice.networkdevice;			 | ||||
| 			var template = $("#network_device_tab_template");	 | ||||
| 			if (items != null && items.length > 0) {					     | ||||
| 				for (var i = 0; i < items.length; i++) {	 | ||||
| 				    var newTemplate = template.clone(true);	                | ||||
| 	                podNetworkDeviceJsonToTemplate(items[i], newTemplate);  | ||||
| 	                $container.append(newTemplate.show());	 | ||||
| 				} | ||||
| 			}			 | ||||
| 		}	        | ||||
| 	});	 | ||||
|      | ||||
|          | ||||
|     $thisTab.find("#tab_spinning_wheel").hide();     | ||||
|     $thisTab.find("#tab_container").show();    	 | ||||
| }  | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user