diff --git a/.devops/monitor.py b/.devops/monitor.py index 2f6e540..88db854 100644 --- a/.devops/monitor.py +++ b/.devops/monitor.py @@ -1803,6 +1803,43 @@ class DeploymentServer: // 加载表列表 loadTables(dbName); + + // 加载SQL历史记录 + loadSQLHistory(dbName); + }} + + // 加载SQL历史记录 + function loadSQLHistory(dbName) {{ + fetch(`/api/database/history?db=${{dbName}}`) + .then(response => response.json()) + .then(data => {{ + const historyPanel = document.getElementById('historyPanel'); + const historyContainer = document.getElementById('historyContainer'); + + if (data.success && data.history && data.history.length > 0) {{ + historyPanel.style.display = 'block'; + historyContainer.innerHTML = data.history.map(sql => + `