debian-mirror-gitlab/app/assets/javascripts/clusters/services/clusters_service.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
407 B
JavaScript
Raw Normal View History

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);
}
}