ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject ignite git commit: IGNITE-2456 Minor fix
Date Fri, 29 Jan 2016 06:53:48 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843-rc2 a783f6e1e -> 6e0876584


IGNITE-2456 Minor fix


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

Branch: refs/heads/ignite-843-rc2
Commit: 6e08765846ccccd1ad884d0caece05ee0b1c81f6
Parents: a783f6e
Author: Andrey <anovikov@gridgain.com>
Authored: Fri Jan 29 13:54:38 2016 +0700
Committer: Andrey <anovikov@gridgain.com>
Committed: Fri Jan 29 13:54:38 2016 +0700

----------------------------------------------------------------------
 .../ignite/console/agent/AgentConfiguration.java      | 14 +++++++++++---
 .../src/main/js/agents/agent-manager.js               |  2 +-
 2 files changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/6e087658/modules/control-center-agent/src/main/java/org/apache/ignite/console/agent/AgentConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/control-center-agent/src/main/java/org/apache/ignite/console/agent/AgentConfiguration.java
b/modules/control-center-agent/src/main/java/org/apache/ignite/console/agent/AgentConfiguration.java
index 00af4a7..7a0faa9 100644
--- a/modules/control-center-agent/src/main/java/org/apache/ignite/console/agent/AgentConfiguration.java
+++ b/modules/control-center-agent/src/main/java/org/apache/ignite/console/agent/AgentConfiguration.java
@@ -203,10 +203,16 @@ public class AgentConfiguration {
         if (val != null)
             driversFolder(val);
 
-        Long relDate = (Long)props.remove("rel-date");
+        val = (String)props.remove("rel-date");
 
-        if (relDate != null)
-            this.relDate = relDate;
+        if (val != null) {
+            try {
+                this.relDate = Long.parseLong(val);
+            }
+            catch (NumberFormatException ignored) {
+                // No-op.
+            }
+        }
     }
 
     /**
@@ -230,6 +236,8 @@ public class AgentConfiguration {
 
         if (driversFolder == null)
             driversFolder(cmd.driversFolder());
+
+        relDate = cmd.relDate();
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e087658/modules/control-center-web/src/main/js/agents/agent-manager.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/agents/agent-manager.js b/modules/control-center-web/src/main/js/agents/agent-manager.js
index 626f0ca..354a163 100644
--- a/modules/control-center-web/src/main/js/agents/agent-manager.js
+++ b/modules/control-center-web/src/main/js/agents/agent-manager.js
@@ -277,7 +277,7 @@ Client.prototype._rmtAuthMessage = function(msg) {
         var relDate = 0;
 
         if (!err)
-            relDate = stats.birthtime;
+            relDate = stats.birthtime.getTime();
 
         if ((msg.relDate || 0) < relDate)
             self.authResult('You are using an older version of the agent. Please reload agent
archive');


Mime
View raw message