Files
EdgeAdmin/web/views/@default/clusters/logs/index.html

68 lines
2.7 KiB
HTML
Raw Normal View History

2021-05-19 19:03:03 +08:00
{$layout}
2021-06-05 16:53:26 +08:00
{$template "/datepicker"}
{$template "menu"}
2021-05-19 19:03:03 +08:00
<div class="margin"></div>
<form method="get" action="/clusters/logs" class="ui form" autocomplete="off">
<input type="hidden" name="type" :value="type"/>
2021-05-19 19:03:03 +08:00
<div class="ui fields inline">
<div class="ui field">
<input type="text" name="dayFrom" placeholder="开始日期" v-model="dayFrom" value="" style="width:8em" id="day-from-picker"/>
</div>
<div class="ui field">
<input type="text" name="dayTo" placeholder="结束日期" v-model="dayTo" value="" style="width:8em" id="day-to-picker"/>
</div>
<div class="ui field">
<select class="ui dropdown" name="level" v-model="level">
<option value="">[级别]</option>
<option value="error">错误</option>
<option value="warning">警告</option>
2021-05-19 19:03:03 +08:00
<option value="info">信息</option>
2021-06-06 13:40:47 +08:00
<option value="success">成功</option>
2021-05-19 19:03:03 +08:00
</select>
</div>
<div class="ui field">
<input type="text" name="keyword" style="width:10em" v-model="keyword" placeholder="关键词"/>
</div>
<div class="ui field">
<button type="submit" class="ui button">查询</button>
</div>
<div class="ui field" v-if="dayFrom.length > 0 || dayTo.length > 0 || keyword.length > 0 || level.length > 0">
<a :href="'/clusters/logs?type=' + type">[清除条件]</a>
2021-05-19 19:03:03 +08:00
</div>
</div>
</form>
2021-10-15 13:05:02 +08:00
<div v-if="type == 'unread'">
<div class="ui divider" style="margin-bottom: 0"></div>
<second-menu v-if="logs.length > 0">
<a href="" class="item" @click.prevent="updatePageRead()">[本页已读]</a>
<a href="" class="item" @click.prevent="updateAllRead()">[全部已读]</a>
2021-10-15 13:05:02 +08:00
</second-menu>
</div>
2021-05-19 19:03:03 +08:00
<p class="comment" v-if="logs.length == 0">暂时还没有日志。</p>
<table class="ui table selectable celled" v-if="logs.length > 0">
<thead>
<tr>
<th>集群</th>
<th>节点</th>
<th>信息</th>
<th class="one op">操作</th>
2021-05-19 19:03:03 +08:00
</tr>
</thead>
<tr v-for="log in logs">
<td nowrap=""><link-icon :href="'/clusters/cluster?clusterId=' + log.node.cluster.id">{{log.node.cluster.name}}</link-icon></td>
<td nowrap=""><link-icon :href="'/clusters/cluster/node?clusterId=' + log.node.cluster.id + '&nodeId=' + log.node.id">{{log.node.name}}</link-icon></td>
<td>
2021-06-05 16:53:26 +08:00
<node-log-row :v-log="log" :v-keyword="keyword"></node-log-row>
2021-05-19 19:03:03 +08:00
</td>
<td>
<a href="" @click.prevent="updateRead(log.id)" v-if="!log.isRead">已读</a>
</td>
2021-05-19 19:03:03 +08:00
</tr>
</table>
<div class="page" v-html="page"></div>