From e1a746ca28d5f1516e193034f287c5e85f7d55e3 Mon Sep 17 00:00:00 2001 From: angusmcleod Date: Thu, 18 Nov 2021 16:32:23 +0800 Subject: [PATCH] Add pluginId and console.logs --- .../discourse/controllers/admin-wizards-notices.js.es6 | 1 + assets/javascripts/discourse/controllers/admin-wizards.js.es6 | 1 + .../discourse/initializers/custom-wizard-edits.js.es6 | 3 +++ 3 files changed, 5 insertions(+) diff --git a/assets/javascripts/discourse/controllers/admin-wizards-notices.js.es6 b/assets/javascripts/discourse/controllers/admin-wizards-notices.js.es6 index 1721e699..06c61054 100644 --- a/assets/javascripts/discourse/controllers/admin-wizards-notices.js.es6 +++ b/assets/javascripts/discourse/controllers/admin-wizards-notices.js.es6 @@ -29,6 +29,7 @@ export default Controller.extend({ CustomWizardNotice.list({ page, include_all: true }) .then((result) => { + console.log('loadMoreNotices result', result); if (result.notices.length === 0) { this.set("canLoadMore", false); return; diff --git a/assets/javascripts/discourse/controllers/admin-wizards.js.es6 b/assets/javascripts/discourse/controllers/admin-wizards.js.es6 index 33841460..15a98525 100644 --- a/assets/javascripts/discourse/controllers/admin-wizards.js.es6 +++ b/assets/javascripts/discourse/controllers/admin-wizards.js.es6 @@ -14,6 +14,7 @@ export default Controller.extend({ this.messageBus.subscribe("/custom-wizard/notices", (data) => { if (isPresent(data.active_notice_count)) { this.set("activeNoticeCount", data.active_notice_count); + console.log('adminWizards resetting'); this.adminWizardsNotices.setProperties({ notices: A(), page: 0, diff --git a/assets/javascripts/discourse/initializers/custom-wizard-edits.js.es6 b/assets/javascripts/discourse/initializers/custom-wizard-edits.js.es6 index e67f1ebd..a74dafdc 100644 --- a/assets/javascripts/discourse/initializers/custom-wizard-edits.js.es6 +++ b/assets/javascripts/discourse/initializers/custom-wizard-edits.js.es6 @@ -23,6 +23,8 @@ export default { withPluginApi("0.8.36", (api) => { api.modifyClass("route:admin-dashboard", { + pluginId: "custom-wizard", + setupController(controller) { this._super(...arguments); @@ -32,6 +34,7 @@ export default { }); api.modifyClass("controller:admin-dashboard", { + pluginId: "custom-wizard", criticalNotices: A(), unsubscribe() {