2020-07-29 19:34:54 +08:00
|
|
|
{$layout}
|
|
|
|
|
{$template "menu"}
|
|
|
|
|
|
2020-08-21 12:32:16 +08:00
|
|
|
<div class="margin"></div>
|
|
|
|
|
|
2020-11-10 12:47:24 +08:00
|
|
|
<form method="post" class="ui form" data-tea-action="$" data-tea-success="success">
|
2020-07-29 19:34:54 +08:00
|
|
|
<table class="ui table selectable definition">
|
|
|
|
|
<tr>
|
2020-08-21 12:32:16 +08:00
|
|
|
<td class="title">服务名称 *</td>
|
2020-07-29 19:34:54 +08:00
|
|
|
<td>
|
|
|
|
|
<input type="text" name="name" maxlength="60" ref="focus"/>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2020-08-21 12:32:16 +08:00
|
|
|
<td>部署的集群 *</td>
|
2020-07-29 19:34:54 +08:00
|
|
|
<td>
|
2020-08-21 12:32:16 +08:00
|
|
|
<select class="ui dropdown auto-width" name="clusterId">
|
2020-07-29 19:34:54 +08:00
|
|
|
<option v-for="cluster in clusters" :value="cluster.id">{{cluster.name}}</option>
|
|
|
|
|
</select>
|
2021-04-18 15:58:52 +08:00
|
|
|
<p class="comment">当前服务将会部署到所选集群的节点上。</p>
|
2020-07-29 19:34:54 +08:00
|
|
|
</td>
|
|
|
|
|
</tr>
|
2020-08-21 12:32:16 +08:00
|
|
|
<tr>
|
|
|
|
|
<td>服务类型 *</td>
|
|
|
|
|
<td>
|
|
|
|
|
<select class="ui dropdown auto-width" name="serverType" v-model="serverType" @change="changeServerType()">
|
2021-04-18 15:58:52 +08:00
|
|
|
<option v-for="s in serverTypes" :value="s.code">{{s.name}}</option>
|
2020-08-21 12:32:16 +08:00
|
|
|
</select>
|
2021-04-18 15:58:52 +08:00
|
|
|
<p class="comment" v-for="s in serverTypes" v-if="s.code == serverType">{{s.description}}</p>
|
2020-08-21 12:32:16 +08:00
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>绑定端口 *</td>
|
|
|
|
|
<td>
|
2021-06-06 14:10:45 +08:00
|
|
|
<network-addresses-box :v-server-type="serverType" :v-addresses="defaultAddresses"></network-addresses-box>
|
2020-08-21 12:32:16 +08:00
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<!-- 域名 -->
|
2020-09-15 14:44:52 +08:00
|
|
|
<tr v-if="serverType == 'httpProxy' || serverType == 'httpWeb'">
|
2020-08-21 12:32:16 +08:00
|
|
|
<td>绑定域名</td>
|
|
|
|
|
<td>
|
2020-09-16 09:09:10 +08:00
|
|
|
<server-name-box></server-name-box>
|
2021-06-27 21:59:06 +08:00
|
|
|
<p class="comment">绑定后,才能通过域名可以访问不同的服务。</p>
|
2020-08-21 12:32:16 +08:00
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
2020-12-18 21:18:35 +08:00
|
|
|
<!-- 证书 -->
|
|
|
|
|
<tbody v-if="tlsProtocolName.length > 0">
|
|
|
|
|
<tr>
|
2021-06-14 19:53:53 +08:00
|
|
|
<td>{{tlsProtocolName.toUpperCase()}}证书</td>
|
2020-12-18 21:18:35 +08:00
|
|
|
<td>
|
2021-07-20 08:29:50 +08:00
|
|
|
<ssl-certs-box :v-protocol="tlsProtocolName.toLowerCase()"></ssl-certs-box>
|
2020-12-18 21:18:35 +08:00
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
|
2020-08-21 12:32:16 +08:00
|
|
|
<!-- 源服务器地址 -->
|
|
|
|
|
<tr v-if="serverType == 'httpProxy' || serverType == 'tcpProxy' || serverType == 'udpProxy'">
|
|
|
|
|
<td>源站地址</td>
|
|
|
|
|
<td>
|
|
|
|
|
<input type="hidden" name="origins" :value="JSON.stringify(origins)"/>
|
|
|
|
|
<div v-if="origins.length > 0">
|
|
|
|
|
<div v-for="(origin, index) in origins" class="ui label small">
|
|
|
|
|
{{origin.addr.protocol}}://{{origin.addr.host}}:{{origin.addr.portRange}}
|
|
|
|
|
<a href="" title="删除" @click.prevent="removeOrigin(index)"><i class="icon remove"></i></a>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ui divider"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<a href="" @click.prevent="addOrigin">[添加源站地址]</a>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<!-- Web Server -->
|
|
|
|
|
<tr v-if="serverType == 'httpWeb'">
|
|
|
|
|
<td>Web目录</td>
|
|
|
|
|
<td>
|
|
|
|
|
<input type="text" name="webRoot"/>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
2020-10-29 21:37:48 +08:00
|
|
|
<tr>
|
|
|
|
|
<td>选择分组</td>
|
|
|
|
|
<td>
|
|
|
|
|
<server-group-selector></server-group-selector>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
2020-08-21 12:32:16 +08:00
|
|
|
<tr>
|
|
|
|
|
<td colspan="2"><more-options-indicator></more-options-indicator></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tbody v-show="moreOptionsVisible">
|
|
|
|
|
<tr>
|
|
|
|
|
<td>描述</td>
|
|
|
|
|
<td>
|
|
|
|
|
<textarea name="description" rows="3"></textarea>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
2020-07-29 19:34:54 +08:00
|
|
|
</table>
|
|
|
|
|
<submit-btn></submit-btn>
|
|
|
|
|
</form>
|