mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-11-04 00:02:37 +01:00 
			
		
		
		
	cloudStack 3.0 new UI - zone chart - SRX device - implement Delete action.
This commit is contained in:
		
							parent
							
								
									c962af67bc
								
							
						
					
					
						commit
						19f297577e
					
				@ -1692,19 +1692,6 @@
 | 
			
		||||
                  }                  
 | 
			
		||||
                },
 | 
			
		||||
                action: function(args) { 
 | 
			
		||||
                  /*                
 | 
			
		||||
                  var zoneObj = args.context.zones[0];                 
 | 
			
		||||
                  $.ajax({
 | 
			
		||||
                    url: createURL("listPhysicalNetworks&zoneId=" + zoneObj.id),
 | 
			
		||||
                    dataType: "json",
 | 
			
		||||
                    async: false,
 | 
			
		||||
                    success: function(json) {                      
 | 
			
		||||
                      var items = json.listphysicalnetworksresponse.physicalnetwork;
 | 
			
		||||
                      selectedPhysicalNetworkObj = items[0];                      
 | 
			
		||||
                    }
 | 
			
		||||
                  });           
 | 
			
		||||
                  */
 | 
			
		||||
                                                 
 | 
			
		||||
                  if(nspMap["srx"]== null) { 
 | 
			
		||||
                    $.ajax({
 | 
			
		||||
                      url: createURL("addNetworkServiceProvider&name=JuniperSRX&physicalnetworkid=" + selectedPhysicalNetworkObj.id),
 | 
			
		||||
@ -1769,6 +1756,43 @@
 | 
			
		||||
            },           
 | 
			
		||||
            detailView: {
 | 
			
		||||
              name: 'SRX details',             
 | 
			
		||||
              actions: {                
 | 
			
		||||
                'delete': {
 | 
			
		||||
                  label: 'Delete SRX',
 | 
			
		||||
                  messages: {
 | 
			
		||||
                    confirm: function(args) {
 | 
			
		||||
                      return 'Are you sure you want to delete this SRX?';
 | 
			
		||||
                    },
 | 
			
		||||
                    success: function(args) {
 | 
			
		||||
                      return 'SRX is being deleted.';
 | 
			
		||||
                    },
 | 
			
		||||
                    notification: function(args) {
 | 
			
		||||
                      return 'Deleting SRX';
 | 
			
		||||
                    },
 | 
			
		||||
                    complete: function(args) {
 | 
			
		||||
                      return 'SRX has been deleted.';
 | 
			
		||||
                    }
 | 
			
		||||
                  },
 | 
			
		||||
                  action: function(args) {                       
 | 
			
		||||
                    $.ajax({
 | 
			
		||||
                      url: createURL("deleteSrcFirewall&fwdeviceid=" + args.context.srxProviders[0].fwdeviceid),
 | 
			
		||||
                      dataType: "json",
 | 
			
		||||
                      async: true,
 | 
			
		||||
                      success: function(json) { 
 | 
			
		||||
                        var jid = json.deletesrxfirewallresponse.jobid;
 | 
			
		||||
                        args.response.success(
 | 
			
		||||
                          {_custom:
 | 
			
		||||
                           {jobId: jid}
 | 
			
		||||
                          }
 | 
			
		||||
                        );
 | 
			
		||||
                      }
 | 
			
		||||
                    });
 | 
			
		||||
                  },
 | 
			
		||||
                  notification: {
 | 
			
		||||
                    poll: pollAsyncJobResult
 | 
			
		||||
                  }
 | 
			
		||||
                }               
 | 
			
		||||
              },  
 | 
			
		||||
              tabs: {
 | 
			
		||||
                details: {
 | 
			
		||||
                  title: 'Details',
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user