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 4146f19..15b9118 100644
--- a/xos-apps/auto-scale/gui/src/js/autoscaling.service.js
+++ b/xos-apps/auto-scale/gui/src/js/autoscaling.service.js
@@ -1,17 +1,43 @@
 'use strict';
 
 angular.module('autoscaling')
-.service('Autoscaling', function($http, $interval, $rootScope){
+.service('Autoscaling', function($http, $interval, $rootScope, lodash){
 
-  const pollingFrequency = 1;
+  const pollingFrequency = 10;
   var pollinginterval;
 
+  /**
+  * Convert data to a flat array of resources
+  */
+
+  this.formatData = (data) => {
+    const list = [];
+    // cicle trough all slices
+    lodash.map(data, (item) => {
+      // cicle trough every resource
+      item.resources = lodash.forEach(
+        Object.keys(item.resources),
+        (resource) => {
+          const tmp = item.resources[resource];
+          tmp.service = item.service;
+          tmp.slice = item.slice;
+          tmp.project_id = item.project_id;
+          tmp.instance_name = tmp.xos_instance_info.instance_name;
+          delete tmp.xos_instance_info;
+          list.push(tmp);
+        }
+      )
+    });
+    return list;
+  };
+
   this.getAutoscalingData = () => {
-    pollinginterval = $interval(() => {
-      $http.get('/autoscaledata')
-      .then((res) => {
-        $rootScope.$emit('autoscaling.update', res.data);
+    // pollinginterval = $interval(() => {
+      // $http.get('/autoscaledata')
+      $http.get('../mocks/mock.json')
+      .success((res) => {
+        $rootScope.$emit('autoscaling.update', this.formatData(res));
       });
-    }, pollingFrequency * 1000)
+    // }, pollingFrequency * 1000)
   };
 });
\ No newline at end of file
diff --git a/xos-apps/auto-scale/gui/src/js/autoscaling_details.directive.js b/xos-apps/auto-scale/gui/src/js/autoscaling_details.directive.js
index e4bd9ef..f35508a 100644
--- a/xos-apps/auto-scale/gui/src/js/autoscaling_details.directive.js
+++ b/xos-apps/auto-scale/gui/src/js/autoscaling_details.directive.js
@@ -1,15 +1,40 @@
 angular.module('autoscaling')
-.directive('serviceContainer', function(lodash){
+.directive('serviceContainer', function(lodash, Autoscaling){
   return {
     restrict: 'E',
     scope: {},
     bindToController: true,
     controllerAs: 'vm',
     templateUrl: 'templates/service-container.tpl.html',
-    controller: ($rootScope) => {
+    controller: function($rootScope) {
+      Autoscaling.getAutoscalingData();
       $rootScope.$on('autoscaling.update', (evt, data) => {
-        console.log(data);
+        this.printData(data);
       });
+
+      /**
+      * Group resources by service and slice
+      */
+     
+      this.printData = (data) => {
+        this.services = lodash.groupBy(data, 'service');
+        lodash.forEach(Object.keys(this.services), (service) => {
+          this.services[service] = lodash.groupBy(this.services[service], 'slice');
+          lodash.forEach(Object.keys(this.services[service]), (slice) => {
+            // grouping instance by name
+            this.services[service][slice] = lodash.groupBy(this.services[service][slice], 'instance_name');
+            // instance can't have the same name,
+            // so take them out of an array
+            // and keep only the sample data
+            lodash.forEach(Object.keys(this.services[service][slice]), (instance) => {
+              // console.log(this.services[service][slice][instance]);
+              this.services[service][slice][instance] = this.services[service][slice][instance][0].queue;
+            });
+            
+          })
+        });
+        console.log(this.services);
+      };
     }
   };
 });
diff --git a/xos-apps/auto-scale/gui/src/js/main.js b/xos-apps/auto-scale/gui/src/js/main.js
index 665aafe..468f355 100644
--- a/xos-apps/auto-scale/gui/src/js/main.js
+++ b/xos-apps/auto-scale/gui/src/js/main.js
@@ -6,10 +6,6 @@
   'ngAnimate',
   'chart.js'
 ])
-.run((Autoscaling) => {
-  // start polling data
-  Autoscaling.getAutoscalingData();
-})
 .config(($stateProvider, $urlRouterProvider) => {
   $stateProvider
   .state('ceilometerDashboard', {
