debian-mirror-gitlab/app/assets/javascripts/clusters/services/clusters_service.js
2022-06-21 17:19:12 +05:30

19 lines
407 B
JavaScript

import axios from '~/lib/utils/axios_utils';
export default class ClusterService {
constructor(options = {}) {
this.options = options;
}
fetchClusterStatus() {
return axios.get(this.options.endpoint);
}
fetchClusterEnvironments() {
return axios.get(this.options.clusterEnvironmentsEndpoint);
}
static updateCluster(endpoint, data) {
return axios.put(endpoint, data);
}
}