mirror of
https://github.com/duplicati/duplicati.git
synced 2025-11-28 11:30:24 +08:00
18 lines
518 B
JavaScript
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');
|
|
};
|
|
}
|
|
}
|
|
});
|