Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ <h2>Network Configuration</h2>
@if (!line.selfConnection) {
<line [attr.x1]="line.nodeX1" [attr.y1]="line.nodeY1" [attr.x2]="line.nodeX2" [attr.y2]="line.nodeY2"
[attr.stroke]="line.color" stroke-width="5"
class="animated-line-big" [class.broken-link]="line.unavailable"
class="animated-line-big" [class.broken-link]="line.unavailable" [class.degraded-link]="line.degraded"
[attr.marker-end]="line.hasArrow ? 'url(#arrow-' + line.id + ')' : null" />
}
}
Expand Down Expand Up @@ -262,6 +262,23 @@ <h2>Network Configuration</h2>
</g>
}
</g>

@if (nodeRuntimeStatuses().get(node.unit.id); as statuses) {
<g class="node-runtime-status-container"
[attr.transform]="'translate(' + NODE_BOTTOM_SIDE_X + ',' + (NODE_BOTTOM_Y -6) + ')'">
@for (status of statuses; track status; let i = $index) {
<g class="node-runtime-status" [class.offline]="status === 'OFFLINE'"
[class.jammed]="status === 'JAMMED'"
[class.degraded]="status === 'DEGRADED'"
[attr.transform]="'translate(0,' + (i * (NODE_STATUS_HEIGHT + 2)) + ')'">
<rect x="0" y="0" [attr.width]="NODE_BOTTOM_SIDE_WIDTH"
[attr.height]="NODE_STATUS_HEIGHT" />
<text [attr.x]="NODE_BOTTOM_SIDE_WIDTH / 2" [attr.y]="NODE_STATUS_HEIGHT / 2"
text-anchor="middle" dominant-baseline="central">{{ status }}</text>
</g>
}
</g>
}
</g>
}
</g>
Expand All @@ -273,7 +290,7 @@ <h2>Network Configuration</h2>
@for (line of connectionLines(); track line.id) {
<line [attr.x1]="line.x1" [attr.y1]="line.y1" [attr.x2]="line.x2" [attr.y2]="line.y2"
[attr.stroke]="line.color" stroke-width="3"
class="animated-line" [class.broken-link]="line.unavailable"
class="animated-line" [class.broken-link]="line.unavailable" [class.degraded-link]="line.degraded"
[attr.marker-end]="line.hasArrow ? 'url(#arrow-' + line.id + ')' : null" />
}

Expand All @@ -288,7 +305,7 @@ <h2>Network Configuration</h2>
@if (line.selfConnection) {
<line [attr.x1]="line.x1" [attr.y1]="line.y1" [attr.x2]="line.x2" [attr.y2]="line.y2"
[attr.stroke]="line.color" stroke-width="3"
class="animated-line" [class.broken-link]="line.unavailable"
class="animated-line" [class.broken-link]="line.unavailable" [class.degraded-link]="line.degraded"
[attr.marker-end]="line.hasArrow ? 'url(#arrow-' + line.id + ')' : null" />
}
}
Expand Down Expand Up @@ -322,6 +339,9 @@ <h3>Networks</h3>
@for (vm of sidebarNetworks(); track vm.network.id) {
<ng-container *ngTemplateOutlet="networkTemplate; context: { vm: vm, depth: 0 }"></ng-container>
}
@for (vm of emergencySidebarNetworks(); track 'emergency-' + vm.network.id) {
<ng-container *ngTemplateOutlet="networkTemplate; context: { vm: vm, depth: 0 }"></ng-container>
}

@if (networks().length === 0) {
<div class="no-networks">
Expand Down Expand Up @@ -376,7 +396,8 @@ <h3>Networks</h3>

<!-- Template for recursive network display -->
<ng-template #networkTemplate let-vm="vm" let-depth="depth">
<div class="network-item" [class.sub-network]="depth > 0" [style.--network-color]="vm.network.color">
<div class="network-item" [class.sub-network]="depth > 0" [class.emergency]="vm.displayName === 'EMERGENCY'"
[style.--network-color]="vm.displayColor">
@if (depth > 0) {
<div class="subnetwork-arrow" aria-hidden="true">
<svg width="14" height="8" viewBox="0 0 24 12" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
Expand All @@ -387,11 +408,11 @@ <h3>Networks</h3>
<div class="network-header">
<span class="network-type">
{{ vm.displayName }}
@if (showBvDetails() && depth === 0 && vm.networkTax !== undefined) {
@if (vm.showBv && showBvDetails() && depth === 0 && vm.networkTax !== undefined) {
<span class="network-tax">Tax: +{{ vm.networkTax }}</span>
}
</span>
@if (!data.readOnly) {
@if (vm.canRemoveNetwork) {
<button class="remove-btn" (click)="removeNetwork(vm.network)" title="Delete entire network"
[attr.aria-label]="'Delete ' + vm.displayName">
<svg width="12px" height="12px" fill="currentColor" viewBox="0 0 1200 1200" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><path d="M0,264.84L335.16,600L0,935.16L264.84,1200L600,864.84L935.16,1200
Expand Down Expand Up @@ -427,7 +448,7 @@ <h3>Networks</h3>
L1200,935.16L864.84,600L1200,264.84L935.16,0L600,335.16L264.84,0L0,264.84z"></path></svg></button>
}
</div>
@if (showBvDetails() && !member.isSelfConnection && member.baseBv !== undefined) {
@if (vm.showBv && showBvDetails() && !member.isSelfConnection && member.baseBv !== undefined) {
<div class="member-bv-details">
<span title="Base BV">BV: {{ member.baseBv }}</span>
@if (member.tagBv > 0) { <span title="Tag BV">+ {{ member.tagBv }}</span> }
Expand Down Expand Up @@ -465,7 +486,7 @@ <h3>Networks</h3>
L1200,935.16L864.84,600L1200,264.84L935.16,0L600,335.16L264.84,0L0,264.84z"></path></svg></button>
}
</div>
@if (showBvDetails() && !member.isSelfConnection && member.baseBv !== undefined) {
@if (vm.showBv && showBvDetails() && !member.isSelfConnection && member.baseBv !== undefined) {
<div class="member-bv-details">
<span title="Base BV">BV: {{ member.baseBv }}</span>
@if (member.tagBv > 0) { <span title="Tag BV">+ {{ member.tagBv }}</span> }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,62 @@
pointer-events: none;
}

.node-runtime-status-container {
pointer-events: none;
}

.node-runtime-status {
rect {
fill: rgba(95, 49, 0, 0.92);
stroke: #d78500;
stroke-width: 1;
}

text {
fill: #ffd45c;
font-size: 10px;
font-weight: 800;
letter-spacing: 0.08em;
paint-order: stroke;
stroke: #000;
stroke-width: 2px;
stroke-linejoin: round;
}

&.offline {
rect {
fill: #444;
stroke: #a0a0a0;
}

text {
fill: #fff;
}
}

&.jammed {
rect {
fill: rgb(155, 67, 140);
stroke: #ff6be6;
}

text {
fill: #fff;
}
}

&.degraded {
rect {
fill: rgb(155, 67, 140);
stroke: #ff6be6;
}

text {
fill: #fff;
}
}
}

.node-inner-ring {
fill: none;
stroke: rgba(255, 255, 255, 0.08);
Expand Down Expand Up @@ -434,6 +490,11 @@
animation: none;
stroke-width: 2;
}

&.degraded-link:not(.broken-link) {
stroke-dasharray: 12, 4;
animation: slow-dash-animation 2s linear infinite;
}
}

.animated-line-big {
Expand All @@ -444,6 +505,11 @@
animation: none;
stroke-width: 2.5;
}

&.degraded-link:not(.broken-link) {
stroke-dasharray: 40, 8;
animation: slow-dash-animation-big 2s linear infinite;
}
}

@keyframes dash-animation {
Expand All @@ -458,6 +524,17 @@
}
}

@keyframes slow-dash-animation {
to {
stroke-dashoffset: -16;
}
}

@keyframes slow-dash-animation-big {
to {
stroke-dashoffset: -48;
}
}
// ==================== Sidebar ====================

.networks-sidebar {
Expand Down Expand Up @@ -519,12 +596,26 @@
}

.network-item {
background: var(--network-item-bg, #2a2a2a);
background: #2a2a2a;
border: 1px solid var(--network-color, var(--border-color, #444));
border-left: 4px solid var(--network-color, var(--border-color, #444));
padding: 8px;
margin-bottom: 8px;

&.emergency {
background-image: repeating-linear-gradient(
45deg,
#000,
#000 20px,
#5a3f00 20px,
#5a3f00 40px
);

.network-type {
color: var(--bt-yellow);
}
}

&.sub-network {
position: relative;
background: rgba(0, 0, 0, 0.2);
Expand Down Expand Up @@ -594,7 +685,7 @@
.network-unit {
font-size: 0.7rem;
color: var(--text-secondary, #aaa);
background: var(--tag-bg, #333);
background: #333B;
padding: 3px 8px;
flex: 1;
min-width: 0; // Allow flex item to shrink below content size
Expand Down
Loading