summaryrefslogtreecommitdiff
path: root/client/js/controllers/home/main.js
blob: 4e3bcda2c50119ac2bcdd80933fdb115bb25a7e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/**
 * The home controller
 * 
 * @param {$scope} $scope The $scope service from angular
 */
mainApp.controller('homeCtrl', [ '$scope', 'Compute', '$rootScope', function ($scope, Compute, $rootScope)
{

	var updatePage=function(){
		// TODO Update graph etc...
	}

	// Retrieve all Data
	Compute.pullData(updatePage);

	Compute.getMachines(function(adzda){});
	
	$scope.raiseShowMachineDetailsEvent=function(){
		var machine={name: "Machine 1", online:true};
		$rootScope.$broadcast("showMachineDetailsEvent", machine);		
	}


}]);