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-05-19 05:37:54 +00:00
|
|
|
export default Route.extend({
|
2020-05-03 04:31:42 +00:00
|
|
|
store: service(),
|
|
|
|
system: service(),
|
|
|
|
|
|
|
|
breadcrumbs: plugin => [
|
|
|
|
{
|
|
|
|
label: 'Plugins',
|
|
|
|
args: ['csi.plugins'],
|
|
|
|
},
|
|
|
|
{
|
2020-05-04 19:27:29 +00:00
|
|
|
label: plugin.plainId,
|
|
|
|
args: ['csi.plugins.plugin', plugin.plainId],
|
2020-05-03 04:31:42 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
|
|
|
|
serialize(model) {
|
|
|
|
return { plugin_name: model.get('plainId') };
|
|
|
|
},
|
|
|
|
|
|
|
|
model(params) {
|
|
|
|
return this.store.findRecord('plugin', `csi/${params.plugin_name}`).catch(notifyError(this));
|
|
|
|
},
|
|
|
|
});
|