管理端全部功能跑通
This commit is contained in:
@@ -1,30 +1,28 @@
|
||||
{$layout}
|
||||
{$template "menu"}
|
||||
{$layout}
|
||||
|
||||
<div class="margin"></div>
|
||||
{$template "/datepicker"}
|
||||
|
||||
<style>
|
||||
.httpdns-runtime-level {
|
||||
font-weight: 600;
|
||||
}
|
||||
.httpdns-runtime-level {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.httpdns-runtime-message {
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.httpdns-runtime-time {
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
|
||||
.httpdns-runtime-tag {
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
</style>
|
||||
|
||||
<form method="get" action="/httpdns/runtimeLogs" class="ui form small" autocomplete="off">
|
||||
<div class="ui fields inline">
|
||||
<div class="ui field">
|
||||
<select class="ui dropdown" name="clusterId" v-model="clusterId">
|
||||
<option value="">[集群]</option>
|
||||
<option v-for="cluster in clusters" :value="cluster.id">{{cluster.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="ui field">
|
||||
<select class="ui dropdown" name="nodeId" v-model="nodeId">
|
||||
<option value="">[节点]</option>
|
||||
<option v-for="node in nodes" :value="node.id" v-if="clusterId == '' || clusterId == node.clusterId">
|
||||
{{node.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="ui field">
|
||||
<input type="text" name="dayFrom" placeholder="开始日期" v-model="dayFrom" style="width:7.8em"
|
||||
id="day-from-picker" />
|
||||
@@ -35,10 +33,10 @@
|
||||
<div class="ui field">
|
||||
<select class="ui dropdown" name="level" v-model="level">
|
||||
<option value="">[级别]</option>
|
||||
<option value="error">error</option>
|
||||
<option value="warning">warning</option>
|
||||
<option value="info">info</option>
|
||||
<option value="success">success</option>
|
||||
<option value="error">错误</option>
|
||||
<option value="warning">警告</option>
|
||||
<option value="info">信息</option>
|
||||
<option value="success">成功</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="ui field">
|
||||
@@ -47,8 +45,7 @@
|
||||
<div class="ui field">
|
||||
<button type="submit" class="ui button small">查询</button>
|
||||
</div>
|
||||
<div class="ui field"
|
||||
v-if="clusterId.toString().length > 0 || nodeId.toString().length > 0 || dayFrom.length > 0 || dayTo.length > 0 || keyword.length > 0 || level.length > 0">
|
||||
<div class="ui field" v-if="dayFrom.length > 0 || dayTo.length > 0 || keyword.length > 0 || level.length > 0">
|
||||
<a href="/httpdns/runtimeLogs">[清除条件]</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -58,31 +55,44 @@
|
||||
|
||||
<not-found-box v-if="runtimeLogs.length == 0">暂时还没有运行日志。</not-found-box>
|
||||
|
||||
<table class="ui table selectable celled" v-if="runtimeLogs.length > 0">
|
||||
<table class="ui table celled" v-if="runtimeLogs.length > 0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>时间</th>
|
||||
<th>集群</th>
|
||||
<th>节点</th>
|
||||
<th>级别</th>
|
||||
<th>类型</th>
|
||||
<th>详情</th>
|
||||
<th>次数</th>
|
||||
<th>信息</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="log in runtimeLogs">
|
||||
<td>{{log.createdTime}}</td>
|
||||
<td>{{log.clusterName}}</td>
|
||||
<td>{{log.nodeName}}</td>
|
||||
<td>
|
||||
<span
|
||||
class="httpdns-runtime-level"
|
||||
:class="{red:log.level == 'error', orange:log.level == 'warning', green:log.level == 'success'}">{{log.level}}</span>
|
||||
<td nowrap="">
|
||||
<span v-if="log.clusterName">{{log.clusterName}}
|
||||
<a :href="'/httpdns/clusters/cluster?clusterId=' + log.clusterId" target="_blank"
|
||||
v-if="log.clusterId > 0"><i class="icon external small"></i></a>
|
||||
</span>
|
||||
<span v-else class="disabled">-</span>
|
||||
</td>
|
||||
<td nowrap="">
|
||||
<span v-if="log.nodeName">{{log.nodeName}}
|
||||
<a :href="'/httpdns/clusters/cluster/node?clusterId=' + log.clusterId + '&nodeId=' + log.nodeId"
|
||||
target="_blank" v-if="log.nodeId > 0"><i class="icon external small"></i></a>
|
||||
</span>
|
||||
<span v-else class="disabled">-</span>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<span
|
||||
:class="{red:log.level == 'error', orange:log.level == 'warning', green:log.level == 'success' || log.level == 'info'}"
|
||||
class="httpdns-runtime-message">
|
||||
<span class="httpdns-runtime-time">[{{log.createdTime}}]</span>
|
||||
<span class="httpdns-runtime-tag" v-if="log.tag && log.tag.length > 0">[{{log.tag}}]</span>
|
||||
<span class="httpdns-runtime-level">{{log.description}}</span>
|
||||
</span>
|
||||
<span v-if="log.count > 1" class="ui label tiny basic"
|
||||
:class="{red:log.level == 'error', orange:log.level == 'warning', green:log.level == 'success' || log.level == 'info'}"
|
||||
style="margin-left: 0.5em">共{{log.count}}条</span>
|
||||
</div>
|
||||
</td>
|
||||
<td><code>{{log.tag}}</code></td>
|
||||
<td>{{log.description}}</td>
|
||||
<td>{{log.count}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
Reference in New Issue
Block a user