2017-11-20 09:57:08 +00:00
|
|
|
import axios from '../../lib/utils/axios_utils';
|
2017-10-24 04:56:39 +00:00
|
|
|
|
|
|
|
export default class ClusterService {
|
|
|
|
constructor(options = {}) {
|
|
|
|
this.options = options;
|
|
|
|
}
|
|
|
|
|
2019-09-18 14:02:45 +00:00
|
|
|
fetchClusterStatus() {
|
2017-10-24 04:56:39 +00:00
|
|
|
return axios.get(this.options.endpoint);
|
|
|
|
}
|
|
|
|
|
2019-09-13 13:26:31 +00:00
|
|
|
fetchClusterEnvironments() {
|
|
|
|
return axios.get(this.options.clusterEnvironmentsEndpoint);
|
|
|
|
}
|
|
|
|
|
2017-11-24 13:43:00 +00:00
|
|
|
static updateCluster(endpoint, data) {
|
|
|
|
return axios.put(endpoint, data);
|
|
|
|
}
|
2017-10-24 04:56:39 +00:00
|
|
|
}
|