You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by je...@apache.org on 2013/08/23 00:05:00 UTC

[1/3] git commit: updated refs/heads/master to 2e56e7b

Updated Branches:
  refs/heads/master 922ef7622 -> 2e56e7b02


CLOUDSTACK-4102: UI > widget > extend dialog widget to have dynamic description.


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

Branch: refs/heads/master
Commit: 3f4ef406cf01b05e31e6b0713d464431ec2834ef
Parents: 922ef76
Author: Jessica Wang <je...@apache.org>
Authored: Thu Aug 22 13:58:56 2013 -0700
Committer: Jessica Wang <je...@apache.org>
Committed: Thu Aug 22 15:04:18 2013 -0700

----------------------------------------------------------------------
 ui/scripts/ui/dialog.js             | 8 +++++++-
 ui/scripts/ui/widgets/detailView.js | 4 +++-
 2 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3f4ef406/ui/scripts/ui/dialog.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/dialog.js b/ui/scripts/ui/dialog.js
index 37e2a86..7bd2034 100644
--- a/ui/scripts/ui/dialog.js
+++ b/ui/scripts/ui/dialog.js
@@ -46,8 +46,14 @@
             var createLabel = _l(args.form.createLabel);
 
             // Description text
+            var formDesc;
+            if (typeof(args.form.desc) == 'function') {            	
+            	formDesc = args.form.desc(args);
+            } else { //typeof(args.form.desc) == 'string' or 'undefined'
+            	formDesc = args.form.desc;
+            }              
             $('<span>').addClass('message').prependTo($formContainer).html(
-                _l(args.form.desc)
+                _l(formDesc)
             );
 
             // Submit button

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3f4ef406/ui/scripts/ui/widgets/detailView.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/widgets/detailView.js b/ui/scripts/ui/widgets/detailView.js
index 92dfe37..3a59d41 100644
--- a/ui/scripts/ui/widgets/detailView.js
+++ b/ui/scripts/ui/widgets/detailView.js
@@ -70,6 +70,7 @@
                 action.notification : {};
             var messages = action.messages;
             var id = args.id;
+            var jsonObj = args.jsonObj;
             var context = $.extend(true, {},
                 args.context ? args.context : $detailView.data('view-args').context);
             var _custom = $detailView.data('_custom');
@@ -314,7 +315,8 @@
                         ref: {
                             id: id
                         },
-                        context: context
+                        context: context,
+                        jsonObj: jsonObj
                     });
                 } else if (action.listView) {
                     cloudStack.dialog.listView({


[2/3] git commit: updated refs/heads/master to 2e56e7b

Posted by je...@apache.org.
CLOUDSTACK-4102: UI > instances page > detailView > change service offering action > display different description vm's state and vm's hypervisor.


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

Branch: refs/heads/master
Commit: ecccb88aa96aa9c44def463a42260dbdcc8e2b4e
Parents: 3f4ef40
Author: Jessica Wang <je...@apache.org>
Authored: Thu Aug 22 14:00:29 2013 -0700
Committer: Jessica Wang <je...@apache.org>
Committed: Thu Aug 22 15:04:36 2013 -0700

----------------------------------------------------------------------
 ui/scripts/instances.js | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ecccb88a/ui/scripts/instances.js
----------------------------------------------------------------------
diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js
index b8ffa2d..20d3d9a 100644
--- a/ui/scripts/instances.js
+++ b/ui/scripts/instances.js
@@ -1278,7 +1278,14 @@
                         label: 'label.change.service.offering',
                         createForm: {
                             title: 'label.change.service.offering',
-                            desc: 'Please read the dynamic scaling section in the admin guide before scaling up.',                            
+                            desc: function(args) {
+                            	var description = '';                            	
+                            	var vmObj = args.jsonObj;                            	
+                            	if (vmObj.state == 'Running' && vmObj.hypervisor == 'VMware') {
+                            		description = 'Please read the dynamic scaling section in the admin guide before scaling up.';
+                            	}                             
+                                return description;                  	                
+                            },
                             fields: {
                                 serviceOffering: {
                                     label: 'label.compute.offering',


[3/3] git commit: updated refs/heads/master to 2e56e7b

Posted by je...@apache.org.
CLOUDSTACK-4102: UI > Instracture > SystemVM / VirtualRouter > detailView > change service offering action - display different description based on VM's state.


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

Branch: refs/heads/master
Commit: 2e56e7b02c6c1dd5104d4b736f4d354365fdfcea
Parents: ecccb88
Author: Jessica Wang <je...@apache.org>
Authored: Thu Aug 22 14:09:45 2013 -0700
Committer: Jessica Wang <je...@apache.org>
Committed: Thu Aug 22 15:04:48 2013 -0700

----------------------------------------------------------------------
 ui/scripts/system.js | 30 +++++++++++++++++++++++++++---
 1 file changed, 27 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2e56e7b0/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 68c31e2..8ba1a53 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -6639,7 +6639,15 @@
                                                         label: 'label.change.service.offering',
                                                         createForm: {
                                                             title: 'label.change.service.offering',
-                                                            desc: 'Please read the dynamic scaling section in the admin guide before scaling up.', 
+                                                            desc: function(args) {
+                                                            	var description = '';                            	
+                                                            	var vmObj = args.jsonObj;     
+                                                            	//if (vmObj.state == 'Running' && vmObj.hypervisor == 'VMware') { //needs to wait for API fix that will return hypervisor property
+                                                            	if (vmObj.state == 'Running') {	
+                                                            		description = 'Please read the dynamic scaling section in the admin guide before scaling up.';
+                                                            	}                             
+                                                                return description;                  	                
+                                                            },
                                                             fields: {
                                                                 serviceOfferingId: {
                                                                     label: 'label.compute.offering',
@@ -7606,7 +7614,15 @@
                                 label: 'label.change.service.offering',
                                 createForm: {
                                     title: 'label.change.service.offering',
-                                    desc: 'Please read the dynamic scaling section in the admin guide before scaling up.', 
+                                    desc: function(args) {
+                                    	var description = '';                            	
+                                    	var vmObj = args.jsonObj;     
+                                    	//if (vmObj.state == 'Running' && vmObj.hypervisor == 'VMware') { //needs to wait for API fix that will return hypervisor property
+                                    	if (vmObj.state == 'Running') {	
+                                    		description = 'Please read the dynamic scaling section in the admin guide before scaling up.';
+                                    	}                             
+                                        return description;                  	                
+                                    },
                                     fields: {
                                         serviceOfferingId: {
                                             label: 'label.compute.offering',
@@ -8155,7 +8171,15 @@
                                 label: 'label.change.service.offering',
                                 createForm: {
                                     title: 'label.change.service.offering',
-                                    desc: 'Please read the dynamic scaling section in the admin guide before scaling up.', 
+                                    desc: function(args) {
+                                    	var description = '';                            	
+                                    	var vmObj = args.jsonObj;     
+                                    	//if (vmObj.state == 'Running' && vmObj.hypervisor == 'VMware') { //needs to wait for API fix that will return hypervisor property
+                                    	if (vmObj.state == 'Running') {	
+                                    		description = 'Please read the dynamic scaling section in the admin guide before scaling up.';
+                                    	}                             
+                                        return description;                  	                
+                                    },
                                     fields: {
                                         serviceOfferingId: {
                                             label: 'label.compute.offering',