Finish details machine
This commit is contained in:
parent
5ef1c9b8b1
commit
e9108d4b97
4 changed files with 69 additions and 26 deletions
|
@ -9,8 +9,9 @@ mainApp.controller('machineDetailsCtrl', [ '$scope', 'Compute', '$rootScope', '$
|
|||
$scope.machine={};
|
||||
$("#waitingForToggleMachine").hide();
|
||||
|
||||
$scope.$on('showMachineDetailsEvent', function(eventName ,machine){
|
||||
$scope.$on('showMachineDetailsEvent', function(eventName ,machine, axioms){
|
||||
$scope.machine=machine;
|
||||
$scope.axioms=axioms;
|
||||
console.log(machine);
|
||||
$('#machineDetailsModal').modal({backdrop: false, keyboard: true});
|
||||
});
|
||||
|
|
|
@ -6,19 +6,19 @@
|
|||
mainApp.controller('homeCtrl', [ '$scope', 'Compute', '$rootScope', function ($scope, Compute, $rootScope)
|
||||
{
|
||||
|
||||
var callMeAfterGetMachines=function(data){
|
||||
var callMeAfterPullData=function(data){
|
||||
$scope.machines=Compute.getData().machines;
|
||||
}
|
||||
|
||||
|
||||
Compute.pullMachines(callMeAfterGetMachines);
|
||||
Compute.pullData(callMeAfterPullData);
|
||||
|
||||
|
||||
|
||||
$scope.raiseShowMachineDetailsEvent=function(id){
|
||||
var callback=function(){
|
||||
var data=Compute.getData();
|
||||
$rootScope.$broadcast("showMachineDetailsEvent", data.machines[id]);
|
||||
$rootScope.$broadcast("showMachineDetailsEvent", data.machines[id], data.axioms);
|
||||
|
||||
}
|
||||
Compute.pullMachines(callback);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue