summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/monitoring/services/monitoring_service.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/monitoring/services/monitoring_service.js')
-rw-r--r--app/assets/javascripts/monitoring/services/monitoring_service.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/app/assets/javascripts/monitoring/services/monitoring_service.js b/app/assets/javascripts/monitoring/services/monitoring_service.js
new file mode 100644
index 00000000000..1e9ae934853
--- /dev/null
+++ b/app/assets/javascripts/monitoring/services/monitoring_service.js
@@ -0,0 +1,19 @@
+import Vue from 'vue';
+import VueResource from 'vue-resource';
+
+Vue.use(VueResource);
+
+export default class MonitoringService {
+ constructor(endpoint) {
+ this.graphs = Vue.resource(endpoint);
+ }
+
+ get() {
+ return this.graphs.get();
+ }
+
+ // eslint-disable-next-line class-methods-use-this
+ getDeploymentData(endpoint) {
+ return Vue.http.get(endpoint);
+ }
+}