Skip to content

Commit d3faf91

Browse files
committed
CM/ONT monitoring polish: colors, navigation, UX, cleanup
- ONT Device Monitoring naming (was External ONT) - Global 33-color palette with blue/green directional convention - 3 color sets for multi-device support - Per-device deep-linking from dashboard cards - Hide empty chart containers, show settings guidance - Extract gear.svg, fix visited link colors - Consistent 59 px card header min-height across tabs - DeviceCard links to Monitoring Devices tab - Remove inconsistent Device Status ingress/egress values - Official UniFi modem product names - Persist SFP modules card collapse state in localStorage
1 parent 93b1a1a commit d3faf91

14 files changed

Lines changed: 206 additions & 78 deletions

File tree

src/NetworkOptimizer.Web/Components/Pages/Audit.razor

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,7 @@
259259
{
260260
<span class="tooltip-wrapper">
261261
<a href="/settings#security-audit" class="tooltip-icon issue-settings-icon">
262-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor">
263-
<path fill-rule="evenodd" d="M7.84 1.804A1 1 0 018.82 1h2.36a1 1 0 01.98.804l.331 1.652a6.993 6.993 0 011.929 1.115l1.598-.54a1 1 0 011.186.447l1.18 2.044a1 1 0 01-.205 1.251l-1.267 1.113a7.047 7.047 0 010 2.228l1.267 1.113a1 1 0 01.206 1.25l-1.18 2.045a1 1 0 01-1.187.447l-1.598-.54a6.993 6.993 0 01-1.929 1.115l-.33 1.652a1 1 0 01-.98.804H8.82a1 1 0 01-.98-.804l-.331-1.652a6.993 6.993 0 01-1.929-1.115l-1.598.54a1 1 0 01-1.186-.447l-1.18-2.044a1 1 0 01.205-1.251l1.267-1.114a7.05 7.05 0 010-2.227L1.821 7.773a1 1 0 01-.206-1.25l1.18-2.045a1 1 0 011.187-.447l1.598.54A6.993 6.993 0 017.51 3.456l.33-1.652zM10 13a3 3 0 100-6 3 3 0 000 6z" clip-rule="evenodd" />
264-
</svg>
262+
<img src="/images/gear.svg" alt="" style="width:16px;height:16px;" />
265263
</a>
266264
<span class="tooltip-content">
267265
@if (issue.ConfigurableSetting?.StartsWith("Configure") == true || issue.ConfigurableSetting?.Contains("Settings") == true)
@@ -341,9 +339,7 @@
341339
{
342340
<span class="tooltip-wrapper">
343341
<a href="/settings#security-audit" class="tooltip-icon issue-settings-icon" @onclick:stopPropagation="true">
344-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor">
345-
<path fill-rule="evenodd" d="M7.84 1.804A1 1 0 018.82 1h2.36a1 1 0 01.98.804l.331 1.652a6.993 6.993 0 011.929 1.115l1.598-.54a1 1 0 011.186.447l1.18 2.044a1 1 0 01-.205 1.251l-1.267 1.113a7.047 7.047 0 010 2.228l1.267 1.113a1 1 0 01.206 1.25l-1.18 2.045a1 1 0 01-1.187.447l-1.598-.54a6.993 6.993 0 01-1.929 1.115l-.33 1.652a1 1 0 01-.98.804H8.82a1 1 0 01-.98-.804l-.331-1.652a6.993 6.993 0 01-1.929-1.115l-1.598.54a1 1 0 01-1.186-.447l-1.18-2.044a1 1 0 01.205-1.251l1.267-1.114a7.05 7.05 0 010-2.227L1.821 7.773a1 1 0 01-.206-1.25l1.18-2.045a1 1 0 011.187-.447l1.598.54A6.993 6.993 0 017.51 3.456l.33-1.652zM10 13a3 3 0 100-6 3 3 0 000 6z" clip-rule="evenodd" />
346-
</svg>
342+
<img src="/images/gear.svg" alt="" style="width:16px;height:16px;" />
347343
</a>
348344
<span class="tooltip-content">
349345
@if (firstIssue.ConfigurableSetting?.StartsWith("Configure") == true || firstIssue.ConfigurableSetting?.Contains("Settings") == true)
@@ -552,9 +548,7 @@
552548
{
553549
<span class="tooltip-wrapper" style="margin-left: 0.4rem;">
554550
<a href="/settings#security-audit" class="tooltip-icon tooltip-icon-sm">
555-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor">
556-
<path fill-rule="evenodd" d="M7.84 1.804A1 1 0 018.82 1h2.36a1 1 0 01.98.804l.331 1.652a6.993 6.993 0 011.929 1.115l1.598-.54a1 1 0 011.186.447l1.18 2.044a1 1 0 01-.205 1.251l-1.267 1.113a7.047 7.047 0 010 2.228l1.267 1.113a1 1 0 01.206 1.25l-1.18 2.045a1 1 0 01-1.187.447l-1.598-.54a6.993 6.993 0 01-1.929 1.115l-.33 1.652a1 1 0 01-.98.804H8.82a1 1 0 01-.98-.804l-.331-1.652a6.993 6.993 0 01-1.929-1.115l-1.598.54a1 1 0 01-1.186-.447l-1.18-2.044a1 1 0 01.205-1.251l1.267-1.114a7.05 7.05 0 010-2.227L1.821 7.773a1 1 0 01-.206-1.25l1.18-2.045a1 1 0 011.187-.447l1.598.54A6.993 6.993 0 017.51 3.456l.33-1.652zM10 13a3 3 0 100-6 3 3 0 000 6z" clip-rule="evenodd" />
557-
</svg>
551+
<img src="/images/gear.svg" alt="" style="width:16px;height:16px;" />
558552
</a>
559553
<span class="tooltip-content">
560554
<strong>Settings Hint</strong><br/>

src/NetworkOptimizer.Web/Components/Pages/ClientWanSpeedTest.razor

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,7 @@
6767
<span class="badge badge-wan">@_selectedServer.Name</span>
6868
}
6969
<a href="/settings#external-speedtest-settings" class="tooltip-icon settings-link" data-tooltip="Server settings">
70-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor">
71-
<path fill-rule="evenodd" d="M7.84 1.804A1 1 0 018.82 1h2.36a1 1 0 01.98.804l.331 1.652a6.993 6.993 0 011.929 1.115l1.598-.54a1 1 0 011.186.447l1.18 2.044a1 1 0 01-.205 1.251l-1.267 1.113a7.047 7.047 0 010 2.228l1.267 1.113a1 1 0 01.206 1.25l-1.18 2.045a1 1 0 01-1.187.447l-1.598-.54a6.993 6.993 0 01-1.929 1.115l-.33 1.652a1 1 0 01-.98.804H8.82a1 1 0 01-.98-.804l-.331-1.652a6.993 6.993 0 01-1.929-1.115l-1.598.54a1 1 0 01-1.186-.447l-1.18-2.044a1 1 0 01.205-1.251l1.267-1.114a7.05 7.05 0 010-2.227L1.821 7.773a1 1 0 01-.206-1.25l1.18-2.045a1 1 0 011.187-.447l1.598.54A6.993 6.993 0 017.51 3.456l.33-1.652zM10 13a3 3 0 100-6 3 3 0 000 6z" clip-rule="evenodd" />
72-
</svg>
70+
<img src="/images/gear.svg" alt="" style="width:16px;height:16px;" />
7371
</a>
7472
</div>
7573
<p>

src/NetworkOptimizer.Web/Components/Pages/Dashboard.razor

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@
186186
private bool _editMode;
187187
private OntStatsPanel? _ontPanel;
188188
private CellularStatsPanel? _cellularPanel;
189+
private CmStatsPanel? _cmPanel;
189190
private DashboardLayout? _layout;
190191
private int deviceCount = 0;
191192
private int securityScore = 0;
@@ -548,7 +549,7 @@
548549
<h2 class="card-title">Cable Modem Stats (DOCSIS)</h2>
549550
</div>
550551
<div class="card-body">
551-
<CmStatsPanel />
552+
<CmStatsPanel @ref="_cmPanel" />
552553
</div>
553554
</div>
554555
};
@@ -1142,14 +1143,18 @@
11421143
{
11431144
if (_ontPanel?.IsCurrentExternal == true)
11441145
{
1145-
NavigationManager.NavigateTo("/monitoring?tab=ont");
1146+
var ontId = _ontPanel.CurrentExternalOntId;
1147+
var url = ontId != null
1148+
? $"/monitoring?tab=ont&ont={Uri.EscapeDataString(ontId)}"
1149+
: "/monitoring?tab=ont";
1150+
NavigationManager.NavigateTo(url);
11461151
return;
11471152
}
11481153
var key = _ontPanel?.CurrentModuleKey;
1149-
var url = key != null
1154+
var url2 = key != null
11501155
? $"/monitoring?tab=sfp&sfp={Uri.EscapeDataString(key)}"
11511156
: "/monitoring?tab=sfp";
1152-
NavigationManager.NavigateTo(url);
1157+
NavigationManager.NavigateTo(url2);
11531158
}
11541159

11551160
private void NavigateToCellularChart()
@@ -1163,7 +1168,11 @@
11631168

11641169
private void NavigateToCmChart()
11651170
{
1166-
NavigationManager.NavigateTo("/monitoring?tab=cm");
1171+
var cmId = _cmPanel?.CurrentCmId;
1172+
var url = cmId != null
1173+
? $"/monitoring?tab=cm&cm={Uri.EscapeDataString(cmId)}"
1174+
: "/monitoring?tab=cm";
1175+
NavigationManager.NavigateTo(url);
11671176
}
11681177

11691178
}

0 commit comments

Comments
 (0)