DEV: only load staff logs when page is visited

Previously we would load admin staff action logs unconditionally as soon
as the controller was instantiated, this is not desirable we only want to
run the query when you visit the route.
This commit is contained in:
Sam Saffron
2020-04-03 14:13:01 +11:00
parent 2f9879a9a1
commit 83f5f9176b
2 changed files with 6 additions and 2 deletions

View File

@@ -9,6 +9,11 @@ export default DiscourseRoute.extend({
});
},
activate() {
let controller = this.controllerFor("admin-logs-staff-action-logs");
if (controller.filters === null) controller.resetFilters();
},
actions: {
showDetailsModal(model) {
showModal("admin-staff-action-log-details", { model, admin: true });