Matthias Nott
2026-02-22 dc9df32a3796f1d012c5244f1877d4ed402622bd
feat: add version display and cache-busting to dashboard
2 files modified
changed files
static/index.html patch | view | blame | history
static/js/app.js patch | view | blame | history
static/index.html
....@@ -88,8 +88,8 @@
8888 Restore
8989 </a>
9090 </nav>
91
- <div class="sidebar-footer">
92
- <a onclick="doLogout()" style="color:#9ca3af;cursor:pointer;">Logout</a>
91
+ <div class="sidebar-footer" id="sidebar-footer">
92
+ <a onclick="doLogout()" style="color:#9ca3af;cursor:pointer;">Logout</a><div id="app-version" style="margin-top:0.5rem;color:#4b5563;font-size:0.625rem;"></div>
9393 </div>
9494 </aside>
9595
....@@ -139,6 +139,6 @@
139139 </div>
140140 </div>
141141
142
-<script src="/static/js/app.js"></script>
142
+<script src="/static/js/app.js?v=4"></script>
143143 </body>
144144 </html>
static/js/app.js
....@@ -1,7 +1,8 @@
11 'use strict';
2
+const APP_VERSION = 'v4-20260222';
23
34 // ============================================================
4
-// OPS Dashboard — Vanilla JS Application (v3)
5
+// OPS Dashboard — Vanilla JS Application (v4)
56 // ============================================================
67
78 // ---------------------------------------------------------------------------
....@@ -107,6 +108,7 @@
107108 allServices = data;
108109 document.getElementById('login-overlay').style.display = 'none';
109110 document.getElementById('app').style.display = 'flex';
111
+ const vEl = document.getElementById('app-version'); if (vEl && typeof APP_VERSION !== 'undefined') vEl.textContent = APP_VERSION;
110112 showPage('dashboard');
111113 startAutoRefresh();
112114 })
....@@ -793,6 +795,7 @@
793795 allServices = data;
794796 document.getElementById('login-overlay').style.display = 'none';
795797 document.getElementById('app').style.display = 'flex';
798
+ const vEl = document.getElementById('app-version'); if (vEl && typeof APP_VERSION !== 'undefined') vEl.textContent = APP_VERSION;
796799 showPage('dashboard');
797800 startAutoRefresh();
798801 })