initial commit
This commit is contained in:
commit
0eb9b55717
11 changed files with 3969 additions and 0 deletions
213
renderer/app.css
Normal file
213
renderer/app.css
Normal file
|
|
@ -0,0 +1,213 @@
|
|||
/* Simple, dense, operator-oriented UI.
|
||||
No framework — just hand-tuned CSS. */
|
||||
|
||||
:root {
|
||||
--bg: #0e1116;
|
||||
--bg-elev: #161b22;
|
||||
--bg-elev-2: #1f2630;
|
||||
--fg: #e7edf3;
|
||||
--fg-dim: #8a94a3;
|
||||
--border: #2a313c;
|
||||
--accent: #3ea6ff;
|
||||
--accent-hover: #65baff;
|
||||
--ok: #3fb950;
|
||||
--warn: #d29922;
|
||||
--danger: #f85149;
|
||||
--danger-hover: #ff6a62;
|
||||
--info: #58a6ff;
|
||||
--mono: "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
|
||||
html, body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
height: 100%;
|
||||
background: var(--bg);
|
||||
color: var(--fg);
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||||
font-size: 13px;
|
||||
line-height: 1.45;
|
||||
}
|
||||
|
||||
code { font-family: var(--mono); background: var(--bg-elev-2); padding: 1px 4px; border-radius: 3px; font-size: 12px; }
|
||||
.muted { color: var(--fg-dim); }
|
||||
.small { font-size: 12px; }
|
||||
.hidden { display: none !important; }
|
||||
.error { color: var(--danger); }
|
||||
.row { display: flex; gap: 8px; align-items: center; }
|
||||
.inline { display: inline-flex; align-items: center; gap: 6px; }
|
||||
|
||||
.topbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
padding: 10px 16px;
|
||||
background: var(--bg-elev);
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
.topbar .brand { font-weight: 600; letter-spacing: 0.3px; }
|
||||
.topbar .session { margin-left: auto; color: var(--fg-dim); font-family: var(--mono); font-size: 12px; }
|
||||
|
||||
.view { display: flex; gap: 0; height: calc(100vh - 45px); }
|
||||
#view-login { justify-content: center; align-items: flex-start; padding-top: 60px; }
|
||||
|
||||
.card {
|
||||
background: var(--bg-elev);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 8px;
|
||||
padding: 24px;
|
||||
width: 440px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
}
|
||||
.card h1 { margin: 0 0 4px; font-size: 18px; }
|
||||
.card p { margin: 0 0 8px; }
|
||||
|
||||
label {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
color: var(--fg-dim);
|
||||
font-size: 12px;
|
||||
}
|
||||
label.inline { flex-direction: row; align-items: center; gap: 6px; color: var(--fg); }
|
||||
|
||||
input[type="text"], input[type="password"], input[type="url"],
|
||||
input[type="number"], input[type="search"], input[type="datetime-local"],
|
||||
select {
|
||||
background: var(--bg-elev-2);
|
||||
border: 1px solid var(--border);
|
||||
color: var(--fg);
|
||||
padding: 7px 9px;
|
||||
border-radius: 4px;
|
||||
font-size: 13px;
|
||||
font-family: inherit;
|
||||
outline: none;
|
||||
}
|
||||
input:focus, select:focus { border-color: var(--accent); }
|
||||
|
||||
button {
|
||||
font-family: inherit;
|
||||
font-size: 13px;
|
||||
padding: 7px 14px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid var(--border);
|
||||
background: var(--bg-elev-2);
|
||||
color: var(--fg);
|
||||
cursor: pointer;
|
||||
}
|
||||
button:hover:not(:disabled) { border-color: var(--accent); }
|
||||
button:disabled { opacity: 0.5; cursor: not-allowed; }
|
||||
button.primary { background: var(--accent); color: #001828; border-color: var(--accent); font-weight: 600; }
|
||||
button.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
|
||||
button.ghost { background: transparent; }
|
||||
button.danger { background: var(--danger); color: #fff; border-color: var(--danger); font-weight: 600; }
|
||||
button.danger:hover:not(:disabled) { background: var(--danger-hover); border-color: var(--danger-hover); }
|
||||
|
||||
.panel-left {
|
||||
width: 320px;
|
||||
padding: 16px;
|
||||
border-right: 1px solid var(--border);
|
||||
background: var(--bg-elev);
|
||||
overflow-y: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
.panel-left h2 { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--fg-dim); margin: 12px 0 0; }
|
||||
.panel-left h2:first-child { margin-top: 0; }
|
||||
|
||||
.panel-main {
|
||||
flex: 1;
|
||||
padding: 16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.panel-main h2 { margin: 0; font-size: 15px; }
|
||||
.fleet-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
|
||||
|
||||
.selected-summary {
|
||||
background: var(--bg-elev-2);
|
||||
padding: 8px 10px;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.fleet-table-wrap {
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 4px;
|
||||
}
|
||||
.fleet-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 12px;
|
||||
}
|
||||
.fleet-table thead th {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
background: var(--bg-elev);
|
||||
text-align: left;
|
||||
padding: 8px 10px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
font-weight: 600;
|
||||
z-index: 1;
|
||||
}
|
||||
.fleet-table tbody td {
|
||||
padding: 6px 10px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
font-family: var(--mono);
|
||||
font-size: 12px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 320px;
|
||||
}
|
||||
.fleet-table tbody tr:hover { background: var(--bg-elev-2); }
|
||||
.fleet-table tbody tr.selected { background: rgba(62, 166, 255, 0.12); }
|
||||
|
||||
.status-ok { color: var(--ok); }
|
||||
.status-warn { color: var(--warn); }
|
||||
.status-err { color: var(--danger); }
|
||||
.status-info { color: var(--info); }
|
||||
.status-pending { color: var(--fg-dim); }
|
||||
|
||||
/* Compact FEC counter readout under the health pill in the preview
|
||||
table. Each line is "tail=value" so the operator can correlate with
|
||||
the same names used by the PON Manager UI (Pre-FEC BER etc.). */
|
||||
.fec-cell { white-space: normal; max-width: 280px; }
|
||||
|
||||
/* Verify-view table cells contain stacked before/after blocks; let
|
||||
them wrap and align to the top so before/after lines line up. */
|
||||
#verify-table tbody td { white-space: normal; vertical-align: top; }
|
||||
#verify-table .delta-arrow { color: var(--fg-dim); font-size: 11px; }
|
||||
#verify-table .before-line, #verify-table .after-line { display: block; }
|
||||
#verify-table .before-line { color: var(--fg-dim); font-size: 11px; }
|
||||
.fec-pill { font-weight: 600; }
|
||||
.fec-counters {
|
||||
display: block;
|
||||
margin-top: 3px;
|
||||
color: var(--fg-dim);
|
||||
font-family: var(--mono);
|
||||
font-size: 11px;
|
||||
line-height: 1.35;
|
||||
}
|
||||
.fec-counters .pre { color: var(--warn); }
|
||||
.fec-counters .post { color: var(--danger); }
|
||||
.fec-counters .ok { color: var(--fg-dim); }
|
||||
|
||||
.slot-arrow {
|
||||
display: inline-block;
|
||||
padding: 1px 6px;
|
||||
border-radius: 3px;
|
||||
background: var(--bg-elev-2);
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
1282
renderer/app.js
Normal file
1282
renderer/app.js
Normal file
File diff suppressed because it is too large
Load diff
251
renderer/index.html
Normal file
251
renderer/index.html
Normal file
|
|
@ -0,0 +1,251 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>PON Fleet Upgrader</title>
|
||||
<link rel="stylesheet" href="app.css" />
|
||||
</head>
|
||||
<body>
|
||||
<header class="topbar">
|
||||
<div class="brand">PON Fleet Upgrader</div>
|
||||
<div class="session" id="session-label">Not connected</div>
|
||||
<button id="btn-logout" class="ghost hidden">Disconnect</button>
|
||||
</header>
|
||||
|
||||
<!-- ================= Login view ================= -->
|
||||
<section id="view-login" class="view">
|
||||
<div class="card">
|
||||
<h1>Connect to MCMS</h1>
|
||||
<p class="muted">
|
||||
Session-cookie auth against a Ciena MicroClimate Management System.
|
||||
The host should be the root URL of the PON Manager web UI
|
||||
(e.g. <code>https://mcms.example.net</code>).
|
||||
</p>
|
||||
<label>Host URL<input id="in-host" type="url" placeholder="https://mcms.example.net" /></label>
|
||||
<label>Email / username<input id="in-user" type="text" autocomplete="username" /></label>
|
||||
<label>Password<input id="in-pass" type="password" autocomplete="current-password" /></label>
|
||||
<label class="inline">
|
||||
<input id="in-self-signed" type="checkbox" checked />
|
||||
Accept self-signed TLS certificate
|
||||
</label>
|
||||
<div class="row">
|
||||
<button id="btn-login" class="primary">Connect</button>
|
||||
<span id="login-error" class="error"></span>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- ================= Fleet view ================= -->
|
||||
<section id="view-fleet" class="view hidden">
|
||||
<div class="panel-left">
|
||||
<h2>Filters</h2>
|
||||
<label>Name / address contains
|
||||
<input id="filter-text" type="search" placeholder="e.g. ORKANGER" />
|
||||
</label>
|
||||
<label>Equipment ID contains
|
||||
<input id="filter-equipment" type="text" placeholder="e.g. FT-XGS2110" />
|
||||
</label>
|
||||
<label>PON mode
|
||||
<select id="filter-pon">
|
||||
<option value="">Any</option>
|
||||
<option value="GPON">GPON</option>
|
||||
<option value="XGS-PON">XGS-PON</option>
|
||||
<option value="10G-EPON">10G-EPON</option>
|
||||
</select>
|
||||
</label>
|
||||
<label>Active version matches
|
||||
<input id="filter-version" type="text" placeholder="e.g. EV05110R" />
|
||||
</label>
|
||||
<label>Exclude active version
|
||||
<input id="filter-exclude-version" type="text" placeholder="e.g. EV05120R (hide already-upgraded)" />
|
||||
</label>
|
||||
<label>Model / version family
|
||||
<input id="filter-model" type="text" placeholder="e.g. EV051 (Interos Everest 5.11.x)" />
|
||||
</label>
|
||||
<label>Registration status
|
||||
<select id="filter-status">
|
||||
<option value="">Any</option>
|
||||
<option value="__down__">Down (Deregistered / Dying Gasp / Disabled)</option>
|
||||
<option value="Registered">Registered</option>
|
||||
<option value="Deregistered">Deregistered</option>
|
||||
<option value="Dying Gasp">Dying Gasp</option>
|
||||
<option value="Disabled">Disabled</option>
|
||||
<option value="Disallowed Admin">Disallowed Admin</option>
|
||||
<option value="Disallowed Error">Disallowed Error</option>
|
||||
<option value="Disallowed Reg ID">Disallowed Reg ID</option>
|
||||
<option value="Unspecified">Unspecified</option>
|
||||
<option value="Unprovisioned">Unprovisioned</option>
|
||||
<option value="__unknown__">Unknown (no OLT state)</option>
|
||||
</select>
|
||||
</label>
|
||||
<label>Down for at least (days)
|
||||
<input id="filter-down-days" type="number" min="0" step="1" placeholder="e.g. 30" />
|
||||
</label>
|
||||
<button id="btn-refresh" class="primary">Load fleet</button>
|
||||
<p class="muted small" id="fleet-status"></p>
|
||||
|
||||
<h2>Selection</h2>
|
||||
<div class="selected-summary">
|
||||
<div><strong id="sel-count">0</strong> ONUs selected</div>
|
||||
<div class="row">
|
||||
<button id="btn-select-all">Select all matching</button>
|
||||
<button id="btn-select-none" class="ghost">Clear</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button id="btn-to-campaign" class="primary" disabled>Continue to upgrade →</button>
|
||||
<button id="btn-delete-selected" class="danger" disabled>Delete selected from MCMS…</button>
|
||||
<p class="muted small" id="delete-status"></p>
|
||||
|
||||
<h2>After-upgrade verification</h2>
|
||||
<p class="muted small">Open a saved <code>pon-upgrade-*.csv</code> to compare the recorded FEC + optical readings against the current state of those ONUs.</p>
|
||||
<button id="btn-to-verify" class="ghost">Verify previous upgrade…</button>
|
||||
</div>
|
||||
|
||||
<div class="panel-main">
|
||||
<div class="fleet-head">
|
||||
<h2>Fleet (<span id="fleet-count">0</span>)</h2>
|
||||
<div class="row small muted">
|
||||
<span>Tip: use filters to narrow to one model before selecting all.</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fleet-table-wrap">
|
||||
<table class="fleet-table" id="fleet-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" id="th-check" /></th>
|
||||
<th>Serial</th>
|
||||
<th>Name / address</th>
|
||||
<th>Equipment ID</th>
|
||||
<th>PON</th>
|
||||
<th>Status</th>
|
||||
<th>Last seen</th>
|
||||
<th>Active bank</th>
|
||||
<th>Active version</th>
|
||||
<th>Inactive version</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="fleet-tbody"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- ================= Upgrade campaign view ================= -->
|
||||
<section id="view-campaign" class="view hidden">
|
||||
<div class="panel-left">
|
||||
<h2>Campaign</h2>
|
||||
<label>Target firmware file
|
||||
<select id="fw-select"></select>
|
||||
</label>
|
||||
<label>Target version
|
||||
<input id="fw-version" type="text" placeholder="e.g. EV05120R" />
|
||||
</label>
|
||||
<div class="row">
|
||||
<button id="btn-upload-fw" class="ghost">Upload .bin…</button>
|
||||
<button id="btn-reload-fw" class="ghost">Refresh list</button>
|
||||
</div>
|
||||
|
||||
<h2>Execution</h2>
|
||||
<label>Mode
|
||||
<select id="mode-select">
|
||||
<option value="task">Bulk task (Procedure 8, recommended)</option>
|
||||
<option value="peronu">Per-ONU PUT (Procedure 7)</option>
|
||||
</select>
|
||||
</label>
|
||||
<label id="row-schedule">Scheduled start (UTC)
|
||||
<input id="in-schedule" type="datetime-local" />
|
||||
</label>
|
||||
<p class="muted small">
|
||||
Writes always go to the inactive bank (FW Bank Ptr toggled to <code>1 − active</code>, or <code>1</code> if unset).
|
||||
MCMS flips the pointer when the download completes; the ONU reboots into the new image on its next reboot.
|
||||
</p>
|
||||
|
||||
<div class="row">
|
||||
<button id="btn-back" class="ghost">← Back to fleet</button>
|
||||
<button id="btn-preview" class="primary">Preview plan</button>
|
||||
</div>
|
||||
<div class="row">
|
||||
<button id="btn-execute" class="danger" disabled>Execute upgrade</button>
|
||||
</div>
|
||||
<p id="exec-status" class="small muted"></p>
|
||||
</div>
|
||||
|
||||
<div class="panel-main">
|
||||
<h2>Dry-run preview</h2>
|
||||
<p class="muted small">Nothing has been written yet. Review the plan before clicking Execute.</p>
|
||||
<div class="fleet-table-wrap">
|
||||
<table class="fleet-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Serial</th>
|
||||
<th>Name</th>
|
||||
<th>Active → new active slot</th>
|
||||
<th>Current slot 0</th>
|
||||
<th>Current slot 1</th>
|
||||
<th>Target version</th>
|
||||
<th>FEC health</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="preview-tbody"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- ================= Verify view ================= -->
|
||||
<section id="view-verify" class="view hidden">
|
||||
<div class="panel-left">
|
||||
<h2>Verify previous upgrade</h2>
|
||||
<p class="muted small">
|
||||
Pick a saved upgrade-plan CSV (defaults to <code>~/Downloads</code>).
|
||||
The app re-fetches each ONU's current FEC counters, optical levels,
|
||||
and active firmware version, then computes a before/after comparison
|
||||
and saves a verification CSV alongside the original.
|
||||
</p>
|
||||
<button id="btn-pick-plan" class="primary">Open plan CSV…</button>
|
||||
<p class="muted small" id="verify-status"></p>
|
||||
|
||||
<h2>Summary</h2>
|
||||
<div class="selected-summary" id="verify-summary">
|
||||
<div class="muted small">Open a CSV to start.</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<button id="btn-verify-back" class="ghost">← Back to fleet</button>
|
||||
<button id="btn-save-verify" class="primary" disabled>Re-save report</button>
|
||||
</div>
|
||||
<p id="verify-save-status" class="small muted"></p>
|
||||
</div>
|
||||
|
||||
<div class="panel-main">
|
||||
<div class="fleet-head">
|
||||
<h2>Comparison (<span id="verify-count">0</span>)</h2>
|
||||
<div class="row small muted">
|
||||
<span>Note: ONU FEC counters typically reset on the upgrade reboot, so "after < before" is normal. Look at the FEC flag and verdict columns for the actual signal.</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fleet-table-wrap">
|
||||
<table class="fleet-table" id="verify-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Serial</th>
|
||||
<th>Name</th>
|
||||
<th>Target → Active now</th>
|
||||
<th>Applied?</th>
|
||||
<th>FEC before</th>
|
||||
<th>FEC now</th>
|
||||
<th>Optical (RX/TX dBm)</th>
|
||||
<th>Verdict</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="verify-tbody"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script src="app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue