集群列表页也增加“创建节点”链接

This commit is contained in:
GoEdgeLab
2023-05-27 19:55:06 +08:00
parent c2804868dc
commit d381e6d72d
6 changed files with 87 additions and 1 deletions

View File

@@ -2,5 +2,6 @@
<menu-item href="/clusters" code="index">集群&nbsp;<span class="small">({{totalNodeClusters}})</span></menu-item>
<menu-item href="/clusters/nodes" code="node">节点&nbsp;<span class="small">({{totalNodes}})</span></menu-item>
<span class="disabled item">|</span>
<menu-item href="/clusters/create" code="create">[创建集群]</menu-item>
<menu-item href="/clusters/create" code="create">[创建集群]</menu-item>
<menu-item href="/clusters/createNode" code="createNode">[创建节点]</menu-item>
</first-menu>

View File

@@ -0,0 +1,14 @@
{$layout}
{$template "menu"}
<div class="margin"></div>
<form class="ui form">
<table class="ui table definition selectable">
<tr>
<td class="title">选择所属集群 *</td>
<td><node-cluster-combo-box @change="changeCluster"></node-cluster-combo-box></td>
</tr>
</table>
<button type="button" class="ui button primary" :class="{disabled: clusterId <= 0}" @click.prevent="goNext">下一步 <i class="icon right arrow"></i></button>
</form>

View File

@@ -0,0 +1,13 @@
Tea.context(function () {
this.clusterId = 0
this.changeCluster = function(clusterId) {
this.clusterId = clusterId
}
this.goNext = function () {
if (this.clusterId > 0) {
window.location = "/clusters/cluster/createNode?clusterId=" + this.clusterId
}
}
})