eagle-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ji...@apache.org
Subject eagle git commit: [EAGLE-941] reset timezone of time parse
Date Thu, 02 Mar 2017 10:16:30 GMT
Repository: eagle
Updated Branches:
  refs/heads/master 07990e3e7 -> 605e53a90


[EAGLE-941] reset timezone of time parse

When user set backend timezone. Timerange picker will auth time failed

Author: zombieJ <smith3816@gmail.com>

Closes #850 from zombieJ/EAGLE-941.


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

Branch: refs/heads/master
Commit: 605e53a9004b357aa04d0fb54f73ff1cfe3ae6e2
Parents: 07990e3
Author: zombieJ <smith3816@gmail.com>
Authored: Thu Mar 2 18:16:18 2017 +0800
Committer: zombieJ <smith3816@gmail.com>
Committed: Thu Mar 2 18:16:18 2017 +0800

----------------------------------------------------------------------
 .../src/main/webapp/app/dev/public/js/services/pageSrv.js |  2 +-
 .../src/main/webapp/app/dev/public/js/services/timeSrv.js | 10 +++++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/eagle/blob/605e53a9/eagle-server/src/main/webapp/app/dev/public/js/services/pageSrv.js
----------------------------------------------------------------------
diff --git a/eagle-server/src/main/webapp/app/dev/public/js/services/pageSrv.js b/eagle-server/src/main/webapp/app/dev/public/js/services/pageSrv.js
index f68789d..7b699be 100644
--- a/eagle-server/src/main/webapp/app/dev/public/js/services/pageSrv.js
+++ b/eagle-server/src/main/webapp/app/dev/public/js/services/pageSrv.js
@@ -39,7 +39,7 @@
 		var cachedGenNavPath = [];
 		PageConfig.getNavPath = function () {
 			if (cachedNavPath !== PageConfig.navPath || cachedGenNavPath.length !== cachedNavPath.length)
{
-				cachedNavPath = PageConfig.navPath;
+				cachedNavPath = PageConfig.navPath || [];
 				cachedGenNavPath = $.map(cachedNavPath, function (navPath) {
 					var pathEntity = $.extend({}, navPath);
 

http://git-wip-us.apache.org/repos/asf/eagle/blob/605e53a9/eagle-server/src/main/webapp/app/dev/public/js/services/timeSrv.js
----------------------------------------------------------------------
diff --git a/eagle-server/src/main/webapp/app/dev/public/js/services/timeSrv.js b/eagle-server/src/main/webapp/app/dev/public/js/services/timeSrv.js
index 552d452..d7b8fec 100644
--- a/eagle-server/src/main/webapp/app/dev/public/js/services/timeSrv.js
+++ b/eagle-server/src/main/webapp/app/dev/public/js/services/timeSrv.js
@@ -84,8 +84,16 @@
 						if(!isNaN(+time)) {
 							time = +time;
 						} else {
+							var tempTime = new moment(time);
 							time = new moment(time);
-							time.add(time.utcOffset(), "minutes");
+							time.utcOffset($Time.UTC_OFFSET);
+							time.year(tempTime.year());
+							time.month(tempTime.month());
+							time.date(tempTime.date());
+							time.hour(tempTime.hour());
+							time.minute(tempTime.minute());
+							time.second(tempTime.second());
+							time.millisecond(tempTime.millisecond());
 						}
 					}
 


Mime
View raw message