Skip to content

Commit 210f22e

Browse files
committed
Refactor: Update script includes for modular JS
1 parent 4ac24ea commit 210f22e

File tree

1 file changed

+24
-38
lines changed

1 file changed

+24
-38
lines changed

src/public/index.html

Lines changed: 24 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,7 @@
140140
<div id="main" class="tab-content block bg-white dark:bg-gray-800 rounded-b rounded-tr shadow mb-2">
141141
<!-- Nested Tab Content START -->
142142
<div id="nested-tab-dashboard" class="nested-tab-content p-3">
143-
<!-- Nested Tabs START - WILL BE MOVED -->
144-
<!-- <div class="nested-tabs flex border-b border-gray-200 dark:border-gray-700">
145-
... nested tabs ...
146-
</div> -->
147-
<!-- Nested Tabs END - WILL BE MOVED -->
148143

149-
<!-- Moved Dashboard Filter START -->
150144
<div class="dashboard-filter flex flex-col md:flex-row justify-between items-stretch md:items-center gap-3 mb-3 p-2 bg-gray-50 dark:bg-gray-700/50 border border-gray-200 dark:border-gray-700 rounded">
151145
<div class="dashboard-filter-controls flex-grow flex items-center gap-2">
152146
<input type="text" id="dashboard-search" placeholder="Search Name, ID, Node (use ',' for OR)" class="flex-grow p-1 px-2 h-7 text-sm border border-gray-300 dark:border-gray-600 rounded bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-200 focus:ring-1 focus:ring-blue-500 focus:border-blue-500 outline-none" />
@@ -223,9 +217,7 @@
223217
</div>
224218
</div>
225219
</div>
226-
<!-- Moved Dashboard Filter END -->
227220

228-
<!-- Moved Table Container START -->
229221
<div class="table-container max-h-[70vh] overflow-y-auto overflow-x-auto mb-2 border border-gray-200 dark:border-gray-700 rounded overflow-hidden">
230222
<table id="main-table" class="w-full table-fixed text-sm">
231223
<colgroup>
@@ -322,31 +314,16 @@
322314
</tbody>
323315
</table>
324316
</div>
325-
<!-- Moved Table Container END -->
326317

327-
<!-- Nested Tabs START (Moved) - WILL BE MOVED AGAIN -->
328-
<!-- <div class="nested-tabs flex border-b border-gray-200 dark:border-gray-700 mt-3"> -->
329-
<!-- REMOVED Static Dashboard Tab -->
330-
<!-- <div class="nested-tab active px-3 py-1.5 cursor-pointer text-sm font-medium border-b-2 border-blue-600 text-blue-600" data-nested-tab="nested-tab-dashboard">
331-
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="inline-block align-middle mr-1"><path d="M12 2.099a10 10 0 1 0 8.645 15.215A10 10 0 0 0 12 2.099Z"/><path d="m7 13 3 3 7-7"/></svg>
332-
Dashboard
333-
</div> -->
334-
<!-- Dynamically added log tabs will appear here -->
335-
<!-- </div> -->
336-
<!-- Nested Tabs END (Moved) - WILL BE MOVED AGAIN -->
337-
338-
<!-- Moved Status Text START -->
339318
<span id="dashboard-status-text" class="text-xs text-gray-500 dark:text-gray-400">Loading dashboard data...</span>
340-
<!-- Moved Status Text END -->
341319

342320
<!-- Separator -->
343321
<hr class="border-gray-200 dark:border-gray-700 my-2">
344322

345-
<!-- Log Controls Container START (Moved) -->
346-
<div id="log-controls-container" class="flex justify-start items-center gap-2 mt-2">
347-
<button
348-
id="start-log-button"
349-
class="px-2 py-1 text-xs rounded bg-gray-200 hover:bg-gray-300 dark:bg-gray-600 dark:hover:bg-gray-500 text-gray-700 dark:text-gray-200 flex items-center h-7"
323+
<div id="log-controls-container" class="flex justify-start items-center gap-2 mt-2">
324+
<button
325+
id="start-log-button"
326+
class="px-2 py-1 text-xs rounded bg-gray-200 hover:bg-gray-300 dark:bg-gray-600 dark:hover:bg-gray-500 text-gray-700 dark:text-gray-200 flex items-center h-7"
350327
title="Start New Threshold Log"
351328
>
352329
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="mr-1"><path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="12" y1="18" x2="12" y2="12"></line><line x1="9" y1="15" x2="15" y2="15"></line></svg>
@@ -357,27 +334,18 @@
357334
<span>Clear Logs</span>
358335
</button>
359336
</div>
360-
<!-- Log Controls Container END (Moved) -->
361337
</div>
362-
<!-- Nested Tab Content END (Main Dashboard View) -->
363338

364-
<!-- Log Session Area START (Contains Tabs and Content Panels) -->
365339
<div id="log-session-area" class="hidden mt-4 p-3 bg-white dark:bg-gray-800 rounded shadow border border-gray-200 dark:border-gray-700">
366-
<!-- Nested Tabs for LOGS only -->
367340
<div class="nested-tabs flex border-b border-gray-200 dark:border-gray-700 mb-2">
368-
<!-- Dynamically added log tabs will appear here -->
369341
</div>
370-
<!-- Container for Log Content Panels -->
371342
<div id="log-content-area" class="space-y-2">
372-
<!-- Dynamically added log panels will appear here -->
373343
</div>
374344
</div>
375-
<!-- Log Session Area END -->
376345

377346
</div>
378347

379348
<div id="nodes" class="tab-content hidden bg-white dark:bg-gray-800 rounded-b rounded-tr shadow p-3 mb-2">
380-
<!-- Add Node Table Structure -->
381349
<div class="table-container max-h-[80vh] overflow-y-auto overflow-x-auto mb-2 border border-gray-200 dark:border-gray-700 rounded overflow-hidden">
382350
<table id="nodes-table" class="w-full table-auto text-sm">
383351
<thead class="sticky top-0 z-10 bg-gray-100 dark:bg-gray-800">
@@ -398,7 +366,6 @@
398366
</tbody>
399367
</table>
400368
</div>
401-
<!-- End Node Table Structure -->
402369
</div>
403370

404371
<div id="storage" class="tab-content hidden bg-white dark:bg-gray-800 rounded-b rounded-tr shadow p-3 mb-2">
@@ -513,7 +480,26 @@
513480
</div>
514481

515482
<script src="/socket.io/socket.io.js"></script>
516-
<script src="/app.js" defer></script>
483+
<script>window.PulseApp = {};</script>
484+
<!-- <script src="/app.js" defer></script> -->
485+
<script src="/js/config.js" defer></script>
486+
<script src="/js/state.js" defer></script>
487+
<script src="/js/utils.js" defer></script>
488+
<script src="/js/theme.js" defer></script>
489+
<script src="/js/tooltips.js" defer></script>
490+
<script src="/js/socketHandler.js" defer></script>
491+
<script src="/js/tabs.js" defer></script>
492+
<script src="/js/ui/thresholds.js" defer></script>
493+
<script src="/js/ui/common.js" defer></script>
494+
<script src="/js/ui/nodes.js" defer></script>
495+
<script src="/js/ui/dashboard.js" defer></script>
496+
<script src="/js/ui/storage.js" defer></script>
497+
<script src="/js/ui/pbs.js" defer></script>
498+
<script src="/js/ui/backups.js" defer></script>
499+
<script src="/js/thresholds/logging.js" defer></script>
500+
<script src="/js/hotReload.js" defer></script>
501+
<script src="/js/main.js" defer></script>
502+
517503
<footer class="text-center text-xs text-gray-500 py-4">
518504
Pulse for Proxmox | Version: <a href="https://github.com/rcourtman/Pulse/releases" target="_blank" rel="noopener noreferrer" id="app-version" class="text-blue-600 dark:text-blue-400 hover:underline">loading...</a>
519505
</footer>

0 commit comments

Comments
 (0)