blob: ee564b2a48c8d4cc0e1b10869975c36a611ddf51 (
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
25
26
27
|
/**
* 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...
}
$scope.raiseShowMachineDetailsEvent=function(){
var callback=function(){
var data=Compute.getData();
$rootScope.$broadcast("showMachineDetailsEvent", data.machines[Object.keys(data.machines)[0]]);
}
Compute.pullMachines(callback);
}
}]);
|