e9c2332ee5
* dynamically render the secretlistheader in the parent route. * start getting form setup even without openAPi working * add in create and cancel * making openAPI work * add default openAPI params * wip for new component with two radio options a ttl and input * handle createRecord on pki-roles-form * remove tooltips and cleanup * move formfieldgroupsloop back to non addon * cleanup * move secretListHeader * broadcast from radioSelectTtlOrString to parent * cleanup * cleanup from pr comments * more cleanup * addressing Jordans comments * use formFieldGroupsLoop move into addon. * cleanup
28 lines
659 B
JavaScript
28 lines
659 B
JavaScript
import ApplicationAdapter from '../application';
|
|
import { encodePath } from 'vault/utils/path-encoding-helpers';
|
|
|
|
export default class PkiIssuerEngineAdapter extends ApplicationAdapter {
|
|
namespace = 'v1';
|
|
|
|
optionsForQuery(id) {
|
|
let data = {};
|
|
if (!id) {
|
|
data['list'] = true;
|
|
}
|
|
return { data };
|
|
}
|
|
|
|
urlForQuery(backend, id) {
|
|
let url = `${this.buildURL()}/${encodePath(backend)}/issuers`;
|
|
if (id) {
|
|
url = url + '/' + encodePath(id);
|
|
}
|
|
return url;
|
|
}
|
|
|
|
query(store, type, query) {
|
|
const { backend, id } = query;
|
|
return this.ajax(this.urlForQuery(backend, id), 'GET', this.optionsForQuery(id));
|
|
}
|
|
}
|