优化界面

This commit is contained in:
GoEdgeLab
2021-06-10 19:19:43 +08:00
parent 16d0e7ad1a
commit f129215092
2 changed files with 37 additions and 8 deletions

View File

@@ -41,7 +41,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="'/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>

View File

@@ -2,12 +2,6 @@
{$template "node_menu"}
{$template "/code_editor"}
<!-- 已安装 -->
<div v-if="node.isInstalled">
<div class="ui message green">当前节点为已安装状态。</div>
<a href="" @click.prevent="updateNodeIsInstalled(false)">[修改为未安装状态]</a>
</div>
<!-- 未安装 -->
<div v-if="!node.isInstalled">
<h3>方法1通过SSH自动安装</h3>
@@ -34,7 +28,7 @@
<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}} ]
endpoints: [ {{apiEndpoints}} ]
nodeId: "{{node.uniqueId}}"
secret: "{{node.secret}}"</source-code-box>
</td>
@@ -51,4 +45,35 @@ secret: "{{node.secret}}"</source-code-box>
</table>
<a href="" @click.prevent="updateNodeIsInstalled(true)">[修改为已安装状态]</a>
</div>
<!-- 已安装 -->
<div v-if="node.isInstalled">
<h3>配置文件</h3>
<table class="ui table definition selectable">
<tr>
<td class="title">配置文件<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 class="ui message success">当前节点为已安装状态。</div>
<a href="" @click.prevent="updateNodeIsInstalled(false)">[修改为未安装状态]</a>
</div>
</div>