claire bontempo 5e5e61b5a8
UI: add pki cluster config parameters (#20724)
* add config directory, rename crl and urls models

* fix imports

* add cluster config fields to edit form

* reorder url save

* update tests

* add to details page

* add details test;

* fix adapter name

* fix cluster adapter test name

* combine adapter tests

* update imports

* fix git diff

* move crl and urls adapters to config folder

* add config file

* woops add config adapter

* final renaming!!

* fix imports after naming to base

* add cluster to beforeModel hook

* hide help text

* maybe you should write tests that actually pass, claire

* seriously claire its embarrassing
2023-05-23 15:24:53 -07:00

22 lines
518 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import ApplicationAdapter from '../../application';
export default class PkiConfigBaseAdapter extends ApplicationAdapter {
namespace = 'v1';
findRecord(store, type, backend) {
return this.ajax(this._url(backend), 'GET').then((resp) => {
return resp.data;
});
}
updateRecord(store, type, snapshot) {
const data = snapshot.serialize();
return this.ajax(this._url(snapshot.record.id), 'POST', { data });
}
}