2020-09-06 16:19:34 +08:00
|
|
|
|
{$layout}
|
2021-05-24 11:23:20 +08:00
|
|
|
|
{$template "node_menu"}
|
|
|
|
|
|
{$template "/code_editor"}
|
2020-09-06 16:19:34 +08:00
|
|
|
|
|
2021-05-24 11:23:20 +08:00
|
|
|
|
<!-- 未安装 -->
|
|
|
|
|
|
<div v-if="!node.isInstalled">
|
2021-06-14 19:53:53 +08:00
|
|
|
|
<h4>方法1:通过SSH自动安装</h4>
|
2020-09-06 16:19:34 +08:00
|
|
|
|
|
2021-05-24 11:23:20 +08:00
|
|
|
|
<div v-if="installStatus != null && (installStatus.isRunning || installStatus.isFinished)"
|
|
|
|
|
|
class="ui segment installing-box">
|
|
|
|
|
|
<div v-if="installStatus.isRunning" class="blue">安装中...</div>
|
|
|
|
|
|
<div v-if="installStatus.isFinished">
|
|
|
|
|
|
<span v-if="installStatus.isOk" class="green">已安装成功</span>
|
|
|
|
|
|
<span v-if="!installStatus.isOk" class="red">安装过程中发生错误:{{installStatus.error}}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div v-if="installStatus != null && installStatus.isFinished">
|
|
|
|
|
|
<button class="ui button small" type="button" @click.prevent="install()">重新安装</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div v-if="installStatus == null || (!installStatus.isFinished && !installStatus.isRunning)">
|
|
|
|
|
|
<button class="ui button small" type="button" @click.prevent="install()">开始安装</button>
|
|
|
|
|
|
</div>
|
2020-09-06 16:19:34 +08:00
|
|
|
|
|
2021-06-14 19:53:53 +08:00
|
|
|
|
<h4>方法2:手动安装</h4>
|
2021-05-24 11:23:20 +08:00
|
|
|
|
<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:
|
2021-06-10 19:19:43 +08:00
|
|
|
|
endpoints: [ {{apiEndpoints}} ]
|
2020-09-06 16:19:34 +08:00
|
|
|
|
nodeId: "{{node.uniqueId}}"
|
2021-05-24 11:23:20 +08:00
|
|
|
|
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>
|
2020-09-13 20:37:07 +08:00
|
|
|
|
|
2021-05-24 11:23:20 +08:00
|
|
|
|
<a href="" @click.prevent="updateNodeIsInstalled(true)">[修改为已安装状态]</a>
|
2021-06-10 19:19:43 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 已安装 -->
|
|
|
|
|
|
<div v-if="node.isInstalled">
|
2021-06-14 19:53:53 +08:00
|
|
|
|
<h4>配置文件</h4>
|
2021-06-10 19:19:43 +08:00
|
|
|
|
<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>
|
2021-05-24 11:23:20 +08:00
|
|
|
|
</div>
|