添加延迟显示支持

This commit is contained in:
CN-JS-HuiBai
2026-04-05 23:38:53 +08:00
parent 84972cdaeb
commit 058a6c73a1
7 changed files with 450 additions and 176 deletions

View File

@@ -376,6 +376,12 @@
<label for="sourceDesc">描述 (可选)</label>
<input type="text" id="sourceDesc" placeholder="数据源描述" autocomplete="off">
</div>
<div class="form-group" style="display: flex; align-items: flex-end; padding-bottom: 8px;">
<label style="display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 0.85rem; color: var(--text-secondary); white-space: nowrap;">
<input type="checkbox" id="isServerSource" checked style="width: 16px; height: 16px; accent-color: var(--accent-indigo);">
<span>用于服务器展示</span>
</label>
</div>
<div class="form-actions">
<button class="btn btn-test" id="btnTest">测试连接</button>
<button class="btn btn-add" id="btnAdd">添加</button>
@@ -434,6 +440,29 @@
<option value="both">统计上行+下行 (Sum)</option>
</select>
</div>
<h3 style="margin-top: 30px; border-top: 1px solid var(--border-color); padding-top: 20px;">Blackbox Exporter & 延迟连线</h3>
<div class="form-group">
<label for="blackboxSourceSelect">延迟数据源 (选择已对接 Blackbox 的 Prometheus)</label>
<select id="blackboxSourceSelect"
style="padding: 10px 14px; background: var(--bg-input); border: 1px solid var(--border-color); border-radius: var(--radius-sm); color: var(--text-primary);">
<option value="">-- 请选择数据源 --</option>
<!-- Sources will be injected here -->
</select>
</div>
<div class="form-row" style="margin-top: 15px;">
<div class="form-group">
<label for="latencySourceInput">起航点国家/地区A (地图连线起点)</label>
<input type="text" id="latencySourceInput" placeholder="例China">
</div>
<div class="form-group">
<label for="latencyDestInput">目的地国家/地区B (地图连线终点)</label>
<input type="text" id="latencyDestInput" placeholder="例United States">
</div>
</div>
<div class="form-group" style="margin-top: 15px;">
<label for="latencyTargetInput">Blackbox 探测目标 (在Prometheus中的instance标签值)</label>
<input type="text" id="latencyTargetInput" placeholder="例8.8.8.8">
</div>
<div class="form-actions" style="margin-top: 25px; display: flex; justify-content: flex-end;">
<button class="btn btn-add" id="btnSaveSiteSettings">保存设置</button>
</div>