You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2017/02/17 09:59:41 UTC
[31/50] [abbrv] ignite git commit: IGNITE-1596 Fixed version sort.
IGNITE-1596 Fixed version sort.
(cherry picked from commit 128ba07)
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/cfbe6e5d
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/cfbe6e5d
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/cfbe6e5d
Branch: refs/heads/ignite-1.9
Commit: cfbe6e5d4ab1ead118da474d86262ab614da88ad
Parents: 4d72bf8
Author: Andrey Novikov <an...@gridgain.com>
Authored: Wed Jan 25 16:48:05 2017 +0700
Committer: Andrey Novikov <an...@gridgain.com>
Committed: Wed Feb 1 17:46:22 2017 +0700
----------------------------------------------------------------------
modules/web-console/backend/app/agent.js | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/cfbe6e5d/modules/web-console/backend/app/agent.js
----------------------------------------------------------------------
diff --git a/modules/web-console/backend/app/agent.js b/modules/web-console/backend/app/agent.js
index 791ea50..961253f 100644
--- a/modules/web-console/backend/app/agent.js
+++ b/modules/web-console/backend/app/agent.js
@@ -650,14 +650,14 @@ module.exports.factory = function(_, fs, path, JSZip, socketio, settings, mongo)
const bParts = b.split('.');
for (let i = 0; i < aParts.length; ++i) {
- if (bParts.length === i)
- return 1;
+ if (aParts[i] !== bParts[i])
+ return aParts[i] < bParts[i] ? 1 : -1;
+ }
- if (aParts[i] === aParts[i])
- continue;
+ if (aParts.length === bParts.length)
+ return 0;
- return aParts[i] > bParts[i] ? 1 : -1;
- }
+ return aParts.length < bParts.length ? 1 : -1;
}));
// Latest version of agent distribution.