mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-22 09:10:25 +08:00
自动更新缓存任务执行状况/优化缓存相关文字提示
This commit is contained in:
@@ -5,10 +5,10 @@
|
||||
<csrf-token></csrf-token>
|
||||
<table class="ui table definition selectable">
|
||||
<tr>
|
||||
<td>要预热的Key列表</td>
|
||||
<td>要预热的URL列表</td>
|
||||
<td>
|
||||
<textarea name="keys" rows="10" ref="focus"></textarea>
|
||||
<p class="comment">每行一个Key。</p>
|
||||
<p class="comment">每行一个URL。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -7,21 +7,21 @@
|
||||
<csrf-token></csrf-token>
|
||||
<table class="ui table definition selectable">
|
||||
<tr>
|
||||
<td class="title">缓存Key类型</td>
|
||||
<td class="title">URL类型</td>
|
||||
<td>
|
||||
<radio name="keyType" :v-value="'key'" v-model="keyType">根据Key</radio>
|
||||
<radio name="keyType" :v-value="'prefix'" v-model="keyType">根据前缀</radio>
|
||||
<radio name="keyType" :v-value="'key'" v-model="keyType">URL</radio>
|
||||
<radio name="keyType" :v-value="'prefix'" v-model="keyType">目录</radio>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span v-if="keyType == 'key'">要刷新的Key列表</span>
|
||||
<span v-if="keyType == 'prefix'">要刷新的Key前缀列表</span>
|
||||
<span v-if="keyType == 'key'">要刷新的URL列表</span>
|
||||
<span v-if="keyType == 'prefix'">要刷新的URL目录列表</span>
|
||||
</td>
|
||||
<td>
|
||||
<textarea name="keys" rows="10" ref="keysBox"></textarea>
|
||||
<p class="comment" v-if="keyType == 'key'">每行一个Key,比如是一个完整的URL<code-label>https://example.com/hello/world.html</code-label>。</p>
|
||||
<p class="comment" v-if="keyType == 'prefix'">每行一个Key前缀,比如是一个URL前缀<code-label>https://example.com/hello/</code-label>。</p>
|
||||
<p class="comment" v-if="keyType == 'key'">每行一个URL,比如<code-label>https://example.com/hello/world.html</code-label>。</p>
|
||||
<p class="comment" v-if="keyType == 'prefix'">每行一个URL目录,比如<code-label>https://example.com/hello/</code-label>。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -20,10 +20,10 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Key类型</td>
|
||||
<td>缓存URL类型</td>
|
||||
<td>
|
||||
<span v-if="task.keyType == 'key'">URL</span>
|
||||
<span v-if="task.keyType == 'prefix'">前缀</span>
|
||||
<span v-if="task.keyType == 'prefix'">目录</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
Tea.context(function () {
|
||||
this.$delay(function () {
|
||||
this.reload()
|
||||
})
|
||||
|
||||
this.deleteTask = function (taskId) {
|
||||
teaweb.confirm("确定要删除此任务吗?", function () {
|
||||
this.$post(".deleteTask")
|
||||
@@ -20,4 +24,19 @@ Tea.context(function () {
|
||||
.refresh()
|
||||
})
|
||||
}
|
||||
|
||||
this.reload = function () {
|
||||
this.$post("$")
|
||||
.params({
|
||||
taskId: this.task.id
|
||||
})
|
||||
.success(function (resp) {
|
||||
this.task = resp.data.task
|
||||
})
|
||||
.done(function () {
|
||||
this.$delay(function () {
|
||||
this.reload()
|
||||
}, 10000)
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -8,7 +8,7 @@
|
||||
<tr>
|
||||
<th style="width: 7em">任务编号</th>
|
||||
<th>任务类型</th>
|
||||
<th>Key类型</th>
|
||||
<th>URL类型</th>
|
||||
<th>创建时间</th>
|
||||
<th class="four wide">所属用户</th>
|
||||
<th class="two wide">任务状态</th>
|
||||
|
||||
Reference in New Issue
Block a user