在服务列表中显示需要修复的错误

This commit is contained in:
刘祥超
2021-05-23 20:44:51 +08:00
parent 88e7246366
commit 0053949bc0
8 changed files with 117 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
.ui.message .icon {
position: absolute;
right: 1em;
top: 1.8em;
}
/*# sourceMappingURL=index.css.map */

View File

@@ -0,0 +1 @@
{"version":3,"sources":["index.less"],"names":[],"mappings":"AAAA,GAAG,QACF;EACC,kBAAA;EACA,UAAA;EACA,UAAA","file":"index.css"}

View File

@@ -1,6 +1,23 @@
{$layout}
{$template "menu"}
<!-- 错误日志 -->
<div v-if="errorLogs.length > 0">
<div class="margin"></div>
<div class="ui menu tabular attached">
<span class="ui item active"><span class="red">需要修复的错误</span></span>
</div>
<div class="ui segment attached">
<div class="ui message error" v-for="log in errorLogs">
[{{log.createdTime}}]
<a :href="'/servers/server/settings?serverId=' + log.serverId"><span v-if="log.serverName.length > 0">[{{log.serverName}}]</span><span v-else>[服务]</span></a>
{{log.description}}
<a href="" title="关闭" @click.prevent="fixLog(log.id)"><i class="ui icon remove small"></i></a>
</div>
</div>
</div>
<!-- 搜索表单 -->
<form method="get" class="ui form" action="/servers">
<input type="hidden" name="auditingFlag" :value="auditingFlag"/>
<div class="ui margin"></div>

View File

@@ -46,4 +46,20 @@ Tea.context(function () {
this.showLatest = function () {
this.latestVisible = !this.latestVisible
}
/**
* 错误日志相关
*/
this.fixLog = function (logId) {
let that = this
teaweb.confirm("确定要关闭此错误提示吗?", function () {
that.$post(".fixLog")
.params({
logId: logId
})
.success(function () {
teaweb.reload()
})
})
}
})

View File

@@ -0,0 +1,7 @@
.ui.message {
.icon {
position: absolute;
right: 1em;
top: 1.8em;
}
}