You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by je...@apache.org on 2014/01/11 01:27:47 UTC

git commit: updated refs/heads/master to 5adc778

Updated Branches:
  refs/heads/master 8ee61f3a5 -> 5adc778d8


CLOUDSTACK-5831: UI > Volumes > take snapshot > get "quiescevm" property from listVolumes API instead of listStoragePools API since regular-user/domain-admin don't have access to listStoragePools API.


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

Branch: refs/heads/master
Commit: 5adc778d88dd00c00f777de9fcf1506890934137
Parents: 8ee61f3
Author: Jessica Wang <je...@apache.org>
Authored: Fri Jan 10 16:26:44 2014 -0800
Committer: Jessica Wang <je...@apache.org>
Committed: Fri Jan 10 16:27:37 2014 -0800

----------------------------------------------------------------------
 ui/scripts/storage.js | 17 +++--------------
 1 file changed, 3 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5adc778d/ui/scripts/storage.js
----------------------------------------------------------------------
diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js
index 603a82f..1cd8d2e 100644
--- a/ui/scripts/storage.js
+++ b/ui/scripts/storage.js
@@ -579,20 +579,10 @@
                                             label: 'label.quiesce.vm',
                                             isBoolean: true,
                                             isHidden: function(args) {
-                                                var hidden = true;
-                                                $.ajax({
-                                                    url: createURL('listStoragePools&id='+args.context.volumes[0].storageid),
-                                                    dataType: "json",
-                                                    async: false,
-                                                    success: function(json) {
-                                                        if (json.liststoragepoolsresponse.storagepool[0].storagecapabilities.VOLUME_SNAPSHOT_QUIESCEVM == 'true')
-                                                            hidden = false;
+                                                if (args.context.volumes[0].quiescevm == true)
+                                                    return false;   
                                                         else
-                                                            hidden = true;
-                                                    }
-                                                });
-
-                                                return hidden;
+                                                	return true;
                                             }
                                         }
                                     }
@@ -1752,7 +1742,6 @@
                                     title: 'label.action.create.volume',
                                     desc: '',
                                     preFilter: function(args) {
-                                	    debugger;
                                 	    if (g_regionsecondaryenabled == true) {
                                 	    	args.$form.find('.form-item[rel=zoneid]').css('display', 'inline-block');
                                 	    } else {