github.com/hernad/nomad@v1.6.112/ui/app/routes/csi/plugins/plugin.js (about)

     1  /**
     2   * Copyright (c) HashiCorp, Inc.
     3   * SPDX-License-Identifier: MPL-2.0
     4   */
     5  
     6  import { inject as service } from '@ember/service';
     7  import Route from '@ember/routing/route';
     8  import notifyError from 'nomad-ui/utils/notify-error';
     9  
    10  export default class PluginRoute extends Route {
    11    @service store;
    12    @service system;
    13  
    14    serialize(model) {
    15      return { plugin_name: model.get('plainId') };
    16    }
    17  
    18    model(params) {
    19      return this.store
    20        .findRecord('plugin', `csi/${params.plugin_name}`)
    21        .catch(notifyError(this));
    22    }
    23  }