CLOUDSTACK-1974: cloudstack UI - Infrastructure menu - zone detail - public 
traffic type - IP Ranges tab - add action filter.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6f3069f0
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6f3069f0
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6f3069f0

Branch: refs/heads/ui-mixed-zone-management
Commit: 6f3069f0da803363e6c5df50e67d9489a566e79d
Parents: be55c5b
Author: Jessica Wang <jessica.w...@citrix.com>
Authored: Tue Apr 9 17:15:55 2013 -0700
Committer: Jessica Wang <jessica.w...@citrix.com>
Committed: Tue Apr 9 17:16:21 2013 -0700

----------------------------------------------------------------------
 ui/scripts/system.js |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6f3069f0/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index d89f6b6..f74711d 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -565,6 +565,14 @@
                         });
                       }
                     },
+                                                                               
actionPreFilter: function(args) {                                               
                                  
+                                                                               
        var actionsToShow = ['destroy'];                                        
                                                
+                                                                               
        if(args.context.multiRule[0].domain == 'ROOT' && 
args.context.multiRule[0].account.account == 'system')  
+                                                                               
          actionsToShow.push('addAccount');
+                                                                               
        else
+                                                                               
          actionsToShow.push('releaseFromAccount');                             
                                                        
+                                                                               
        return actionsToShow;
+                                                                               
},
                     actions: {
                       destroy: {
                         label: 'label.remove.ip.range',
@@ -588,7 +596,7 @@
                             }
                           });
                         }
-                      },
+                      },                                                       
                                
                                                                                
        /*
                                                                                
        releaseFromAccount: {
                         label: 'Release from Account',
@@ -643,7 +651,10 @@
                                                                                
                },                                                              
                                
                                                                                
                action: function(args) {                                        
                                        
                                                                                
                  var data = {
-                                                                               
                                id: args.context.multiRule[0].id
+                                                                               
                                id: args.context.multiRule[0].id,
+                                                                               
                                zoneid: args.context.multiRule[0].zoneid,
+                                                                               
                                domainid: args.data.domainid,
+                                                                               
                                account: args.data.account
                                                                                
                        };                                                      
                                        
                           $.ajax({
                             url: createURL('dedicatePublicIpRange'),
@@ -663,8 +674,8 @@
                             }
                           });
                         }
-                                                                               
        }
-                                                                               
        */
+                                                                               
        }       
+                      */                                                       
                                
                     },
                     dataProvider: function(args) {
                       $.ajax({

Reply via email to