ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject [28/32] ignite git commit: IGNITE-1596 Fixed version sort.
Date Mon, 30 Jan 2017 14:21:06 GMT
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-4621
Commit: 6f6ff397c8a2fb3f1041958a3338294cb44af998
Parents: ccc0f41
Author: Andrey Novikov <anovikov@gridgain.com>
Authored: Wed Jan 25 16:48:05 2017 +0700
Committer: Andrey Novikov <anovikov@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.


Mime
View raw message