You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2013/12/06 20:11:53 UTC

[1/2] git commit: updated refs/heads/ui-wip-cs5388-review to 14dcd80

Updated Branches:
  refs/heads/ui-wip-cs5388-review [created] 14dcd803f


Added quiescevm option to volume snapshot dialog when storage supports it

CLOUDSTACK-5388


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

Branch: refs/heads/ui-wip-cs5388-review
Commit: 90cc00df462f9b566575ef6c961cff1667b4243c
Parents: 1a46045
Author: Chris Suich <ch...@netapp.com>
Authored: Thu Dec 5 15:40:07 2013 -0500
Committer: Brian Federle <br...@citrix.com>
Committed: Fri Dec 6 11:10:20 2013 -0800

----------------------------------------------------------------------
 ui/scripts/storage.js   | 31 +++++++++++++++++++++++++++----
 ui/scripts/ui/dialog.js |  2 +-
 2 files changed, 28 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/90cc00df/ui/scripts/storage.js
----------------------------------------------------------------------
diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js
index 4875662..569099d 100644
--- a/ui/scripts/storage.js
+++ b/ui/scripts/storage.js
@@ -560,16 +560,39 @@
                             takeSnapshot: {
                                 label: 'label.action.take.snapshot',
                                 messages: {
-                                    confirm: function(args) {
-                                        return 'message.action.take.snapshot';
-                                    },
                                     notification: function(args) {
                                         return 'label.action.take.snapshot';
                                     }
                                 },
+                                createForm: {
+                                    title: 'label.action.take.snapshot',
+                                    desc: 'message.action.take.snapshot',
+                                    fields: {
+                                        quiescevm: {
+                                            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;
+                                            }
+                                        }
+                                    }
+                                },
                                 action: function(args) {
                                     $.ajax({
-                                        url: createURL("createSnapshot&volumeid=" + args.context.volumes[0].id),
+                                        url: createURL("createSnapshot&volumeid=" + args.context.volumes[0].id + "&quiescevm=" + args.context.quiescevm),
                                         dataType: "json",
                                         async: true,
                                         success: function(json) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/90cc00df/ui/scripts/ui/dialog.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/dialog.js b/ui/scripts/ui/dialog.js
index 3d34203..cebe167 100644
--- a/ui/scripts/ui/dialog.js
+++ b/ui/scripts/ui/dialog.js
@@ -144,7 +144,7 @@
                 if (field.isHidden != null) {
                     if (typeof(field.isHidden) == 'boolean' && field.isHidden == true)
                         $formItem.hide();
-                    else if (typeof(field.isHidden) == 'function' && field.isHidden() == true)
+                    else if (typeof(field.isHidden) == 'function' && field.isHidden(args) == true)
                         $formItem.hide();
                 }
 


[2/2] git commit: updated refs/heads/ui-wip-cs5388-review to 14dcd80

Posted by bf...@apache.org.
Fixed issue with quiescevm param on snapshot UI

CLOUDSTACK-5388


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

Branch: refs/heads/ui-wip-cs5388-review
Commit: 14dcd803fa17d688db1a990bb23bdcff1d013da4
Parents: 90cc00d
Author: Chris Suich <ch...@netapp.com>
Authored: Thu Dec 5 16:23:07 2013 -0500
Committer: Brian Federle <br...@citrix.com>
Committed: Fri Dec 6 11:11:06 2013 -0800

----------------------------------------------------------------------
 ui/scripts/storage.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/14dcd803/ui/scripts/storage.js
----------------------------------------------------------------------
diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js
index 569099d..e58f5fd 100644
--- a/ui/scripts/storage.js
+++ b/ui/scripts/storage.js
@@ -592,7 +592,7 @@
                                 },
                                 action: function(args) {
                                     $.ajax({
-                                        url: createURL("createSnapshot&volumeid=" + args.context.volumes[0].id + "&quiescevm=" + args.context.quiescevm),
+                                        url: createURL("createSnapshot&volumeid=" + args.context.volumes[0].id + "&quiescevm=" + (args.data.quiescevm=='on')),
                                         dataType: "json",
                                         async: true,
                                         success: function(json) {