阶段性提交

This commit is contained in:
GoEdgeLab
2020-07-29 19:34:54 +08:00
parent b984b68089
commit 16d2dff57a
56 changed files with 5799 additions and 959 deletions

View File

@@ -1,4 +1,4 @@
<first-menu>
<menu-item code="index">服务列表</menu-item>
<menu-item code="create">创建服务</menu-item>
<menu-item href="/servers" code="index">服务列表</menu-item>
<menu-item href="/servers/create" code="create">创建服务</menu-item>
</first-menu>

View File

@@ -0,0 +1,22 @@
{$layout}
{$template "menu"}
<form class="ui form" data-tea-action="$" data-tea-success="success">
<table class="ui table selectable definition">
<tr>
<td class="title">服务名称</td>
<td>
<input type="text" name="name" maxlength="60" ref="focus"/>
</td>
</tr>
<tr>
<td>部署的集群</td>
<td>
<select class="ui dropdown" name="clusterId" style="width:10em">
<option v-for="cluster in clusters" :value="cluster.id">{{cluster.name}}</option>
</select>
</td>
</tr>
</table>
<submit-btn></submit-btn>
</form>

View File

@@ -0,0 +1,3 @@
Tea.context(function () {
this.success = NotifySuccess("保存成功", "/servers");
});

View File

@@ -1,3 +1,25 @@
{$layout}
{$template "menu"}
<p class="ui message" v-if="servers.length == 0">暂时还没有服务。</p>
<table class="ui table selectable" v-if="servers.length > 0">
<thead>
<tr>
<th>ID</th>
<th>服务名称</th>
<th>部署集群</th>
<th class="two op">操作</th>
</tr>
</thead>
<tr v-for="server in servers">
<td>{{server.id}}</td>
<td>{{server.name}}</td>
<td>{{server.cluster.name}}</td>
<td>
<a href="">详情</a> &nbsp; <a href="">删除</a>
</td>
</tr>
</table>
<div class="page" v-html="page"></div>