mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
All 17 page scripts (i18n, shared helpers, navigation and the per-page scripts) are merged into one html/main.js that every page loads as its only script, so the browser fetches it once and gzip can compress across all of it. The page-specific initialisation is guarded by the presence of the matching page elements (it used to be selected implicitly by which script a page loaded); the sidebar fill and the stat popup wiring moved into DOMContentLoaded handlers because the bundle loads in <head>, before the body exists. tools/httpd_sim.h: BUFFER_SIZE 24000 -> 131072 so the simulator can serve the larger bundle (the firmware is unaffected, it serves the gzip'd bundle of ~17 KB). Measured (make MACHINE=KP_9000_6XHML_X2): the JS drops from 23,302 to 16,948 bytes gzip; the whole Web UI from 34,784 to 28,200 bytes (25.3 % of the raw 111,280); the data block ends at 0x46e28. Verified with a headless browser against httpd_sim and against a real PCB-K0402WS-V3: all pages render, the sidebar and the port strip are drawn, no JavaScript errors.
28 lines
1.5 KiB
HTML
28 lines
1.5 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<script src="/main.js"></script>
|
|
<link rel="stylesheet" href="style.css">
|
|
<title data-i18n="l2_title">FreeSwitchOS L2 Configuration</title>
|
|
</head>
|
|
<body>
|
|
<nav id="sidebar"></nav>
|
|
<div style="margin-left:16%;padding:1px 16px;height:1000px;">
|
|
<div id="ports"></div>
|
|
<h1 data-i18n="l2_heading">L2 Configuration</h1>
|
|
<p><span data-i18n="l2_shown">Shown:</span> <span id="l2count">-</span></p>
|
|
<table id="l2table">
|
|
<tr>
|
|
<th><span class="l2sort" onclick="l2SortBy('port')"><span data-i18n="l2_col_port">Port</span><span id="l2a_port" class="l2arrow"></span></span><br>
|
|
<input id="l2f_port" class="l2filter" oninput="l2FilterChanged()" size="5"></th>
|
|
<th><span class="l2sort" onclick="l2SortBy('mac')">MAC<span id="l2a_mac" class="l2arrow"></span></span><br>
|
|
<input id="l2f_mac" class="l2filter" oninput="l2FilterChanged()" size="14"></th>
|
|
<th><span class="l2sort" onclick="l2SortBy('vlan')">VLAN<span id="l2a_vlan" class="l2arrow"></span></span><br>
|
|
<input id="l2f_vlan" class="l2filter" oninput="l2FilterChanged()" size="5"></th>
|
|
<th><span class="l2sort" onclick="l2SortBy('type')"><span data-i18n="l2_col_type">Type</span><span id="l2a_type" class="l2arrow"></span></span><br>
|
|
<input id="l2f_type" class="l2filter" oninput="l2FilterChanged()" size="8"></th>
|
|
<th data-i18n="l2_col_remove">Remove Entry</th></tr>
|
|
</table>
|
|
</div>
|
|
</body>
|
|
</html>
|