You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ra...@apache.org on 2017/02/21 00:27:33 UTC

[1/2] git commit: updated refs/heads/master to 987be62

Repository: cloudstack
Updated Branches:
  refs/heads/master 1d1b503de -> 987be62b2


CLOUDSTACK-9768: Time displayed for events in UI is incorrect


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

Branch: refs/heads/master
Commit: b468fde98794b59b40d615e72c389104af8d570d
Parents: 17787a1
Author: Jayant Patil <ja...@accelerite.com>
Authored: Thu Feb 2 09:58:22 2017 +0530
Committer: Jayant Patil <ja...@accelerite.com>
Committed: Thu Feb 2 12:59:25 2017 +0530

----------------------------------------------------------------------
 api/src/org/apache/cloudstack/api/ApiConstants.java       |  1 +
 .../apache/cloudstack/api/response/LoginCmdResponse.java  | 10 ++++++++++
 server/src/com/cloud/api/ApiServer.java                   |  3 +++
 ui/scripts/cloudStack.js                                  |  6 ++++++
 4 files changed, 20 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b468fde9/api/src/org/apache/cloudstack/api/ApiConstants.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/ApiConstants.java b/api/src/org/apache/cloudstack/api/ApiConstants.java
index 708b0d1..e2f11c3 100644
--- a/api/src/org/apache/cloudstack/api/ApiConstants.java
+++ b/api/src/org/apache/cloudstack/api/ApiConstants.java
@@ -263,6 +263,7 @@ public class ApiConstants {
     public static final String ISO_ID = "isoid";
     public static final String TIMEOUT = "timeout";
     public static final String TIMEZONE = "timezone";
+    public static final String TIMEZONEOFFSET = "timezoneoffset";
     public static final String TYPE = "type";
     public static final String TRUST_STORE = "truststore";
     public static final String TRUST_STORE_PASSWORD = "truststorepass";

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b468fde9/api/src/org/apache/cloudstack/api/response/LoginCmdResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/LoginCmdResponse.java b/api/src/org/apache/cloudstack/api/response/LoginCmdResponse.java
index 55eb2c4..d2d122e 100644
--- a/api/src/org/apache/cloudstack/api/response/LoginCmdResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/LoginCmdResponse.java
@@ -58,6 +58,10 @@ public class LoginCmdResponse extends AuthenticationCmdResponse {
     @Param(description = "user time zone")
     private String timeZone;
 
+    @SerializedName(value = ApiConstants.TIMEZONEOFFSET)
+    @Param(description = "user time zoneoffset")
+    private String timeZoneOffset;
+
     @SerializedName(value = ApiConstants.REGISTERED)
     @Param(description = "Is user registered")
     private String registered;
@@ -138,6 +142,12 @@ public class LoginCmdResponse extends AuthenticationCmdResponse {
         this.timeZone = timeZone;
     }
 
+    public String getTimeZoneOffset() {
+        return timeZoneOffset;
+    }
+
+    public void setTimeZoneOffset(String timeZoneOffset) { this.timeZoneOffset = timeZoneOffset; }
+
     public String getRegistered() {
         return registered;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b468fde9/server/src/com/cloud/api/ApiServer.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiServer.java b/server/src/com/cloud/api/ApiServer.java
index 4c39f50..75bf380 100644
--- a/server/src/com/cloud/api/ApiServer.java
+++ b/server/src/com/cloud/api/ApiServer.java
@@ -987,6 +987,9 @@ public class ApiServer extends ManagerBase implements HttpRequestHandler, ApiSer
                 if (ApiConstants.TIMEZONE.equalsIgnoreCase(attrName)) {
                     response.setTimeZone(attrObj.toString());
                 }
+                if (ApiConstants.TIMEZONEOFFSET.equalsIgnoreCase(attrName)) {
+                    response.setTimeZoneOffset(attrObj.toString());
+                }
                 if (ApiConstants.REGISTERED.equalsIgnoreCase(attrName)) {
                     response.setRegistered(attrObj.toString());
                 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b468fde9/ui/scripts/cloudStack.js
----------------------------------------------------------------------
diff --git a/ui/scripts/cloudStack.js b/ui/scripts/cloudStack.js
index b712d6c..1190133 100644
--- a/ui/scripts/cloudStack.js
+++ b/ui/scripts/cloudStack.js
@@ -120,6 +120,7 @@
                     g_username = unBoxCookieValue('username');
                     g_userfullname = unBoxCookieValue('userfullname');
                     g_timezone = unBoxCookieValue('timezone');
+                    g_timezoneoffset = unBoxCookieValue('timezoneoffset');
                 } else { //single-sign-on (bypass login screen)
                     g_sessionKey = encodeURIComponent(g_loginResponse.sessionkey);
                     g_role = g_loginResponse.type;
@@ -129,6 +130,7 @@
                     g_domainid = g_loginResponse.domainid;
                     g_userfullname = g_loginResponse.firstname + ' ' + g_loginResponse.lastname;
                     g_timezone = g_loginResponse.timezone;
+                    g_timezoneoffset = g_loginResponse.timezoneoffset;
                 }
 
                 var userValid = false;
@@ -258,6 +260,7 @@
                         g_account = loginresponse.account;
                         g_domainid = loginresponse.domainid;
                         g_timezone = loginresponse.timezone;
+                        g_timezoneoffset = loginresponse.timezoneoffset;
                         g_userfullname = loginresponse.firstname + ' ' + loginresponse.lastname;
 
                         $.cookie('username', g_username, {
@@ -275,6 +278,9 @@
                         $.cookie('timezone', g_timezone, {
                             expires: 1
                         });
+                        $.cookie('timezoneoffset', g_timezoneoffset, {
+                            expires: 1
+                        });
                         $.cookie('userfullname', g_userfullname, {
                             expires: 1
                         });


[2/2] git commit: updated refs/heads/master to 987be62

Posted by ra...@apache.org.
Merge pull request #1926 from jayantpatil1234/CS-50157

CLOUDSTACK-9768: Time displayed for events in UI is incorrectTime displayed for events in UI is incorrect. Let's say, when we login using Japanese language the time displayed in the events is GMT instead of JST. However with English language the time is JST, as expected.
Example:
Time is displayed in the event is 10:40, if you are logged in using English language.
Whereas, time in the event shows 19:40 If you login with Japanese language.

* pr/1926:
  CLOUDSTACK-9768: Time displayed for events in UI is incorrect

Signed-off-by: Rajani Karuturi <ra...@accelerite.com>


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

Branch: refs/heads/master
Commit: 987be62b2e1a0d72f201906f4700f88efbde82fe
Parents: 1d1b503 b468fde
Author: Rajani Karuturi <ra...@accelerite.com>
Authored: Tue Feb 21 05:57:09 2017 +0530
Committer: Rajani Karuturi <ra...@accelerite.com>
Committed: Tue Feb 21 05:57:10 2017 +0530

----------------------------------------------------------------------
 api/src/org/apache/cloudstack/api/ApiConstants.java       |  1 +
 .../apache/cloudstack/api/response/LoginCmdResponse.java  | 10 ++++++++++
 server/src/com/cloud/api/ApiServer.java                   |  3 +++
 ui/scripts/cloudStack.js                                  |  6 ++++++
 4 files changed, 20 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/987be62b/api/src/org/apache/cloudstack/api/ApiConstants.java
----------------------------------------------------------------------