DEV: only load staff logs when page is visited

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.

diff --git a/app/assets/javascripts/admin/controllers/admin-logs-staff-action-logs.js b/app/assets/javascripts/admin/controllers/admin-logs-staff-action-logs.js
index 849861c..7ef84b4 100644
--- a/app/assets/javascripts/admin/controllers/admin-logs-staff-action-logs.js
+++ b/app/assets/javascripts/admin/controllers/admin-logs-staff-action-logs.js
@@ -4,7 +4,7 @@ import { scheduleOnce } from "@ember/runloop";
 import Controller from "@ember/controller";
 import { exportEntity } from "discourse/lib/export-csv";
 import { outputExportResult } from "discourse/lib/export-result";
-import discourseComputed, { on } from "discourse-common/utils/decorators";
+import discourseComputed from "discourse-common/utils/decorators";
 
 export default Controller.extend({
   model: null,
@@ -17,7 +17,6 @@ export default Controller.extend({
     return name ? I18n.t("admin.logs.staff_actions.actions." + name) : null;
   },
 
-  @on("init")
   resetFilters() {
     this.setProperties({
       model: EmberObject.create({ loadingMore: true }),
diff --git a/app/assets/javascripts/admin/routes/admin-logs-staff-action-logs.js b/app/assets/javascripts/admin/routes/admin-logs-staff-action-logs.js
index 0ef8e6e..b007eca 100644
--- a/app/assets/javascripts/admin/routes/admin-logs-staff-action-logs.js
+++ b/app/assets/javascripts/admin/routes/admin-logs-staff-action-logs.js
@@ -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 });

GitHub sha: 83f5f917