AMBARI-6898. Config History: the version history box are in wrong sorting 
sequence sometimes.(xiwang)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/40dc5b75
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/40dc5b75
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/40dc5b75

Branch: refs/heads/branch-alerts-dev
Commit: 40dc5b75ee63358765d52a60d5751c6152100704
Parents: 30f8a87
Author: Xi Wang <xiw...@apache.org>
Authored: Mon Aug 18 11:15:16 2014 -0700
Committer: Xi Wang <xiw...@apache.org>
Committed: Tue Aug 19 11:36:34 2014 -0700

----------------------------------------------------------------------
 ambari-web/app/views/common/configs/config_history_flow.js | 5 ++++-
 ambari-web/app/views/main/dashboard/config_history_view.js | 1 -
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/40dc5b75/ambari-web/app/views/common/configs/config_history_flow.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/configs/config_history_flow.js 
b/ambari-web/app/views/common/configs/config_history_flow.js
index 5f7bfad..1dcb0e0 100644
--- a/ambari-web/app/views/common/configs/config_history_flow.js
+++ b/ambari-web/app/views/common/configs/config_history_flow.js
@@ -281,7 +281,10 @@ App.ConfigHistoryFlowView = Em.View.extend({
     });
   },
   serviceVersions: function () {
-    return App.ServiceConfigVersion.find().filterProperty('serviceName', 
this.get('serviceName'));
+    var allServiceVersions = 
App.ServiceConfigVersion.find().filterProperty('serviceName', 
this.get('serviceName'));
+    return allServiceVersions.sort(function (a, b) {
+      return Em.get(a, 'createTime') - Em.get(b, 'createTime');
+    });
   }.property('serviceName'),
   /**
    * move back to the previous service version

http://git-wip-us.apache.org/repos/asf/ambari/blob/40dc5b75/ambari-web/app/views/main/dashboard/config_history_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/config_history_view.js 
b/ambari-web/app/views/main/dashboard/config_history_view.js
index 5f9a943..d45ed9e 100644
--- a/ambari-web/app/views/main/dashboard/config_history_view.js
+++ b/ambari-web/app/views/main/dashboard/config_history_view.js
@@ -139,7 +139,6 @@ App.MainConfigHistoryView = App.TableView.extend({
     emptyValue: Em.I18n.t('common.all')
   }),
 
-
   modifiedFilterView: filters.createSelectView({
     column: 3,
     fieldType: 'filter-input-width',

Reply via email to