2022-06-21 17:19:12 +05:30
|
|
|
import axios from '~/lib/utils/axios_utils';
|
2018-03-17 18:26:18 +05:30
|
|
|
|
|
|
|
export default class ClusterService {
|
|
|
|
constructor(options = {}) {
|
|
|
|
this.options = options;
|
|
|
|
}
|
|
|
|
|
2019-12-04 20:38:33 +05:30
|
|
|
fetchClusterStatus() {
|
2018-03-17 18:26:18 +05:30
|
|
|
return axios.get(this.options.endpoint);
|
|
|
|
}
|
|
|
|
|
2019-12-04 20:38:33 +05:30
|
|
|
fetchClusterEnvironments() {
|
|
|
|
return axios.get(this.options.clusterEnvironmentsEndpoint);
|
|
|
|
}
|
|
|
|
|
2018-03-17 18:26:18 +05:30
|
|
|
static updateCluster(endpoint, data) {
|
|
|
|
return axios.put(endpoint, data);
|
|
|
|
}
|
|
|
|
}
|