{$layout}

{$template "menu"}

<form method="post" class="ui form" data-tea-action="$" data-tea-success="success">
	<input type="hidden" name="nodeId" :value="node.id"/>
	<input type="hidden" name="sslPolicyId" :value="node.sslPolicyId"/>
	<table class="ui table selectable definition">
		<tr>
			<td class="title">节点名称 *</td>
			<td>
				<input type="text" name="name" maxlength="100" ref="focus" v-model="node.name"/>
			</td>
		</tr>
		<tr>
			<td>进程监听端口 *</td>
			<td>
				<network-addresses-box :v-name="'listensJSON'" :v-server-type="'httpWeb'" :v-addresses="node.listens" :v-from="'userNode'" @change="changeListens"></network-addresses-box>
				<p class="comment">API节点进程监听的网络端口。</p>
			</td>
		</tr>
		<tr v-if="hasHTTPS">
			<td>HTTPS证书 *</td>
			<td>
				<ssl-certs-box :v-certs="node.certs" :v-protocol="'https'"></ssl-certs-box>
			</td>
		</tr>
		<tr>
			<td>外部访问地址 *</td>
			<td>
				<api-node-addresses-box :v-name="'accessAddrsJSON'" :v-addrs="node.accessAddrs"></api-node-addresses-box>
				<p class="comment">可以公开访问用户平台的网络地址，用于展示用于平台链接、支付回调等，<strong>端口号通常和和监听端口一致，除非你做了端口转发。</strong></p>
			</td>
		</tr>

		<tr>
			<td colspan="2"><more-options-indicator></more-options-indicator></td>
		</tr>
		<tbody v-show="moreOptionsVisible">
			<tr>
				<td>描述</td>
				<td>
					<textarea name="description" maxlength="200" rows="3" v-model="node.description"></textarea>
				</td>
			</tr>
			<tr>
				<td>启用当前节点</td>
				<td>
					<checkbox name="isOn" :v-value="1" v-model="node.isOn"></checkbox>
				</td>
			</tr>
		</tbody>
	</table>
	<submit-btn></submit-btn>
</form>