Commit f910e4ef authored by Francesc Guasch's avatar Francesc Guasch
Browse files

wip: lock buttons while changing hardware

parent 09e1c0eb
......@@ -635,7 +635,7 @@
}
var file = $scope.showmachine.hardware.disk[index].file;
if (typeof(file) != 'undefined' && file) {
console.log(file);
$scope.showmachine.requests++;
$http.post('/request/remove_hardware/'
,JSON.stringify({
'id_domain': $scope.showmachine.id
......@@ -650,6 +650,7 @@
}
}
$scope.showmachine.requests++;
if(typeof(item) == 'object') {
item.remove = false;
}
......@@ -899,6 +900,7 @@
};
$scope.request = function(request, args) {
$scope.showmachine.requests++;
$scope.pending_request = undefined;
$http.post('/request/'+request+'/'
,JSON.stringify(args)
......
......@@ -16,13 +16,13 @@
>
<button title="edit {{name}} {{$index+1}}"
ng-show="(name == 'network' ||name == 'disk') && !item.edit && !item.remove"
ng-disabled="pending_requests > 0"
ng-disabled="showmachine.requests > 0 || showmachine.is_active || showmachine.is_base"
ng-click="item.edit=!item.edit"
><i class="fa fa-sticky-note"></i>
</button>
<button title="remove {{name}} {{$index+1}}"
ng-hide="item.edit"
ng-disabled="pending_requests > 0 || item.is_secondary"
ng-disabled="showmachine.requests > 0 || item.is_secondary || showmachine.is_active || showmachine.is_base"
ng-click="confirm_remove='';remove_hardware(name,$index,item)"><i class="fa fa-times"></i>
</button>
<span ng-class='{"h5": item.edit }'>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment