mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-10 00:00:26 +08:00
增加清空节点同步任务、清空DNS同步任务功能
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
{$layout "layout_popup"}
|
||||
|
||||
<h3>正在同步的节点任务<span v-if="countTasks > 0">(共{{countTasks}}个)</span>
|
||||
<a href="" v-if="countCheckedTasks() > 0" @click.prevent="deleteBatch">批量删除{{countCheckedTasks()}}个任务</a>
|
||||
</h3>
|
||||
<p class="comment" v-if="clusters.length == 0">暂时没有同步的集群。</p>
|
||||
<h3>正在同步的节点任务<span v-if="countTasks > 0">(共{{countTasks}}个)</span></h3>
|
||||
<p class="comment" v-if="clusters.length == 0">暂时没有同步的任务。</p>
|
||||
<div v-if="clusters.length > 0">
|
||||
<button class="ui button basic tiny" @click.prevent="deleteAllTasks">清空所有任务</button>
|
||||
<button class="ui button basic tiny" v-if="countCheckedTasks() > 0" @click.prevent="deleteBatch">批量删除{{countCheckedTasks()}}个任务</button>
|
||||
|
||||
<table class="ui table selectable celled">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
@@ -65,7 +65,7 @@ Tea.context(function () {
|
||||
}
|
||||
|
||||
this.deleteBatch = function () {
|
||||
var taskIds = []
|
||||
let taskIds = []
|
||||
this.clusters.forEach(function (cluster) {
|
||||
cluster.tasks.forEach(function (task) {
|
||||
if (task.isChecked) {
|
||||
@@ -85,4 +85,14 @@ Tea.context(function () {
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
this.deleteAllTasks = function () {
|
||||
let that = this
|
||||
teaweb.confirm("确定要清空所有的任务吗?", function () {
|
||||
that.$post(".deleteAll")
|
||||
.success(function () {
|
||||
teaweb.reload()
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user