实现节点运行日志上传

This commit is contained in:
GoEdgeLab
2020-10-09 11:07:01 +08:00
parent 1b47a0173c
commit b64089335e
9 changed files with 98 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
<second-menu>
<menu-item :href="'/clusters/cluster/node?clusterId=' + clusterId + '&nodeId=' + nodeId" code="node">节点详情</menu-item>
<menu-item :href="'/clusters/cluster/node/logs?clusterId=' + clusterId + '&nodeId=' + nodeId" code="log">节点日志</menu-item>
<menu-item :href="'/clusters/cluster/node/update?clusterId=' + clusterId + '&nodeId=' + nodeId" code="update">修改节点</menu-item>
<menu-item :href="'/clusters/cluster/node/install?clusterId=' + clusterId + '&nodeId=' + nodeId" code="install">安装节点</menu-item>
</second-menu>

View File

@@ -0,0 +1,26 @@
{$layout}
{$template "/left_menu"}
<div class="right-box">
{$template "node_menu"}
<p class="comment" v-if="logs.length == 0">暂时还没有日志。</p>
<table class="ui table selectable" v-if="logs.length > 0">
<thead>
<tr>
</tr>
</thead>
<tr v-for="log in logs">
<td>
<span :class="{red:log.level == 'error', yellow:log.level == 'warning'}">
<span v-if="!log.isToday">[{{log.createdTime}}]</span>
<strong v-if="log.isToday">[{{log.createdTime}}]</strong>
[{{log.tag}}]{{log.description}}</span>
</td>
</tr>
</table>
<div class="page" v-html="page"></div>
</div>

View File

@@ -0,0 +1,4 @@
table a span {
text-decoration: underline;
}
/*# sourceMappingURL=index.css.map */

View File

@@ -0,0 +1 @@
{"version":3,"sources":["index.less"],"names":[],"mappings":"AAAA,KAAM,EAAE;EACP,0BAAA","file":"index.css"}

View File

@@ -16,7 +16,7 @@
<tr v-for="cluster in clusters">
<td>{{cluster.name}}</td>
<td>
<a :href="'/clusters/cluster?clusterId=' + cluster.id" v-if="cluster.countAllNodes > 0">{{cluster.countAllNodes}}</a>
<a :href="'/clusters/cluster?clusterId=' + cluster.id" v-if="cluster.countAllNodes > 0"><span :class="{red:cluster.countAllNodes > cluster.countActiveNodes}">{{cluster.countAllNodes}}</span></a>
<span class="disabled" v-else="">-</span>
</td>
<td>

View File

@@ -0,0 +1,3 @@
table a span {
text-decoration: underline;
}