b0dfbde741
* always use ?force for kmip scope delete * update the delete message when deleting a scope * support disabling and not showing help text for checkboxes * group TLS fields and render new allowed operations widget * add operation-field-display component for kmip roles * use operation-field-display component * switch glyph for false value in info-table-row * divvy up roles and tls * fix JSDoc - showHelpText defaults to true * fix tests and linting * rename vars in operation-field-display component * make the action name clearer re: what it's actually doing * align the allowed-ops header * show all operations as checked if you check to allow all
22 lines
563 B
JavaScript
22 lines
563 B
JavaScript
import BaseAdapter from './base';
|
|
|
|
export default BaseAdapter.extend({
|
|
createRecord(store, type, snapshot) {
|
|
let name = snapshot.attr('name');
|
|
return this.ajax(this._url(type.modelName, { backend: snapshot.record.backend }, name), 'POST').then(
|
|
() => {
|
|
return {
|
|
id: name,
|
|
name,
|
|
};
|
|
}
|
|
);
|
|
},
|
|
|
|
deleteRecord(store, type, snapshot) {
|
|
let url = this._url(type.modelName, { backend: snapshot.record.backend }, snapshot.id);
|
|
url = `${url}?force=true`;
|
|
return this.ajax(url, 'DELETE');
|
|
},
|
|
});
|