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">
|
2021-11-09 15:36:18 +08:00
|
|
|
|
<table class="ui table selectable definition">
|
2020-07-29 19:34:54 +08:00
|
|
|
|
<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>
|
2021-11-22 14:34:32 +08:00
|
|
|
|
<tr v-show="hasUsers">
|
2021-11-09 15:36:18 +08:00
|
|
|
|
<td>选择用户</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<user-selector @change="changeUserId"></user-selector>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr v-if="plans.length > 0">
|
|
|
|
|
|
<td>选择套餐</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<select class="ui dropdown auto-width" name="userPlanId">
|
|
|
|
|
|
<option value="0">[选择套餐]</option>
|
|
|
|
|
|
<option v-for="plan in plans" :value="plan.id">{{plan.name}}({{plan.dayTo}})</option>
|
|
|
|
|
|
</select>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
2020-07-29 19:34:54 +08:00
|
|
|
|
<tr>
|
2020-08-21 12:32:16 +08:00
|
|
|
|
<td>部署的集群 *</td>
|
2020-07-29 19:34:54 +08:00
|
|
|
|
<td>
|
2021-11-09 15:36:18 +08:00
|
|
|
|
<div v-if="userId == 0">
|
|
|
|
|
|
<select class="ui dropdown auto-width" name="clusterId">
|
|
|
|
|
|
<option v-for="cluster in clusters" :value="cluster.id">{{cluster.name}}</option>
|
|
|
|
|
|
</select>
|
|
|
|
|
|
<p class="comment">当前服务将会部署到所选集群的节点上。</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div v-else>跟随用户设置。</div>
|
2020-07-29 19:34:54 +08:00
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
2021-11-09 15:36:18 +08:00
|
|
|
|
|
|
|
|
|
|
<!-- 域名 -->
|
|
|
|
|
|
<tr v-if="serverType == 'httpProxy' || serverType == 'httpWeb'">
|
|
|
|
|
|
<td>绑定域名</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<server-name-box></server-name-box>
|
|
|
|
|
|
<p class="comment">绑定后,才能通过域名可以访问不同的服务。</p>
|
|
|
|
|
|
</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-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>
|
|
|
|
|
|
|
2021-12-03 14:55:14 +08:00
|
|
|
|
<tr v-if="serverType == 'httpProxy' || serverType == 'httpWeb'">
|
2021-07-20 08:48:55 +08:00
|
|
|
|
<td>默认开启配置</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<checkbox checked="checked" name="accessLogIsOn">访问日志</checkbox>
|
|
|
|
|
|
|
|
|
|
|
|
<checkbox checked="checked" name="websocketIsOn">Websocket</checkbox>
|
2021-10-25 09:06:23 +08:00
|
|
|
|
|
|
|
|
|
|
<checkbox checked="checked" name="cacheIsOn">缓存</checkbox>
|
|
|
|
|
|
|
|
|
|
|
|
<checkbox name="wafIsOn">WAF</checkbox>
|
|
|
|
|
|
|
2021-10-30 22:33:56 +08:00
|
|
|
|
<checkbox name="remoteAddrIsOn">从上级代理中读取IP <tip-icon content="用来支持读取上级代理传递的X-Real-IP、X-Forwarded-For等信息。如果用户需要通过别的代理服务才能访问到这个网站服务,才需要选中。"></tip-icon> </checkbox>
|
2021-12-03 14:55:14 +08:00
|
|
|
|
|
|
|
|
|
|
<checkbox name="statIsOn">统计</checkbox>
|
2021-07-20 08:48:55 +08:00
|
|
|
|
</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>
|
2021-11-09 15:36:18 +08:00
|
|
|
|
|
2020-07-29 19:34:54 +08:00
|
|
|
|
<submit-btn></submit-btn>
|
|
|
|
|
|
</form>
|