You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2015/10/27 13:43:49 UTC
[2/2] ambari git commit: AMBARI-13579. Wrong sorting icons on config
history page
AMBARI-13579. Wrong sorting icons on config history page
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/17d6d8a5
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/17d6d8a5
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/17d6d8a5
Branch: refs/heads/trunk
Commit: 17d6d8a59001e865ea31a2a06cfb93295f772963
Parents: bd7d61d
Author: Alex Antonenko <hi...@gmail.com>
Authored: Tue Oct 27 14:21:52 2015 +0200
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Tue Oct 27 14:43:44 2015 +0200
----------------------------------------------------------------------
.../app/views/main/dashboard/config_history_view.js | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/17d6d8a5/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 7cc95a3..5244422 100644
--- a/ambari-web/app/views/main/dashboard/config_history_view.js
+++ b/ambari-web/app/views/main/dashboard/config_history_view.js
@@ -40,6 +40,19 @@ App.MainConfigHistoryView = App.TableView.extend(App.TableServerViewMixin, {
return this.t('tableView.filters.filteredConfigVersionInfo').format(this.get('filteredCount'), this.get('totalCount'));
}.property('filteredCount', 'totalCount'),
+ willInsertElement: function () {
+ var
+ controllerName = this.get('controller.name'),
+ savedSortConditions = App.db.getSortingStatuses(controllerName) || [];
+
+ if (savedSortConditions && savedSortConditions.everyProperty('status', 'sorting')) {
+ savedSortConditions.push({
+ name: "createTime",
+ status: "sorting_desc"
+ });
+ App.db.setSortingStatuses(controllerName, savedSortConditions);
+ }
+ },
didInsertElement: function () {
this.addObserver('startIndex', this, 'updatePagination');
this.addObserver('displayLength', this, 'updatePagination');
@@ -78,7 +91,6 @@ App.MainConfigHistoryView = App.TableView.extend(App.TableServerViewMixin, {
modifiedSort: sort.fieldView.extend({
column: 3,
name: 'createTime',
- status: 'sorting_desc',
displayName: Em.I18n.t('dashboard.configHistory.table.created.title')
}),
authorSort: sort.fieldView.extend({