cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mtutkow...@apache.org
Subject [26/50] git commit: updated refs/heads/sf-plugins to bcf1c72
Date Tue, 28 Jul 2015 20:15:12 GMT
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/2ef0de9a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/2ef0de9a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/2ef0de9a

Branch: refs/heads/sf-plugins
Commit: 2ef0de9aeb27ad5a5c4a59140e13959ef0f9e5b0
Parents: 26bfa4f
Author: Mike Tutkowski <mike.tutkowski@solidfire.com>
Authored: Fri Jul 10 10:21:16 2015 -0600
Committer: CloudStack <cloudstack@cloudstack-virtual-machine.(none)>
Committed: Tue Jul 28 13:42:42 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/2ef0de9a/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'


Mime
View raw message