open-nomad/ui/app/adapters/node-pool.js
Jai 7103ce1957
ui: create node pool model (#17301)
Co-authored-by: Phil Renaud <phil@riotindustries.com>
Co-authored-by: Luiz Aoqui <luiz@hashicorp.com>
2023-06-22 13:11:44 -04:00

18 lines
484 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import ApplicationAdapter from './application';
import classic from 'ember-classic-decorator';
import { pluralize } from 'ember-inflector';
@classic
export default class NodePoolAdapter extends ApplicationAdapter {
urlForFindAll(modelName) {
let [relationshipResource, resource] = modelName.split('-');
resource = pluralize(resource);
return `/v1/${relationshipResource}/${resource}`;
}
}