Clean some things
This commit is contained in:
parent
fa5a48bc3a
commit
e2be86814e
4 changed files with 21 additions and 18 deletions
|
@ -6,23 +6,25 @@
|
|||
mainApp.controller('machineDetailsCtrl', [ '$scope', 'Compute', '$rootScope', '$timeout', function ($scope, Compute, $rootScope, $timeout)
|
||||
{
|
||||
|
||||
// Init scope
|
||||
$scope.machine={};
|
||||
$("#waitingForToggleMachine").hide();
|
||||
$scope.machineIsStarting=false; // For loading icon
|
||||
|
||||
|
||||
$scope.$on('showMachineDetailsEvent', function(eventName ,machine, axioms){
|
||||
$scope.machine=machine;
|
||||
$scope.axioms=axioms;
|
||||
console.log(machine);
|
||||
$('#machineDetailsModal').modal({backdrop: false, keyboard: true});
|
||||
});
|
||||
|
||||
|
||||
$scope.toggleMachineState=function(){
|
||||
$("#waitingForToggleMachine").show();
|
||||
// Display gif
|
||||
$scope.machineIsStarting=true;
|
||||
|
||||
// Fake timeout
|
||||
$timeout(function(){
|
||||
$("#waitingForToggleMachine").hide();
|
||||
$scope.machineIsStarting=false;
|
||||
}, 3000);
|
||||
$timeout(function(){
|
||||
$scope.machine.online=!$scope.machine.online;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue