mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			30 lines
		
	
	
		
			856 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			856 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| (function(cloudStack, $) {
 | |
|   cloudStack.uiCustom.physicalResources = function(args) {
 | |
|     var listView = function() {
 | |
|       return $('<div>').listView(args);
 | |
|     };
 | |
| 
 | |
|     var resourceChart = function(args) {
 | |
|       return $('#template').find('.system-dashboard-view').clone()
 | |
|         .click(function(event) {
 | |
|           var $target = $(event.target);
 | |
| 
 | |
|           if ($target.closest('.view-more').size()) {
 | |
|             args.$browser.cloudBrowser('addPanel', {
 | |
|               title: 'Zones',
 | |
|               data: '',
 | |
|               noSelectPanel: true,
 | |
|               maximizeIfSelected: true,
 | |
|               complete: function($newPanel) {
 | |
|                 listView().appendTo($newPanel);
 | |
|               }
 | |
|             });            
 | |
|           }
 | |
|         });
 | |
|     };
 | |
|     
 | |
|     return function(args) {
 | |
|       return resourceChart(args);
 | |
|     };
 | |
|   };
 | |
| }(cloudStack, jQuery)); |