Merge branch 'develop'

master
yixian 4 years ago
commit 8bd0a5ae58

@ -89,6 +89,16 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
$scope.editingTask.whitelist_clients.splice(idx, 1);
}
};
$scope.dropTask = function (task) {
let index = $scope.currentTasks.indexOf(task);
if (index >= 0) {
$scope.currentTasks.splice(index, 1);
}
}
$scope.clearTasks = function () {
$scope.currentTasks = [];
}
$scope.newTask = function () {
$uibModal.open({
@ -131,7 +141,7 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
}
tasks.push(submitTask)
}
$http.post('/sys/settle_tasks', tasks).then(function () {
$http.post('/sys/settle_tasks', tasks).then(function (resp) {
commonDialog.alert({type: 'success', title: 'Success', content: resp.data.message})
ctrl.update_task = $interval(function () {
$scope.checkProgressStatus()

@ -29,8 +29,15 @@
<div class="box box-info">
<div class="box-header">
Tasks Prepare
<button class="btn btn-success pull-right" ng-click="newTask()">New Task</button>
<button class="btn btn-warning pull-right" ng-click="submitTasks()">Execute Tasks</button>
<button class="btn btn-success pull-right" ng-disabled="progress.processing" ng-click="newTask()">New
Task
</button>
<button class="btn btn-warning pull-right" ng-disabled="progress.processing" ng-click="submitTasks()">
Execute Tasks
</button>
<button class="btn btn-warning pull-right" ng-disabled="progress.processing" ng-click="clearTasks()">
Clear Tasks
</button>
</div>
<div class="box-body">

Loading…
Cancel
Save