Przeglądaj źródła

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

Xi Wang 11 lat temu
rodzic
commit
40dc5b75ee

+ 4 - 1
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

+ 0 - 1
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',