115 lines
4.8 KiB
HTML
115 lines
4.8 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>RAG 配置管理</title>
|
|
<link rel="stylesheet" href="/static/config/style.css?v=202602101450">
|
|
<script src="/static/config/script.js?v=202602101450"></script>
|
|
</head>
|
|
<body>
|
|
<div class="config-container">
|
|
<!-- 侧边栏 -->
|
|
<aside class="sidebar">
|
|
<div class="sidebar-header">
|
|
<h1>⚙️ 配置管理</h1>
|
|
<div class="add-config-container">
|
|
<label for="configTypeSelect" class="config-type-label">新增数据源:</label>
|
|
<select id="configTypeSelect">
|
|
<option value="">选择类型</option>
|
|
<option value="database">数据库</option>
|
|
<option value="folder">文件夹</option>
|
|
<option value="git">Git代码库</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="config-list" id="configList">
|
|
<!-- 配置列表将通过 JavaScript 动态生成 -->
|
|
</div>
|
|
|
|
</aside>
|
|
|
|
<!-- 主配置区域 -->
|
|
<main class="config-main">
|
|
<!-- 欢迎界面 -->
|
|
<div class="welcome-screen" id="welcomeScreen">
|
|
<div class="welcome-content">
|
|
⚙️
|
|
<h2>欢迎使用 RAG 配置管理</h2>
|
|
<p>您可以在这里管理所有数据源配置</p>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 配置详情界面 -->
|
|
<div class="config-screen" id="configScreen" style="display: none;">
|
|
<div class="config-header">
|
|
<div class="config-title" id="configTitle">配置详情</div>
|
|
<div class="config-actions">
|
|
<button class="save-btn" id="saveBtn">💾 保存</button>
|
|
<button class="delete-btn" id="deleteBtn">🗑️ 删除</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="config-form" id="configForm">
|
|
<!-- 配置表单将通过 JavaScript 动态生成 -->
|
|
</div>
|
|
</div>
|
|
</main>
|
|
</div>
|
|
|
|
<!-- 添加配置模态框 -->
|
|
<div class="modal" id="addConfigModal">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h3>添加新配置</h3>
|
|
<button class="close-btn" id="addConfigCloseBtn">×</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<form id="addConfigForm">
|
|
<div class="form-group">
|
|
<label for="configName">配置名称</label>
|
|
<input type="text" id="configName" name="name" required>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="configType">配置类型</label>
|
|
<select id="configType" name="type" required>
|
|
<option value="database">数据库 (database)</option>
|
|
<option value="folder">文件夹 (folder)</option>
|
|
<option value="git">Git代码库 (git)</option>
|
|
</select>
|
|
</div>
|
|
<div class="form-group" id="dbTypeGroup" style="display: none;">
|
|
<label for="dbType">数据库类型</label>
|
|
<select id="dbType" name="dbType">
|
|
<option value="mysql">MySQL</option>
|
|
<option value="dameng">达梦数据库</option>
|
|
</select>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn secondary" id="cancelAddBtn">取消</button>
|
|
<button type="submit" class="btn primary">创建</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 删除确认模态框 -->
|
|
<div class="modal" id="deleteConfirmModal">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h3>删除配置</h3>
|
|
<button class="close-btn" id="deleteConfirmCloseBtn">×</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<p>确定要删除这个配置吗?此操作不可恢复。</p>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn secondary" id="cancelDeleteBtn">取消</button>
|
|
<button type="button" class="btn danger" id="confirmDeleteBtn">删除</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |