优化界面

This commit is contained in:
GoEdgeLab
2021-06-14 19:53:53 +08:00
parent 8d85fe6b9b
commit 8e78fed3e6
5 changed files with 38 additions and 12 deletions

View File

@@ -7,6 +7,6 @@ Vue.component("node-log-row", {
}
},
template: `<div>
<pre class="log-box" style="margin: 0; padding: 0"><span :class="{red:log.level == 'error', orange:log.level == 'warning', green: log.level == 'success'}"><span v-if="!log.isToday">[{{log.createdTime}}]</span><strong v-if="log.isToday">[{{log.createdTime}}]</strong><keyword :v-word="keyword">[{{log.tag}}]{{log.description}}</keyword></span> &nbsp; <span v-if="log.count > 0" class="ui label tiny" :class="{red:log.level == 'error', orange:log.level == 'warning'}">共{{log.count}}条</span></pre>
<pre class="log-box" style="margin: 0; padding: 0"><span :class="{red:log.level == 'error', orange:log.level == 'warning', green: log.level == 'success'}"><span v-if="!log.isToday">[{{log.createdTime}}]</span><strong v-if="log.isToday">[{{log.createdTime}}]</strong><keyword :v-word="keyword">[{{log.tag}}]{{log.description}}</keyword></span> &nbsp; <span v-if="log.count > 1" class="ui label tiny" :class="{red:log.level == 'error', orange:log.level == 'warning'}">共{{log.count}}条</span></pre>
</div>`
})

View File

@@ -4,7 +4,7 @@
<!-- 未安装 -->
<div v-if="!node.isInstalled">
<h3>方法1通过SSH自动安装</h3>
<h4>方法1通过SSH自动安装</h4>
<div v-if="installStatus != null && (installStatus.isRunning || installStatus.isFinished)"
class="ui segment installing-box">
@@ -21,7 +21,7 @@
<button class="ui button small" type="button" @click.prevent="install()">开始安装</button>
</div>
<h3>方法2手动安装</h3>
<h4>方法2手动安装</h4>
<table class="ui table definition selectable">
<tr>
<td>配置文件<em>configs/api.yaml</em><br/>
@@ -49,7 +49,7 @@ secret: "{{node.secret}}"</source-code-box>
<!-- 已安装 -->
<div v-if="node.isInstalled">
<h3>配置文件</h3>
<h4>配置文件</h4>
<table class="ui table definition selectable">
<tr>
<td class="title">配置文件<em>configs/api.yaml</em><br/>

View File

@@ -28,7 +28,11 @@
</form>
<div v-if="countAll == 0">
<not-found-box message="当前集群下还没有节点,至少添加一个节点后才能提供服务。"></not-found-box>
<not-found-box message="当前集群下还没有节点,至少添加一个节点后才能提供服务。">
<div style="margin-top: 0.5em">
<a :href="'/ns/clusters/cluster/createNode?clusterId=' + clusterId">[创建节点]</a>
</div>
</not-found-box>
</div>
<div v-if="countAll > 0">
<p class="comment" v-if="nodes.length == 0">暂时还没有节点。</p>
@@ -48,7 +52,7 @@
</tr>
</thead>
<tr v-for="node in nodes">
<td>{{node.name}}</td>
<td><keyword :v-word="keyword">{{node.name}}</keyword></td>
<td>
<span v-if="node.ipAddresses.length == 0" class="disabled">-</span>
<div v-else class="address-box">
@@ -80,8 +84,7 @@
</div>
<div v-else-if="node.isInstalled">
<div v-if="node.status.isActive">
<span v-if="!node.isSynced" class="red">同步</span>
<span v-else class="green">运行中</span>
<span class="green">运行</span>
</div>
<span v-else-if="node.status.updatedAt > 0" class="red">已断开</span>
<span v-else-if="node.status.updatedAt == 0" class="red">未连接</span>

View File

@@ -6,11 +6,34 @@
<div v-if="node.isInstalled">
<div class="ui message green">当前节点为已安装状态。</div>
<a href="" @click.prevent="updateNodeIsInstalled(false)">[修改为未安装状态]</a>
<h4>配置文件</h4>
<table class="ui table definition selectable">
<tr>
<td>配置文件<em>configs/api.yaml</em><br/>
<em><download-link :v-element="'rpc-code'" :v-file="'api.yaml'">[下载]</download-link ></em></td>
<td>
<source-code-box id="rpc-code" type="text/yaml">rpc:
endpoints: [ {{apiEndpoints}} ]
nodeId: "{{node.uniqueId}}"
secret: "{{node.secret}}"</source-code-box>
</td>
</tr>
<tr>
<td class="title">安装目录</td>
<td>
<div v-if="node.installDir.length == 0">使用集群设置<span
v-if="node.cluster != null && node.cluster.installDir.length > 0">{{node.cluster.installDir}}</span>
</div>
<span v-else>{{node.installDir}}</span>
</td>
</tr>
</table>
</div>
<!-- 未安装 -->
<div v-if="!node.isInstalled">
<h3>方法1通过SSH自动安装</h3>
<h4>方法1通过SSH自动安装</h4>
<div v-if="installStatus != null && (installStatus.isRunning || installStatus.isFinished)"
class="ui segment installing-box">
@@ -27,7 +50,7 @@
<button class="ui button small" type="button" @click.prevent="install()">开始安装</button>
</div>
<h3>方法2手动安装</h3>
<h4>方法2手动安装</h4>
<table class="ui table definition selectable">
<tr>
<td>配置文件<em>configs/api.yaml</em><br/>

View File

@@ -47,7 +47,7 @@
<!-- 证书 -->
<tbody v-if="tlsProtocolName.length > 0">
<tr>
<td>{{tlsProtocolName}}证书</td>
<td>{{tlsProtocolName.toUpperCase()}}证书</td>
<td>
<ssl-certs-box></ssl-certs-box>
</td>