cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pran...@apache.org
Subject git commit: updated refs/heads/UI-explicitDedication to 6d20531
Date Tue, 14 May 2013 20:00:08 GMT
Updated Branches:
  refs/heads/UI-explicitDedication 00ed34971 -> 6d2053170


Pod dedication action button functionality


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

Branch: refs/heads/UI-explicitDedication
Commit: 6d205317087bd337e9963ae577a315ee25ac9a53
Parents: 00ed349
Author: Pranav Saxena <pranav.saxena@citrix.com>
Authored: Wed May 15 01:19:21 2013 +0530
Committer: Pranav Saxena <pranav.saxena@citrix.com>
Committed: Wed May 15 01:19:21 2013 +0530

----------------------------------------------------------------------
 ui/scripts/system.js |   66 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 66 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6d205317/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index f2fc8a4..592c238 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -8179,6 +8179,71 @@
                 }
               },
 
+                dedicate:{
+                   label: 'Dedicate Pod',
+                messages: {
+                  confirm: function(args) {
+                    return 'Do you really want to dedicate this pod to a domain/account?
';
+                  },
+                  notification: function(args) {
+                    return 'Pod Dedicated';
+                  }
+                },
+                createForm:{
+                   title:'Dedicate Pod',
+                   fields:{
+                         domainId:{
+                      label:'Domain',
+                      validation:{required:true},
+                      select:function(args){
+                         $.ajax({
+                              url:createURL("listDomains&listAll=true"),
+                              dataType:"json",
+                              async:false,
+                               success: function(json) {
+                                  var domainObjs= json.listdomainsresponse.domain;
+                                  var items=[];
+
+                                  $(domainObjs).each(function() {
+                                  items.push({id:this.id ,description:this.name });
+                                  });
+
+                                  args.response.success({
+                                  data: items
+                                });
+                               }
+
+
+                        });
+                       }
+                   },
+
+                   accountId:{
+                     label:'Account',
+                    // docID:'helpAccountForDedication',
+                     validation:{required:false}
+
+                  }
+
+
+                     }
+                },
+                action: function(args) {
+                    $.ajax({
+                    url: createURL("dedicatePod&podId=" + args.context.pods[0].id),
+                    dataType: "json",
+                    success: function(json) {
+                      var item = json.dedicatepodresponse.pod;
+                      args.response.success({
+                        actionFilter: podActionfilter,
+                        data:item
+                      });
+                    }
+                  });
+                }
+
+              },
+
               disable: {
                 label: 'label.action.disable.pod',
                 messages: {
@@ -12022,6 +12087,7 @@
     var podObj = args.context.item;
     var allowedActions = [];
     allowedActions.push("edit");
+     allowedActions.push("dedicate");
     if(podObj.allocationstate == "Disabled")
       allowedActions.push("enable");
     else if(podObj.allocationstate == "Enabled")


Mime
View raw message