Files
waf-platform/EdgeAdmin/web/views/@default/db/clickHouse.html
2026-02-12 21:37:55 +08:00

71 lines
2.6 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{$layout}
{$template "menu"}
<h3>ClickHouse 配置</h3>
<p class="comment">用于访问日志列表查询logs_ingest 表)。配置后,访问日志列表将优先从 ClickHouse 读取;不配置则仅从 MySQL 读取。留空表示不使用 ClickHouse。</p>
<form method="post" class="ui form" data-tea-action="$" data-tea-success="success" @submit.prevent="onSubmit">
<csrf-token></csrf-token>
<table class="ui table definition selectable">
<tr>
<td class="title">连接地址Host</td>
<td>
<input type="text" name="host" maxlength="200" ref="focus" placeholder="如 127.0.0.1 或 clickhouse.example.com" :value="config.host"/>
<p class="comment">ClickHouse 服务器地址。</p>
</td>
</tr>
<tr>
<td>协议Scheme</td>
<td>
<select name="scheme" class="ui dropdown auto-width">
<option value="http" :selected="config.scheme != 'https'">HTTP</option>
<option value="https" :selected="config.scheme == 'https'">HTTPS</option>
</select>
<p class="comment">默认 HTTP选择 HTTPS 时将启用 TLS 连接。</p>
</td>
</tr>
<tr>
<td>端口Port</td>
<td>
<input type="number" name="port" min="1" max="65535" style="width:6em" :value="config.port"/>
<p class="comment">接口端口HTTP 默认 8123HTTPS 常用 8443以你的 ClickHouse 实际配置为准)。</p>
</td>
</tr>
<tr>
<td>用户名User</td>
<td>
<input type="text" name="user" maxlength="100" :value="config.user"/>
</td>
</tr>
<tr>
<td>密码Password</td>
<td>
<input type="password" name="password" maxlength="200" placeholder="不修改请留空" value=""/>
<p class="comment">留空则不修改已保存的密码。</p>
</td>
</tr>
<tr>
<td>TLS 跳过证书校验</td>
<td>
<checkbox name="tlsSkipVerify" value="1" :checked="config.tlsSkipVerify"></checkbox>
<p class="comment">仅测试环境建议开启;生产建议关闭并使用受信任证书。</p>
</td>
</tr>
<tr>
<td>TLS Server Name</td>
<td>
<input type="text" name="tlsServerName" maxlength="200" placeholder="可选证书校验域名SNI" :value="config.tlsServerName"/>
<p class="comment">可选;当 ClickHouse 证书域名与连接 Host 不一致时使用。</p>
</td>
</tr>
<tr>
<td>数据库名Database</td>
<td>
<input type="text" name="database" maxlength="100" placeholder="default" :value="config.database"/>
<p class="comment">logs_ingest 表所在库,默认 default。</p>
</td>
</tr>
</table>
<submit-btn></submit-btn>
</form>