istic-openstack/client/js/controllers/home/main.js

25 lines
532 B
JavaScript
Raw Normal View History

2016-02-06 12:10:04 +01:00
/**
* The home controller
*
* @param {$scope} $scope The $scope service from angular
2016-01-24 19:19:32 +01:00
*/
2016-02-28 16:07:52 +01:00
mainApp.controller('homeCtrl', [ '$scope', 'Compute', '$rootScope', function ($scope, Compute, $rootScope)
2016-01-24 19:19:32 +01:00
{
var updatePage=function(){
// TODO Update graph etc...
}
// Retrieve all Data
Compute.pullData(updatePage);
2016-02-28 16:07:52 +01:00
2016-02-28 20:30:57 +01:00
Compute.getMachines(function(adzda){});
2016-02-28 16:07:52 +01:00
$scope.raiseShowMachineDetailsEvent=function(){
2016-02-28 17:29:34 +01:00
var machine={name: "Machine 1", online:true};
2016-02-28 16:07:52 +01:00
$rootScope.$broadcast("showMachineDetailsEvent", machine);
}
2016-02-28 17:54:15 +01:00
2016-02-18 18:06:06 +01:00
}]);