diff --git a/assets/javascripts/discourse/controllers/admin-plugins-explorer.js.es6 b/assets/javascripts/discourse/controllers/admin-plugins-explorer.js.es6 index 61754fd..613577a 100644 --- a/assets/javascripts/discourse/controllers/admin-plugins-explorer.js.es6 +++ b/assets/javascripts/discourse/controllers/admin-plugins-explorer.js.es6 @@ -119,6 +119,14 @@ export default Ember.Controller.extend({ this.save().then(() => this.send('run')); }, + sortByProperty(property) { + if (this.sortBy[0] === `${property}:desc`) { + this.set('sortBy', [`${property}:asc`]); + } else { + this.set('sortBy', [`${property}:desc`]); + } + }, + create() { const name = this.get("newQueryName").trim(); this.set('loading', true); diff --git a/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs b/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs index 7679b73..ccc3129 100644 --- a/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs +++ b/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs @@ -147,9 +147,18 @@ {{#if sortedQueries.length}} - - - + + + {{#each sortedQueries as |query|}} diff --git a/assets/stylesheets/explorer.scss b/assets/stylesheets/explorer.scss index 5eea997..dbcf8d1 100644 --- a/assets/stylesheets/explorer.scss +++ b/assets/stylesheets/explorer.scss @@ -260,6 +260,9 @@ .query-desc { color: $primary-high; } + th:hover{ + cursor: pointer; + } } .explorer-pad-bottom {
{{i18n 'explorer.query_name'}}{{i18n 'explorer.query_user'}}{{i18n 'explorer.query_time'}} + {{d-icon "sort"}} + {{i18n 'explorer.query_name'}} + + {{d-icon "sort"}} + {{i18n 'explorer.query_user'}} + + {{d-icon "sort"}} + {{i18n 'explorer.query_time'}} +