open-vault/ui/app/adapters/kmip/scope.js
Matthew Irish b0dfbde741
UI kmip scope delete and role form (#7169)
* 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
2019-07-23 16:00:00 -05:00

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');
},
});