feat: improve rack readability and add cable topology

This commit is contained in:
2026-07-22 09:41:03 +02:00
parent a967f88401
commit d8069edd73
4 changed files with 190 additions and 3 deletions
@@ -0,0 +1,72 @@
.rack-frame {
height: calc(var(--rack-units) * 22px);
max-height: none;
}
.rack-device {
padding: 2px 6px;
font-size: .78rem;
line-height: 1.15;
}
.rack-device:hover {
min-height: 2.8rem;
overflow: visible;
z-index: 3;
}
.rack-device:hover span { white-space: normal; }
.rack-topology {
position: relative;
min-height: 18rem;
overflow-x: auto;
padding: 1rem;
background: var(--tblr-bg-surface-secondary, rgba(127, 127, 127, .05));
}
.rack-topology-lines {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
pointer-events: none;
z-index: 1;
}
.rack-topology-columns {
position: relative;
z-index: 2;
display: flex;
align-items: flex-start;
justify-content: space-around;
gap: 5rem;
min-width: max-content;
}
.rack-topology-column {
display: flex;
flex-direction: column;
gap: .75rem;
width: 15rem;
}
.rack-topology-column h4 { text-align: center; font-size: .85rem; }
.rack-topology-node {
display: block;
padding: .55rem .75rem;
border: 2px solid var(--node-color);
border-radius: .35rem;
background: var(--tblr-bg-surface, #fff);
color: inherit;
text-decoration: none;
box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
}
.rack-topology-node:hover { color: inherit; filter: brightness(.95); }
.rack-topology-node strong,
.rack-topology-node small {
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.rack-topology-node small { opacity: .7; }
.rack-topology-edge {
fill: none;
stroke-width: 3;
opacity: .8;
pointer-events: stroke;
cursor: pointer;
}