cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jessicaw...@apache.org
Subject git commit: updated refs/heads/master to 4b4fb1a
Date Thu, 05 Jun 2014 20:49:34 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master f2a8082a4 -> 4b4fb1ac9


CLOUDSTACK-6852: UI - attach volume action - VM dropdown - populate options based on whether
module is included and whether service is enabled.


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

Branch: refs/heads/master
Commit: 4b4fb1ac9008b0f69a0ef0ad8634ba06ccf206b1
Parents: f2a8082
Author: Jessica Wang <jessicawang@apache.org>
Authored: Thu Jun 5 13:44:57 2014 -0700
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Thu Jun 5 13:49:19 2014 -0700

----------------------------------------------------------------------
 ui/scripts/storage.js | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4b4fb1ac/ui/scripts/storage.js
----------------------------------------------------------------------
diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js
index 12cfde8..32a6a7e 100644
--- a/ui/scripts/storage.js
+++ b/ui/scripts/storage.js
@@ -901,6 +901,14 @@
                                                     });
                                                 }
 
+                                              
+                                                var drModuleIncluded = isModuleIncluded("dr");
+                                                var volumeDrEnabled = false;            
                                  
+                                                if (drModuleIncluded) {
+                                                    volumeDrEnabled = cloudStack.dr.sharedFunctions.isVolumeDrEnabled(args.context.volumes[0]);
                                                   
+                                                }    
+                                                
+                                                
                                                 $(['Running', 'Stopped']).each(function()
{
                                                     $.ajax({
                                                         url: createURL('listVirtualMachines'),
@@ -911,10 +919,20 @@
                                                         success: function(json) {
                                                             var instanceObjs = json.listvirtualmachinesresponse.virtualmachine;
                                                             $(instanceObjs).each(function()
{
+                                                                if (drModuleIncluded) {
+                                                                    var vmDrEnabled = cloudStack.dr.sharedFunctions.isVmDrEnabled(this);
+                                                                    if (vmDrEnabled == volumeDrEnabled)
{
                                                                 items.push({
                                                                     id: this.id,
                                                                     description: this.displayname
? this.displayname : this.name
                                                                 });
+                                                                    } 
+                                                                } else {
+                                                                    items.push({
+                                                                        id: this.id,
+                                                                        description: this.displayname
? this.displayname : this.name
+                                                                    });
+                                                                }                       
                                        
                                                             });
                                                         }
                                                     });


Mime
View raw message