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:34 UTC
[24/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/6f6ff397
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/6f6ff397
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/6f6ff397
Branch: refs/heads/ignite-1.9
Commit: 6f6ff397c8a2fb3f1041958a3338294cb44af998
Parents: ccc0f41
Author: Andrey Novikov <an...@gridgain.com>
Authored: Wed Jan 25 16:48:05 2017 +0700
Committer: Andrey Novikov <an...@gridgain.com>
Committed: Wed Jan 25 16:49:42 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/6f6ff397/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.