2017-11-30 17:23:13 +01:00
|
|
|
import { parseFetch } from '../utils.js';
|
2015-07-15 15:06:18 +02:00
|
|
|
|
2016-04-21 15:44:20 +02:00
|
|
|
export default class Info {
|
2016-04-21 15:52:23 +02:00
|
|
|
constructor(api) {
|
|
|
|
this.api = api;
|
|
|
|
}
|
|
|
|
get() {
|
2017-11-30 17:23:13 +01:00
|
|
|
return fetch(`${this.api}info`, { method: 'GET' }).then(parseFetch);
|
2016-04-21 15:52:23 +02:00
|
|
|
}
|
|
|
|
status() {
|
2017-11-30 17:23:13 +01:00
|
|
|
return fetch(`${this.api}info/status`, { method: 'GET' }).then(parseFetch);
|
2016-04-21 15:52:23 +02:00
|
|
|
}
|
|
|
|
downloadLogFiles() {
|
2017-11-30 17:23:13 +01:00
|
|
|
window.location = `${this.api}info/logfiles`;
|
2016-04-21 15:52:23 +02:00
|
|
|
}
|
|
|
|
acces() {
|
2017-11-30 17:23:13 +01:00
|
|
|
return fetch(`${this.api}info/access`, { method: 'GET' }).then(parseFetch);
|
2016-04-21 15:52:23 +02:00
|
|
|
}
|
2015-10-12 12:33:33 +02:00
|
|
|
}
|