You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by mt...@apache.org on 2015/09/19 03:31:26 UTC

[20/50] git commit: updated refs/heads/sf-plugins to 157efc3

Adding the ability to edit certain properties of a volume


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

Branch: refs/heads/sf-plugins
Commit: 6456534c07f6252a9bcb20cebe27c939c5e32cd4
Parents: 74ae95f
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Fri Jul 10 10:21:16 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:20 2015 -0600

----------------------------------------------------------------------
 ui/plugins/sfSharedVolume/sfSharedVolume.js | 45 +++++++++++++++++++++---
 1 file changed, 40 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6456534c/ui/plugins/sfSharedVolume/sfSharedVolume.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfSharedVolume/sfSharedVolume.js b/ui/plugins/sfSharedVolume/sfSharedVolume.js
index b43b221..f2182f6 100644
--- a/ui/plugins/sfSharedVolume/sfSharedVolume.js
+++ b/ui/plugins/sfSharedVolume/sfSharedVolume.js
@@ -215,8 +215,39 @@
         detailView: {
           name: 'label.volume.details',
           actions: {
+            edit: {
+              label: 'label.edit',
+              messages: {
+                notification: function(args) {
+                  return 'Edit Shared Volume';
+                }
+              },
+              action: function (args) {
+                var params = [];
+
+                params.push("&id=" + args.context.sfSharedVolumes[0].id);
+                params.push("&size=" + args.data.size);
+                params.push("&miniops=" + args.data.miniops);
+                params.push("&maxiops=" + args.data.maxiops);
+                params.push("&burstiops=" + args.data.burstiops);
+
+                $.ajax({
+                  url: createURL('updateSolidFireVolume' + params.join("")),
+                  success: function(json) {
+                    var sfvolumeObj = json.updatesolidfirevolumeresponse.apiupdatesolidfirevolume;
+
+                    args.response.success({
+                      data: sfvolumeObj
+                    });
+                  },
+                  error: function(json) {
+                    args.response.error(parseXMLHttpResponse(json));
+                  }
+                });
+              }
+            },
             remove: {
-              label: 'Delete Shared Volume',
+              label: 'label.delete',
               messages: {
                 confirm: function(args) {
                   return 'Are you sure you would like to delete this shared volume?';
@@ -275,16 +306,20 @@
                     label: 'VLAN'
                   },
                   size: {
-                    label: 'label.disk.size.gb'
+                    label: 'label.disk.size.gb',
+                    isEditable: true
                   },
                   miniops: {
-                    label: 'label.disk.iops.min'
+                    label: 'label.disk.iops.min',
+                    isEditable: true
                   },
                   maxiops: {
-                    label: 'label.disk.iops.max'
+                    label: 'label.disk.iops.max',
+                    isEditable: true
                   },
                   burstiops: {
-                    label: 'Burst IOPS'
+                    label: 'Burst IOPS',
+                    isEditable: true
                   },
                   targetportal: {
                     label: 'Target Portal'