realtime polling
diff --git a/xos-apps/auto-scale/gui/src/js/autoscaling.service.js b/xos-apps/auto-scale/gui/src/js/autoscaling.service.js
index 15b9118..5af613d 100644
--- a/xos-apps/auto-scale/gui/src/js/autoscaling.service.js
+++ b/xos-apps/auto-scale/gui/src/js/autoscaling.service.js
@@ -32,12 +32,15 @@
};
this.getAutoscalingData = () => {
- // pollinginterval = $interval(() => {
- // $http.get('/autoscaledata')
- $http.get('../mocks/mock.json')
+ $http.get('/autoscaledata')
+ .success((res) => {
+ $rootScope.$emit('autoscaling.update', this.formatData(res));
+ });
+ pollinginterval = $interval(() => {
+ $http.get('/autoscaledata')
.success((res) => {
$rootScope.$emit('autoscaling.update', this.formatData(res));
});
- // }, pollingFrequency * 1000)
+ }, pollingFrequency * 1000)
};
});
\ No newline at end of file