v1.2.10: rename Верстак→Консоль, fix logs view

- Sidebar: Верстак → 🖥 Консоль
- View header: Верстак → Консоль
- Log view: show real log content (synced with log panel)
- Dark bottom log panel: hidden on all non-log views, left offset 192px (sidebar width)
- views.js: switchView handles log view sync
This commit is contained in:
2026-07-31 13:33:05 +04:00
parent 2133a1b2fe
commit e618d6d011
3 changed files with 16 additions and 7 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ from routes.api_scenario_run import bp_run as api_scenario_run_bp
from routes.api_scenario_defs import bp_defs as api_scenario_defs_bp
# Версия — меняется при КАЖДОМ изменении кода. Показывается в топбаре UI.
VERSION = "1.2.9"
VERSION = "1.2.10"
app = Flask(__name__, template_folder="templates", static_folder="static")
app.config["NUBES_API_ENDPOINT"] = os.getenv("NUBES_API_ENDPOINT", "https://lk-api-gateway-test.ngcloud.ru/api/v1/svc")
+11 -2
View File
@@ -15,8 +15,17 @@ function switchView(viewId) {
if (viewId === 'scenarios-view' && typeof toggleScenario === 'function') {
if (!scenarioOpen) toggleScenario();
}
if (viewId === 'logs-view' && typeof toggleLog === 'function') {
if (viewId === 'logs-view') {
// Показать лог в виде, скрыть нижнюю панель
const lp = document.getElementById('log-panel');
if (lp && lp.style.display === 'none') toggleLog();
const lvc = document.getElementById('log-view-content');
if (lp && lvc) {
lvc.innerHTML = lp.innerHTML || '<span style="color:#888;">Логи загружаются...</span>';
lp.style.display = 'none';
}
} else {
// Скрыть нижнюю панель на всех видах кроме логов
const lp = document.getElementById('log-panel');
if (lp) lp.style.display = 'none';
}
}
+4 -4
View File
@@ -49,7 +49,7 @@
<img src="{{ url_for('static', filename='logo.svg') }}" alt="Nubes" style="height:20px;" />
</div>
<div class="sidebar-nav">
<button class="sidebar-item active" data-view="workbench" onclick="switchView('workbench')"><span style="display:flex;align-items:center;gap:10px;">▶ Верстак</span></button>
<button class="sidebar-item active" data-view="workbench" onclick="switchView('workbench')">🖥 Консоль</button>
<button class="sidebar-item" data-view="overview" onclick="switchView('overview')">📊 Обзор</button>
<button class="sidebar-item" data-view="history-view" onclick="switchView('history-view')">📋 История</button>
<button class="sidebar-item" data-view="scenarios-view" onclick="switchView('scenarios-view')">🧪 Сценарии</button>
@@ -69,7 +69,7 @@
<!-- VIEW: Верстак -->
<div class="view" id="view-workbench">
<div class="view-header">Верстак</div>
<div class="view-header">Консоль</div>
<div class="workbench-layout">
<div class="wb-left">
<div class="card">
@@ -152,7 +152,7 @@
<!-- VIEW: Логи -->
<div class="view hidden" id="view-logs-view">
<div class="view-header">Логи</div>
<div id="log-view-content" style="background:#1e1e1e;color:#d4d4d4;font:12px monospace;padding:10px;border-radius:6px;min-height:300px;max-height:calc(100vh - 200px);overflow-y:auto;">Откройте лог-панель кнопкой...</div>
<div id="log-view-content" style="background:#1e1e1e;color:#d4d4d4;font:12px monospace;padding:10px;border-radius:6px;min-height:300px;max-height:calc(100vh - 200px);overflow-y:auto;"></div>
</div>
<script>
@@ -178,7 +178,7 @@ window.APP = {
<script src="{{ url_for('static', filename='js/scenario-list.js') }}"></script>
<script src="{{ url_for('static', filename='app.js') }}"></script>
<div id="log-panel" style="display:none;position:fixed;bottom:0;left:72px;right:0;height:180px;background:#1e1e1e;color:#d4d4d4;font:12px monospace;overflow-y:auto;padding:8px 12px;border-top:2px solid #555;z-index:9999;"></div>
<div id="log-panel" style="display:none;position:fixed;bottom:0;left:192px;right:0;height:180px;background:#1e1e1e;color:#d4d4d4;font:12px monospace;overflow-y:auto;padding:8px 12px;border-top:2px solid #555;z-index:9999;"></div>
<button onclick="toggleLog()" title="Логи" style="position:fixed;bottom:4px;right:8px;z-index:10000;background:#1e1e1e;color:#888;border:1px solid #555;border-radius:3px;font:11px monospace;padding:3px 8px;cursor:pointer;">log</button>
</body>