完善查询日志
This commit is contained in:
@@ -327,12 +327,17 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2">
|
||||
<div class="col-6">
|
||||
<div class="col-4">
|
||||
<button class="btn btn-warning btn-sm w-100" onclick="showQueryHistoryDialog()">
|
||||
<i class="fas fa-history"></i> 查询历史
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="col-4">
|
||||
<button class="btn btn-info btn-sm w-100" onclick="showQueryLogsDialog()">
|
||||
<i class="fas fa-file-alt"></i> 查询日志
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<button class="btn btn-secondary btn-sm w-100" onclick="showSaveHistoryDialog()">
|
||||
<i class="fas fa-bookmark"></i> 保存历史
|
||||
</button>
|
||||
@@ -615,11 +620,6 @@
|
||||
<i class="fas fa-chart-pie"></i> 比较总结
|
||||
</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link" id="logs-tab" data-bs-toggle="tab" data-bs-target="#logs-panel" type="button" role="tab">
|
||||
<i class="fas fa-file-alt"></i> 查询日志
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="mt-2">
|
||||
<button class="btn btn-sm btn-outline-primary" onclick="exportResults()">
|
||||
@@ -684,41 +684,6 @@
|
||||
<!-- 总结报告将在这里动态生成 -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 查询日志面板 -->
|
||||
<div class="tab-pane fade" id="logs-panel" role="tabpanel">
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<div class="d-flex align-items-center">
|
||||
<h6 class="mb-0 me-3">查询执行日志</h6>
|
||||
<div class="form-check form-check-inline">
|
||||
<input class="form-check-input" type="checkbox" id="log-level-info" checked onchange="filterLogsByLevel()">
|
||||
<label class="form-check-label text-primary" for="log-level-info">INFO</label>
|
||||
</div>
|
||||
<div class="form-check form-check-inline">
|
||||
<input class="form-check-input" type="checkbox" id="log-level-warning" checked onchange="filterLogsByLevel()">
|
||||
<label class="form-check-label text-warning" for="log-level-warning">WARNING</label>
|
||||
</div>
|
||||
<div class="form-check form-check-inline">
|
||||
<input class="form-check-input" type="checkbox" id="log-level-error" checked onchange="filterLogsByLevel()">
|
||||
<label class="form-check-label text-danger" for="log-level-error">ERROR</label>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<button class="btn btn-sm btn-outline-primary me-2" onclick="refreshQueryLogs()">
|
||||
<i class="fas fa-sync-alt"></i> 刷新
|
||||
</button>
|
||||
<button class="btn btn-sm btn-outline-warning me-2" onclick="cleanupOldLogs()">
|
||||
<i class="fas fa-broom"></i> 清理旧日志
|
||||
</button>
|
||||
<button class="btn btn-sm btn-outline-danger" onclick="clearQueryLogs()">
|
||||
<i class="fas fa-trash"></i> 清空
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="query-logs" style="max-height: 500px; overflow-y: auto;">
|
||||
<!-- 查询日志将在这里动态生成 -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -727,6 +692,56 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 查询日志模态框 -->
|
||||
<div class="modal fade" id="queryLogsModal" tabindex="-1" aria-labelledby="queryLogsModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-xl">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="queryLogsModalLabel">
|
||||
<i class="fas fa-file-alt"></i> 查询日志管理
|
||||
</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<div class="d-flex align-items-center">
|
||||
<h6 class="mb-0 me-3">查询执行日志</h6>
|
||||
<div class="form-check form-check-inline">
|
||||
<input class="form-check-input" type="checkbox" id="modal-log-level-info" checked onchange="filterModalLogsByLevel()">
|
||||
<label class="form-check-label text-primary" for="modal-log-level-info">INFO</label>
|
||||
</div>
|
||||
<div class="form-check form-check-inline">
|
||||
<input class="form-check-input" type="checkbox" id="modal-log-level-warning" checked onchange="filterModalLogsByLevel()">
|
||||
<label class="form-check-label text-warning" for="modal-log-level-warning">WARNING</label>
|
||||
</div>
|
||||
<div class="form-check form-check-inline">
|
||||
<input class="form-check-input" type="checkbox" id="modal-log-level-error" checked onchange="filterModalLogsByLevel()">
|
||||
<label class="form-check-label text-danger" for="modal-log-level-error">ERROR</label>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<button class="btn btn-sm btn-outline-primary me-2" onclick="refreshModalQueryLogs()">
|
||||
<i class="fas fa-sync-alt"></i> 刷新
|
||||
</button>
|
||||
<button class="btn btn-sm btn-outline-warning me-2" onclick="cleanupOldLogs()">
|
||||
<i class="fas fa-broom"></i> 清理旧日志
|
||||
</button>
|
||||
<button class="btn btn-sm btn-outline-danger" onclick="clearQueryLogs()">
|
||||
<i class="fas fa-trash"></i> 清空
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="modal-query-logs" style="max-height: 600px; overflow-y: auto;">
|
||||
<!-- 查询日志将在这里动态生成 -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="{{ url_for('static', filename='js/app.js') }}"></script>
|
||||
</body>
|
||||
|
Reference in New Issue
Block a user