mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2026-04-21 11:55:17 +08:00
阶段性提交
This commit is contained in:
@@ -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>
|
||||
22
web/views/@default/servers/create.html
Normal file
22
web/views/@default/servers/create.html
Normal 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>
|
||||
3
web/views/@default/servers/create.js
Normal file
3
web/views/@default/servers/create.js
Normal file
@@ -0,0 +1,3 @@
|
||||
Tea.context(function () {
|
||||
this.success = NotifySuccess("保存成功", "/servers");
|
||||
});
|
||||
@@ -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> <a href="">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="page" v-html="page"></div>
|
||||
Reference in New Issue
Block a user