cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jessicaw...@apache.org
Subject git commit: updated refs/heads/master to 7edb4d3
Date Wed, 23 Oct 2013 18:46:52 GMT
Updated Branches:
  refs/heads/master 1f0dd7cc3 -> 7edb4d377


CLOUDSTACK-4024: UI > (1) detailView widget - add action handler for prepareObjectStoreMigration.
(2) Infrastructure > Secondary Storage > add new action prepareObjectStoreMigration
and show it when provider is NFS.


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

Branch: refs/heads/master
Commit: 7edb4d377fd6337725cd57e6f3150cd2592be18e
Parents: 1f0dd7c
Author: Jessica Wang <jessicawang@apache.org>
Authored: Wed Oct 23 11:46:30 2013 -0700
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Wed Oct 23 11:46:42 2013 -0700

----------------------------------------------------------------------
 ui/scripts/system.js                | 38 +++++++++++++++++++++++++++++++-
 ui/scripts/ui/widgets/detailView.js |  6 +++++
 2 files changed, 43 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7edb4d37/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index dea495b..7fb807d 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -14677,7 +14677,38 @@
                             detailView: {
                                 name: 'Secondary storage details',
                                 isMaximized: true,
-                                actions: {
+                                actions: {                                	
+                                	prepareObjectStoreMigration: {
+                                        label: 'Prepare Object Store Migration',
+                                        messages: {
+                                            confirm: function(args) {
+                                                return 'Please confirm you want to prepare
migration of secondary storage to object store.';
+                                            },
+                                            notification: function(args) {
+                                                return 'Prepare Object Store Migration';
+                                            }
+                                        },
+                                        action: function(args) {                        
               	
+                                            $.ajax({
+                                                url: createURL('prepareSecondaryStorageForMigration'),
+                                                data: {
+                                                    id: args.context.secondaryStorage[0].id
+                                                },                                      
         
+                                                success: function(json) {               
                                    
+                                                	var jid = json.preparesecondarystorageformigrationresponse.jobid;
+                                                    args.response.success({
+                                                        _custom: {
+                                                            jobId: jid
+                                                        }
+                                                    });                                 
                  
+                                                }
+                                            });
+                                        },
+                                        notification: {
+                                            poll: pollAsyncJobResult
+                                        }
+                                    },                                	
+                                	
                                     remove: {
                                         label: 'label.action.delete.secondary.storage',
                                         messages: {
@@ -16147,6 +16178,11 @@
         var jsonObj = args.context.item;
         var allowedActions = [];
         allowedActions.push("remove");
+                
+        if (jsonObj.providername == 'NFS') {
+        	allowedActions.push("prepareObjectStoreMigration");
+        }
+        
         return allowedActions;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7edb4d37/ui/scripts/ui/widgets/detailView.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/widgets/detailView.js b/ui/scripts/ui/widgets/detailView.js
index 0e975e4..7cbed22 100644
--- a/ui/scripts/ui/widgets/detailView.js
+++ b/ui/scripts/ui/widgets/detailView.js
@@ -369,6 +369,12 @@
             });
         },
 
+        prepareObjectStoreMigration: function($detailView, args) {        	
+            var tab = args.tabs[args.activeTab];
+            var isMultiple = tab.multiple;
+            uiActions.remove($detailView, args);
+        },            
+        
         /**
          * Convert editable fields to text boxes; clicking again saves data
          *


Mime
View raw message