You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by zh...@apache.org on 2016/02/26 06:18:27 UTC

kylin git commit: KYLIN-1337 fix Nmuber sort issue

Repository: kylin
Updated Branches:
  refs/heads/2.0-rc cccba7252 -> 01010b8ba


KYLIN-1337 fix Nmuber sort issue


Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/01010b8b
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/01010b8b
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/01010b8b

Branch: refs/heads/2.0-rc
Commit: 01010b8ba0cf24b20cb092b28203013121e711e2
Parents: cccba72
Author: janzhongi <ji...@ebay.com>
Authored: Fri Feb 26 13:18:04 2016 +0800
Committer: janzhongi <ji...@ebay.com>
Committed: Fri Feb 26 13:18:04 2016 +0800

----------------------------------------------------------------------
 webapp/app/js/filters/filter.js   | 6 +++++-
 webapp/app/js/model/cubeConfig.js | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/01010b8b/webapp/app/js/filters/filter.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/filters/filter.js b/webapp/app/js/filters/filter.js
index f18b6f6..4e8d210 100755
--- a/webapp/app/js/filters/filter.js
+++ b/webapp/app/js/filters/filter.js
@@ -54,7 +54,11 @@ KylinApp
           result = 1;
         }
         else {
-          result = attriOfA.toLowerCase() > attriOfB.toLowerCase() ? 1 : attriOfA.toLowerCase() < attriOfB.toLowerCase() ? -1 : 0;
+          if(!isNaN(attriOfA)||!isNaN(attriOfB)){
+            result = attriOfA > attriOfB ? 1 : attriOfA < attriOfB ? -1 : 0;
+          }else{
+            result = attriOfA.toLowerCase() > attriOfB.toLowerCase() ? 1 : attriOfA.toLowerCase() < attriOfB.toLowerCase() ? -1 : 0;
+          }
         }
         return reverse ? -result : result;
       });

http://git-wip-us.apache.org/repos/asf/kylin/blob/01010b8b/webapp/app/js/model/cubeConfig.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/model/cubeConfig.js b/webapp/app/js/model/cubeConfig.js
index e06defe..0498fac 100644
--- a/webapp/app/js/model/cubeConfig.js
+++ b/webapp/app/js/model/cubeConfig.js
@@ -68,7 +68,7 @@ KylinApp.constant('cubeConfig', {
     {attr: 'input_records_count', name: 'Source Records'},
     {attr: 'last_build_time', name: 'Last Build Time'},
     {attr: 'owner', name: 'Owner'},
-    {attr: 'create_time', name: 'Create Time'}
+    {attr: 'create_time_utc', name: 'Create Time'}
   ],
   streamingAutoGenerateMeasure:[
     {name:"year_start",type:"date"},