You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by re...@apache.org on 2016/01/28 13:31:49 UTC

[1/3] git commit: updated refs/heads/4.7 to 333957f

Repository: cloudstack
Updated Branches:
  refs/heads/4.7 782d5d73f -> 333957f00


CLOUDSTACK-6181: Add 'root disk size' field in instance wizard for KVM templates

This commit includes three changes:
(1) Revert commit 13bf1ec5da9891eca98ef5dab61bf74b6db9530b to show the 'root disk size' field
(2) Set the default value from '1' to empty. This also changes the default value of customized service offerings from '1' to empty.
(3) show 'root disk size' field only when users choose a KVM template, as cloudstack supports deployvm with rootdisksize on KVM only.


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

Branch: refs/heads/4.7
Commit: 3822be5a5cf21de2d7578997e3eb63db2562ab75
Parents: 451ae2b
Author: Wei Zhou <w....@tech.leaseweb.com>
Authored: Fri Jan 15 07:47:47 2016 +0100
Committer: Wei Zhou <w....@tech.leaseweb.com>
Committed: Wed Jan 27 23:30:22 2016 +0100

----------------------------------------------------------------------
 .../classes/resources/messages.properties       |  2 +-
 ui/scripts/instanceWizard.js                    |  4 --
 ui/scripts/ui-custom/instanceWizard.js          | 55 ++++++++++++++++----
 3 files changed, 47 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3822be5a/client/WEB-INF/classes/resources/messages.properties
----------------------------------------------------------------------
diff --git a/client/WEB-INF/classes/resources/messages.properties b/client/WEB-INF/classes/resources/messages.properties
index 6cafdb0..bbc85b6 100644
--- a/client/WEB-INF/classes/resources/messages.properties
+++ b/client/WEB-INF/classes/resources/messages.properties
@@ -38,7 +38,7 @@ label.smb.domain=SMB Domain
 label.hypervisors=Hypervisors
 label.home=Home
 label.sockets=CPU Sockets
-label.root.disk.size=Root disk size
+label.root.disk.size=Root disk size (GB)
 label.s3.nfs.server=S3 NFS Server
 label.s3.nfs.path=S3 NFS Path
 label.delete.events=Delete events

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3822be5a/ui/scripts/instanceWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/instanceWizard.js b/ui/scripts/instanceWizard.js
index 98ac62b..958844e 100644
--- a/ui/scripts/instanceWizard.js
+++ b/ui/scripts/instanceWizard.js
@@ -279,10 +279,6 @@
                         hypervisors: hypervisorObjs
                     },
                     customHidden: function(args) {
-                        ////
-                        return true; // Disabled -- not supported in backend right now
-                        ////
-
                         if (selectedTemplateOrIso == 'select-template') {
                             return false; //show Root Disk Size field
                         } else { //selectedTemplateOrIso == 'select-iso'

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3822be5a/ui/scripts/ui-custom/instanceWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/instanceWizard.js b/ui/scripts/ui-custom/instanceWizard.js
index a7ce139..78f781f 100644
--- a/ui/scripts/ui-custom/instanceWizard.js
+++ b/ui/scripts/ui-custom/instanceWizard.js
@@ -419,8 +419,6 @@
                                         });
                                     });
 
-                                    originalValues(formData);
-
                                     var custom = args.customHidden({
                                         context: context,
                                         data: args.data
@@ -428,13 +426,52 @@
 
                                     $step.find('.custom-size-label').remove();
 
-                                    if (!custom) {
-                                        $step.find('.section.custom-size').show();
-                                        $step.addClass('custom-disk-size');
-                                    } else {
+                                    if (custom) {
                                         $step.find('.section.custom-size').hide();
                                         $step.removeClass('custom-disk-size');
                                     }
+
+                                    $step.find('input[type=radio]').bind('change', function() {
+                                        var $target = $(this);
+                                        var val = $target.val();
+                                        var item = null;
+                                        if (item == null) {
+                                            item = $.grep(args.data.templates.featuredtemplates, function(elem) {
+                                                return elem.id == val;
+                                            })[0];
+                                        }
+                                        if (item == null) {
+                                            item = $.grep(args.data.templates.communitytemplates, function(elem) {
+                                                return elem.id == val;
+                                            })[0];
+                                        }
+                                        if (item == null) {
+                                            item = $.grep(args.data.templates.mytemplates, function(elem) {
+                                                return elem.id == val;
+                                            })[0];
+                                        }
+                                        if (item == null) {
+                                            item = $.grep(args.data.templates.sharedtemplates, function(elem) {
+                                                return elem.id == val;
+                                            })[0];
+                                        }
+
+                                        if (!item) return true;
+
+                                        var hypervisor = item['hypervisor'];
+                                        if (hypervisor == 'KVM') {
+                                            $step.find('.section.custom-size').show();
+                                            $step.addClass('custom-disk-size');
+                                        } else {
+                                            $step.find('.section.custom-size').hide();
+                                            $step.removeClass('custom-disk-size');
+                                        }
+
+                                        return true;
+                                    });
+
+                                    originalValues(formData);
+
                                 }
                             }
                         };
@@ -1271,9 +1308,9 @@
                     args.maxDiskOfferingSize() : 100;
 
                 // Setup tabs and slider
-                $wizard.find('.section.custom-size .size.min span').html(minCustomDiskSize);
-                $wizard.find('.section.custom-size input[type=text]').val(minCustomDiskSize);
-                $wizard.find('.section.custom-size .size.max span').html(maxCustomDiskSize);
+                $wizard.find('.section.custom-size.custom-disk-size .size.min span').html(minCustomDiskSize);
+                $wizard.find('.section.custom-size.custom-disk-size input[type=text]').val(minCustomDiskSize);
+                $wizard.find('.section.custom-size.custom-disk-size .size.max span').html(maxCustomDiskSize);
                 $wizard.find('.tab-view').tabs();
                 $wizard.find('.slider').each(function() {
                    var $slider = $(this);


[2/3] git commit: updated refs/heads/4.7 to 333957f

Posted by re...@apache.org.
Merge pull request #1342 from ustcweizhou/root-disk-size-ui

CLOUDSTACK-6181: Add 'root disk size' field in instance wizard for KVM templatesThis commit includes three changes:
(1) Revert commit 13bf1ec5da9891eca98ef5dab61bf74b6db9530b to show the 'root disk size' field
(2) Set the default value from '1' to empty. This also changes the default value of customized service offerings from '1' to empty.
(3) show 'root disk size' field only when users choose a KVM template, as cloudstack supports deployvm with rootdisksize on KVM only.

* pr/1342:
  CLOUDSTACK-6181: Add 'root disk size' field in instance wizard for KVM templates

Signed-off-by: Remi Bergsma <gi...@remi.nl>


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

Branch: refs/heads/4.7
Commit: a4ad71cc56d07d9314bb060f93846d75cace4e11
Parents: 451ae2b 3822be5
Author: Remi Bergsma <gi...@remi.nl>
Authored: Thu Jan 28 13:30:34 2016 +0100
Committer: Remi Bergsma <gi...@remi.nl>
Committed: Thu Jan 28 13:30:34 2016 +0100

----------------------------------------------------------------------
 .../classes/resources/messages.properties       |  2 +-
 ui/scripts/instanceWizard.js                    |  4 --
 ui/scripts/ui-custom/instanceWizard.js          | 55 ++++++++++++++++----
 3 files changed, 47 insertions(+), 14 deletions(-)
----------------------------------------------------------------------



[3/3] git commit: updated refs/heads/4.7 to 333957f

Posted by re...@apache.org.
Merge release branch 4.6 to 4.7

* 4.6:
  CLOUDSTACK-6181: Add 'root disk size' field in instance wizard for KVM templates


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

Branch: refs/heads/4.7
Commit: 333957f00f380c8db0a435e5616dd1d5ac3cfdff
Parents: 782d5d7 a4ad71c
Author: Remi Bergsma <gi...@remi.nl>
Authored: Thu Jan 28 13:31:26 2016 +0100
Committer: Remi Bergsma <gi...@remi.nl>
Committed: Thu Jan 28 13:31:26 2016 +0100

----------------------------------------------------------------------
 .../classes/resources/messages.properties       |  2 +-
 ui/scripts/instanceWizard.js                    |  4 --
 ui/scripts/ui-custom/instanceWizard.js          | 55 ++++++++++++++++----
 3 files changed, 47 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/333957f0/client/WEB-INF/classes/resources/messages.properties
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/333957f0/ui/scripts/instanceWizard.js
----------------------------------------------------------------------