+ client: functional components for dashboard

This commit is contained in:
Ildar Kamalov 2019-08-27 16:43:58 +03:00
parent 75df5e8292
commit 6bce41bb0a
14 changed files with 310 additions and 370 deletions
client/src/api

View file

@ -22,7 +22,6 @@ export default class Api {
}
// Global methods
GLOBAL_RESTART = { path: 'restart', method: 'POST' };
GLOBAL_START = { path: 'start', method: 'POST' };
GLOBAL_STATUS = { path: 'status', method: 'GET' };
GLOBAL_STOP = { path: 'stop', method: 'POST' };
@ -36,11 +35,6 @@ export default class Api {
GLOBAL_DISABLE_PROTECTION = { path: 'disable_protection', method: 'POST' };
GLOBAL_UPDATE = { path: 'update', method: 'POST' };
restartGlobalFiltering() {
const { path, method } = this.GLOBAL_RESTART;
return this.makeRequest(path, method);
}
startGlobalFiltering() {
const { path, method } = this.GLOBAL_START;
return this.makeRequest(path, method);