cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raj...@apache.org
Subject [02/50] [abbrv] git commit: updated refs/heads/master to 4c5f792
Date Wed, 05 Nov 2014 10:44:56 GMT
CLOUDSTACK-7809: UI > remove unnecessary cookie 'capabilities', 'supportELB', 'kvmsnapshotenabled',
'regionsecondaryenabled', 'userpublictemplateenabled', 'userProjectsEnabled'.


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

Branch: refs/heads/master
Commit: 1ea6f7dd584b8817d025088431845949f8ed1825
Parents: 429ea8b
Author: Jessica Wang <jessicawang@apache.org>
Authored: Tue Oct 28 15:02:05 2014 -0700
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Tue Oct 28 15:02:05 2014 -0700

----------------------------------------------------------------------
 ui/scripts/cloudStack.js | 69 ++++++++-----------------------------------
 1 file changed, 12 insertions(+), 57 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1ea6f7dd/ui/scripts/cloudStack.js
----------------------------------------------------------------------
diff --git a/ui/scripts/cloudStack.js b/ui/scripts/cloudStack.js
index ea6fc16..6b4e15a 100644
--- a/ui/scripts/cloudStack.js
+++ b/ui/scripts/cloudStack.js
@@ -172,37 +172,15 @@
                     dataType: "json",
                     async: false,
                     success: function(json) {
-                        g_capabilities = json.listcapabilitiesresponse.capability;
-                        $.cookie('capabilities', g_capabilities, {
-                            expires: 1
-                        });
-
-                        g_supportELB = json.listcapabilitiesresponse.capability.supportELB.toString();
//convert boolean to string if it's boolean
-                        $.cookie('supportELB', g_supportELB, {
-                            expires: 1
-                        });
-
-                        g_kvmsnapshotenabled = json.listcapabilitiesresponse.capability.kvmsnapshotenabled;
//boolean
-                        $.cookie('kvmsnapshotenabled', g_kvmsnapshotenabled, {
-                            expires: 1
-                        });                        
-                                               
-                        g_regionsecondaryenabled = json.listcapabilitiesresponse.capability.regionsecondaryenabled;
//boolean
-                        $.cookie('regionsecondaryenabled', g_regionsecondaryenabled, {
-                            expires: 1
-                        }); 
-                                              
+                        g_capabilities = json.listcapabilitiesresponse.capability;      
                 
+                        g_supportELB = json.listcapabilitiesresponse.capability.supportELB.toString();
//convert boolean to string if it's boolean   
+                        g_kvmsnapshotenabled = json.listcapabilitiesresponse.capability.kvmsnapshotenabled;
//boolean          
+                        g_regionsecondaryenabled = json.listcapabilitiesresponse.capability.regionsecondaryenabled;
//boolean    
                         if (json.listcapabilitiesresponse.capability.userpublictemplateenabled
!= null) {
-                            g_userPublicTemplateEnabled = json.listcapabilitiesresponse.capability.userpublictemplateenabled.toString();
//convert boolean to string if it's boolean
-                            $.cookie('userpublictemplateenabled', g_userPublicTemplateEnabled,
{
-                                expires: 1
-                            });
+                            g_userPublicTemplateEnabled = json.listcapabilitiesresponse.capability.userpublictemplateenabled.toString();
//convert boolean to string if it's boolean                            
                         }
-
                         g_userProjectsEnabled = json.listcapabilitiesresponse.capability.allowusercreateprojects;
-                        $.cookie('userProjectsEnabled', g_userProjectsEnabled, {
-                            expires: 1
-                        });
+                       
 
                         g_cloudstackversion = json.listcapabilitiesresponse.capability.cloudstackversion;
 
@@ -314,36 +292,14 @@
                             async: false,
                             success: function(json) {
                                 g_capabilities = json.listcapabilitiesresponse.capability;
-                                $.cookie('capabilities', g_capabilities, {
-                                    expires: 1
-                                });
-
-                                g_supportELB = json.listcapabilitiesresponse.capability.supportELB.toString();
//convert boolean to string if it's boolean
-                                $.cookie('supportELB', g_supportELB, {
-                                    expires: 1
-                                });
-
-                                g_kvmsnapshotenabled = json.listcapabilitiesresponse.capability.kvmsnapshotenabled;
//boolean
-                                $.cookie('kvmsnapshotenabled', g_kvmsnapshotenabled, {
-                                    expires: 1
-                                });   
-                                
-                                g_regionsecondaryenabled = json.listcapabilitiesresponse.capability.regionsecondaryenabled;
//boolean
-                                $.cookie('regionsecondaryenabled', g_regionsecondaryenabled,
{
-                                    expires: 1
-                                }); 
-                                
+                                g_supportELB = json.listcapabilitiesresponse.capability.supportELB.toString();
//convert boolean to string if it's boolean      
+                                g_kvmsnapshotenabled = json.listcapabilitiesresponse.capability.kvmsnapshotenabled;
//boolean           
+                                g_regionsecondaryenabled = json.listcapabilitiesresponse.capability.regionsecondaryenabled;
//boolean                               
                                 if (json.listcapabilitiesresponse.capability.userpublictemplateenabled
!= null) {
-                                    g_userPublicTemplateEnabled = json.listcapabilitiesresponse.capability.userpublictemplateenabled.toString();
//convert boolean to string if it's boolean
-                                    $.cookie('userpublictemplateenabled', g_userPublicTemplateEnabled,
{
-                                        expires: 1
-                                    });
+                                    g_userPublicTemplateEnabled = json.listcapabilitiesresponse.capability.userpublictemplateenabled.toString();
//convert boolean to string if it's boolean                                    
                                 }
-
                                 g_userProjectsEnabled = json.listcapabilitiesresponse.capability.allowusercreateprojects;
-                                $.cookie('userProjectsEnabled', g_userProjectsEnabled, {
-                                    expires: 1
-                                });
+                                
 
                                 g_cloudstackversion = json.listcapabilitiesresponse.capability.cloudstackversion;
 
@@ -413,8 +369,7 @@
                         $.cookie('networktype', null);
                         $.cookie('timezoneoffset', null);
                         $.cookie('timezone', null);
-                        $.cookie('supportELB', null);
-
+                        
                         if (onLogoutCallback()) { //onLogoutCallback() will set g_loginResponse(single-sign-on
variable) to null, then bypassLoginCheck() will show login screen.
                             document.location.reload(); //when onLogoutCallback() returns
true, reload the current document.
                         }


Mime
View raw message