Initial commit (code only without large binaries)
This commit is contained in:
6
EdgeAdmin/web/views/@default/dns/tasks/listPopup.css
Normal file
6
EdgeAdmin/web/views/@default/dns/tasks/listPopup.css
Normal file
@@ -0,0 +1,6 @@
|
||||
h3 span {
|
||||
margin-left: 0.5em;
|
||||
color: grey;
|
||||
font-size: 0.6em !important;
|
||||
}
|
||||
/*# sourceMappingURL=listPopup.css.map */
|
||||
1
EdgeAdmin/web/views/@default/dns/tasks/listPopup.css.map
Normal file
1
EdgeAdmin/web/views/@default/dns/tasks/listPopup.css.map
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["listPopup.less"],"names":[],"mappings":"AAAA,EAAG;EACF,kBAAA;EACA,WAAA;EACA,2BAAA","file":"listPopup.css"}
|
||||
43
EdgeAdmin/web/views/@default/dns/tasks/listPopup.html
Normal file
43
EdgeAdmin/web/views/@default/dns/tasks/listPopup.html
Normal file
@@ -0,0 +1,43 @@
|
||||
{$layout "layout_popup"}
|
||||
|
||||
<h3>正在同步的DNS任务<span v-if="tasks.length > 0">(共{{tasks.length}}个)</span></h3>
|
||||
<p class="comment" v-if="tasks.length == 0">暂时没有同步的任务。</p>
|
||||
<div v-if="tasks.length > 0">
|
||||
<button class="ui button tiny basic" @click.prevent="deleteAllTasks">清空所有任务</button>
|
||||
|
||||
<table class="ui table selectable celled">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="three wide">对象</th>
|
||||
<th>任务</th>
|
||||
<th>状态</th>
|
||||
<th>触发时间</th>
|
||||
<th class="one op"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="task in tasks">
|
||||
<td nowrap="">
|
||||
<span v-if="(task.type == 'clusterChange' || task.type == 'clusterNodesChange' || task.type == 'clusterRemoveDomain') && task.cluster != null">{{task.cluster.name}}
|
||||
<link-icon :href="'/dns/clusters/cluster?clusterId=' + task.cluster.id" target="_top"></link-icon>
|
||||
</span>
|
||||
<span v-if="task.type == 'nodeChange'">{{task.node.name}}</span>
|
||||
<span v-if="task.type == 'serverChange'">{{task.server.name}}</span>
|
||||
<span v-if="task.type == 'domainChange'">{{task.domain.name}}</span>
|
||||
</td>
|
||||
<td nowrap="">
|
||||
<span v-if="task.type == 'clusterChange' || task.type == 'clusterNodesChange' || task.type == 'clusterRemoveDomain'">集群</span>
|
||||
<span v-if="task.type == 'nodeChange'">节点</span>
|
||||
<span v-if="task.type == 'serverChange'">网站</span>
|
||||
<span v-if="task.type == 'domainChange'">域名</span>
|
||||
</td>
|
||||
<td style="word-break: break-word; width: 26em">
|
||||
<span v-if="task.isDone" class="red">{{task.error}}</span>
|
||||
<span v-else>正在同步...</span>
|
||||
</td>
|
||||
<td nowrap="">{{task.updatedTime}}</td>
|
||||
<td>
|
||||
<a href="" title="删除" class="remove-btn" @click.prevent="deleteTask(task.id)"><i class="icon remove small grey"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
40
EdgeAdmin/web/views/@default/dns/tasks/listPopup.js
Normal file
40
EdgeAdmin/web/views/@default/dns/tasks/listPopup.js
Normal file
@@ -0,0 +1,40 @@
|
||||
Tea.context(function () {
|
||||
this.$delay(function () {
|
||||
this.reload()
|
||||
})
|
||||
|
||||
this.reload = function () {
|
||||
this.$post("$")
|
||||
.success(function (resp) {
|
||||
this.tasks = resp.data.tasks
|
||||
})
|
||||
.done(function () {
|
||||
this.$delay(function () {
|
||||
this.reload()
|
||||
}, 3000)
|
||||
})
|
||||
}
|
||||
|
||||
this.deleteTask = function (taskId) {
|
||||
let that = this
|
||||
teaweb.confirm("确定要删除这个任务吗?", function () {
|
||||
that.$post(".delete")
|
||||
.params({
|
||||
taskId: taskId
|
||||
})
|
||||
.success(function () {
|
||||
teaweb.reload()
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
this.deleteAllTasks = function () {
|
||||
let that = this
|
||||
teaweb.confirm("确定要清空所有的任务吗?", function () {
|
||||
that.$post(".deleteAll")
|
||||
.success(function () {
|
||||
teaweb.reload()
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
5
EdgeAdmin/web/views/@default/dns/tasks/listPopup.less
Normal file
5
EdgeAdmin/web/views/@default/dns/tasks/listPopup.less
Normal file
@@ -0,0 +1,5 @@
|
||||
h3 span {
|
||||
margin-left: 0.5em;
|
||||
color: grey;
|
||||
font-size: 0.6em !important;
|
||||
}
|
||||
Reference in New Issue
Block a user