open-vault/ui/app/adapters/server.js
Jordan Reimer 7c7d626420
Raft peer removal bug (#13098)
* fixes issue removing raft peer via cli not reflected in UI until refresh

* adds changelog entry
2021-11-09 15:05:25 -07:00

20 lines
518 B
JavaScript

import ApplicationAdapter from './application';
const fetchUrl = '/v1/sys/storage/raft/configuration';
export default ApplicationAdapter.extend({
urlForFindAll() {
return fetchUrl;
},
urlForQuery() {
return fetchUrl;
},
urlForDeleteRecord() {
return '/v1/sys/storage/raft/remove-peer';
},
deleteRecord(store, type, snapshot) {
let server_id = snapshot.attr('nodeId');
let url = '/v1/sys/storage/raft/remove-peer';
return this.ajax(url, 'POST', { data: { server_id } });
},
});