cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [1/2] git commit: updated refs/heads/master to 7f59d6c
Date Mon, 22 Jul 2013 23:08:19 GMT
Updated Branches:
  refs/heads/4.2 6d5435e98 -> c2faa0906
  refs/heads/master eff27e1f8 -> 7f59d6c9e


CLOUDSTACK-2990: Before scape-up, present prompt to user if on VMware


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

Branch: refs/heads/master
Commit: 7f59d6c9ee6708d22e5ddce750adbb4487e954d2
Parents: eff27e1
Author: Brian Federle <brian.federle@citrix.com>
Authored: Mon Jul 22 16:07:40 2013 -0700
Committer: Brian Federle <brian.federle@citrix.com>
Committed: Mon Jul 22 16:07:47 2013 -0700

----------------------------------------------------------------------
 ui/scripts/autoscaler.js | 32 ++++++++++++++++++++++++++++++--
 1 file changed, 30 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7f59d6c9/ui/scripts/autoscaler.js
----------------------------------------------------------------------
diff --git a/ui/scripts/autoscaler.js b/ui/scripts/autoscaler.js
index d30ace8..b2aa56b 100644
--- a/ui/scripts/autoscaler.js
+++ b/ui/scripts/autoscaler.js
@@ -1341,6 +1341,7 @@
                         array1.push("&interval=" + args.data.interval);
                         array1.push("&scaleuppolicyids=" + args.scaleUpPolicyResponse.id);
                         array1.push("&scaledownpolicyids=" + args.scaleDownPolicyResponse.id);
+                        
                         $.ajax({
                             url: createURL('createAutoScaleVmGroup' + array1.join("")),
                             dataType: 'json',
@@ -1414,8 +1415,35 @@
                     }
                 };
 
-                //*** API calls start!!! ********
-                scaleUp(args);
+                // Get hypervisor;
+                // if VMware, show notification to user about additional configuration required
+                $.ajax({
+                    url: createURL('listTemplates'),
+                    data: {
+                        id: args.data.templateNames,
+                        templatefilter: 'all'
+                    },
+                    async: false,
+                    success: function(json) {
+                        var template = json.listtemplatesresponse.template;
+
+                        if (template && template[0].hypervisor === 'VMware') {
+                            cloudStack.dialog.confirm({
+                                message: 'For VMware-based VMs, please read the dynamic scaling
section in the admin guide before scaling. Would you like to continue?,',
+                                action: function() {
+                                    //*** API calls start!!! ********
+                                    scaleUp(args);
+                                },
+                                cancelAction: function() {
+                                    $('.loading-overlay').remove();
+                                }
+                            });
+                        } else {
+                            //*** API calls start!!! ********
+                            scaleUp(args);
+                        }
+                    }
+                });
 
             },
             destroy: function(args) {


Mime
View raw message