From 80f97d9514f4b4f2ff6a6eb2c6a12a8e18a83b45 Mon Sep 17 00:00:00 2001 From: Rishabh Nambiar <5862206+rishabhnambiar@users.noreply.github.com> Date: Thu, 30 Aug 2018 14:13:40 +0530 Subject: [PATCH] UX: Force refresh model to update last_run_at after a query is run --- .../discourse/controllers/admin-plugins-explorer.js.es6 | 1 + .../discourse/routes/admin-plugins-explorer.js.es6 | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/assets/javascripts/discourse/controllers/admin-plugins-explorer.js.es6 b/assets/javascripts/discourse/controllers/admin-plugins-explorer.js.es6 index bf007a9..61754fd 100644 --- a/assets/javascripts/discourse/controllers/admin-plugins-explorer.js.es6 +++ b/assets/javascripts/discourse/controllers/admin-plugins-explorer.js.es6 @@ -98,6 +98,7 @@ export default Ember.Controller.extend({ }, goHome() { + this.send('refreshModel'); this.set('selectedQueryId', null); this.transitionToRoute('adminPlugins.explorer'); }, diff --git a/assets/javascripts/discourse/routes/admin-plugins-explorer.js.es6 b/assets/javascripts/discourse/routes/admin-plugins-explorer.js.es6 index 662905e..6e723f7 100644 --- a/assets/javascripts/discourse/routes/admin-plugins-explorer.js.es6 +++ b/assets/javascripts/discourse/routes/admin-plugins-explorer.js.es6 @@ -18,5 +18,10 @@ export default Discourse.Route.extend({ setupController: function(controller, model) { controller.setProperties(model); + }, + + actions: { + refreshModel: function() { + this.refresh(); } -}); +}});