blob: 4146f19a374af722be4987fd6079bc5dd018ea74 [file] [log] [blame]
'use strict';
angular.module('autoscaling')
.service('Autoscaling', function($http, $interval, $rootScope){
const pollingFrequency = 1;
var pollinginterval;
this.getAutoscalingData = () => {
pollinginterval = $interval(() => {
$http.get('/autoscaledata')
.then((res) => {
$rootScope.$emit('autoscaling.update', res.data);
});
}, pollingFrequency * 1000)
};
});