duplicati/Duplicati/Server/webroot/ngax/scripts/directives/waitArea.js
2016-09-15 11:39:27 +02:00

18 lines
518 B
JavaScript

backupApp.directive('waitArea', function() {
return {
restrict: 'E',
scope: {
taskid: '=taskid',
text: '=text',
allowCancel: '=allowCancel'
},
templateUrl: 'templates/waitarea.html',
controller: function($scope, ServerStatus, AppService) {
$scope.ServerStatus = ServerStatus;
$scope.serverstate = ServerStatus.watch($scope);
$scope.cancelTask = function() {
AppService.post('/task/' + $scope.taskid + '/stop');
};
}
}
});