2020-05-03 04:31:42 +00:00
|
|
|
import { inject as service } from '@ember/service';
|
|
|
|
import Route from '@ember/routing/route';
|
|
|
|
import notifyError from 'nomad-ui/utils/notify-error';
|
|
|
|
|
2020-06-10 13:49:16 +00:00
|
|
|
export default class PluginRoute extends Route {
|
|
|
|
@service store;
|
|
|
|
@service system;
|
2020-05-03 04:31:42 +00:00
|
|
|
|
|
|
|
serialize(model) {
|
|
|
|
return { plugin_name: model.get('plainId') };
|
2020-06-10 13:49:16 +00:00
|
|
|
}
|
2020-05-03 04:31:42 +00:00
|
|
|
|
|
|
|
model(params) {
|
|
|
|
return this.store.findRecord('plugin', `csi/${params.plugin_name}`).catch(notifyError(this));
|
2020-06-10 13:49:16 +00:00
|
|
|
}
|
|
|
|
}
|