2019-10-23 12:39:32 -04:00
|
|
|
import Route from "@ember/routing/route";
|
|
|
|
export default Route.extend({
|
2015-02-06 17:32:59 -05:00
|
|
|
model() {
|
2018-06-15 11:03:24 -04:00
|
|
|
return this.store.findAll("plugin");
|
2015-02-06 17:32:59 -05:00
|
|
|
},
|
|
|
|
|
|
|
|
actions: {
|
2015-07-02 12:45:17 -04:00
|
|
|
showSettings(plugin) {
|
2018-06-15 11:03:24 -04:00
|
|
|
const controller = this.controllerFor("adminSiteSettings");
|
|
|
|
this.transitionTo("adminSiteSettingsCategory", "plugins").then(() => {
|
2015-07-02 12:45:17 -04:00
|
|
|
if (plugin) {
|
2020-05-10 07:07:45 -04:00
|
|
|
// filterContent() is normally on a debounce from typing.
|
|
|
|
// Because we don't want the default of "All Results", we tell it
|
|
|
|
// to skip the next debounce.
|
|
|
|
controller.set("filter", `plugin:${plugin.id}`);
|
|
|
|
controller.set("_skipBounce", true);
|
|
|
|
controller.filterContentNow("plugins");
|
2015-07-02 12:45:17 -04:00
|
|
|
}
|
|
|
|
});
|
2015-02-06 17:32:59 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|