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:02 UTC

git commit: updated refs/heads/4.3 to 69aed6f

Updated Branches:
  refs/heads/4.3 de262ac16 -> 69aed6fe0


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/69aed6fe
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/69aed6fe
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/69aed6fe

Branch: refs/heads/4.3
Commit: 69aed6fe0fd91ae13880d70f11895edcc06e97c1
Parents: de262ac
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:26:54 2014 -0800

----------------------------------------------------------------------
 ui/scripts/storage.js | 21 +++++----------------
 1 file changed, 5 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/69aed6fe/ui/scripts/storage.js
----------------------------------------------------------------------
diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js
index e4cfff3..1422904 100644
--- a/ui/scripts/storage.js
+++ b/ui/scripts/storage.js
@@ -572,20 +572,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;
-                                                        else
-                                                            hidden = true;
-                                                    }
-                                                });
-
-                                                return hidden;
+                                                if (args.context.volumes[0].quiescevm == true)
+                                                    return false;   
+                                                else
+                                                	return true;
                                             }
                                         }
                                     }
@@ -1744,8 +1734,7 @@
                                 createForm: {
                                     title: 'label.action.create.volume',
                                     desc: '',
-                                    preFilter: function(args) {
-                                	    debugger;
+                                    preFilter: function(args) {                                	
                                 	    if (g_regionsecondaryenabled == true) {
                                 	    	args.$form.find('.form-item[rel=zoneid]').css('display', 'inline-block');
                                 	    } else {