Replace Probe pages with directed Agent links, shared deployment controls and unified display data. Add node dragging, canvas pan and zoom, saved layouts, and per-direction link controls.
596 lines
9.7 KiB
CSS
596 lines
9.7 KiB
CSS
/* 管理端:左侧导航 + 内容区(M3 风格:选中项是胶囊,内容区是圆角卡片) */
|
|
.shell {
|
|
display: grid;
|
|
grid-template-columns: 248px minmax(0, 1fr);
|
|
min-height: 100%;
|
|
}
|
|
|
|
.side {
|
|
position: sticky;
|
|
top: 0;
|
|
height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
padding: 16px 12px;
|
|
background: var(--app-card-inset);
|
|
overflow: auto;
|
|
}
|
|
|
|
.runtime-logs {
|
|
display: grid;
|
|
gap: 1px;
|
|
max-height: 520px;
|
|
overflow: auto;
|
|
border-radius: var(--r-card);
|
|
background: var(--app-outline-soft);
|
|
}
|
|
|
|
.runtime-log {
|
|
display: grid;
|
|
grid-template-columns: 150px auto minmax(0, 1fr);
|
|
align-items: start;
|
|
gap: 10px;
|
|
padding: 9px 10px;
|
|
background: var(--app-card);
|
|
font-size: 13px;
|
|
}
|
|
|
|
.runtime-log-message {
|
|
min-width: 0;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
.runtime-log-fields {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 4px 10px;
|
|
margin-top: 4px;
|
|
color: var(--app-ink-muted);
|
|
font-size: 11px;
|
|
}
|
|
|
|
.runtime-log-fields b {
|
|
color: var(--app-ink-faint);
|
|
font-weight: 500;
|
|
}
|
|
|
|
@media (max-width: 700px) {
|
|
.runtime-log {
|
|
grid-template-columns: 1fr auto;
|
|
}
|
|
|
|
.runtime-log-message {
|
|
grid-column: 1 / -1;
|
|
}
|
|
}
|
|
|
|
.side .brand {
|
|
padding: 8px 14px 16px;
|
|
font-size: 18px;
|
|
font-weight: 700;
|
|
color: var(--app-ink);
|
|
display: block;
|
|
}
|
|
|
|
.side .brand:hover {
|
|
text-decoration: none;
|
|
}
|
|
|
|
.side .section {
|
|
padding: 16px 14px 4px;
|
|
font-size: 12px;
|
|
color: var(--app-ink-faint);
|
|
}
|
|
|
|
.side a.nav {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
height: 44px;
|
|
padding: 0 14px;
|
|
border-radius: var(--r-pill);
|
|
color: var(--app-ink);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.side a.nav:hover {
|
|
text-decoration: none;
|
|
background: color-mix(in srgb, var(--app-ink), transparent calc((1 - var(--state-hover)) * 100%));
|
|
}
|
|
|
|
.side a.nav.active {
|
|
background: var(--app-accent-container);
|
|
color: var(--app-on-accent-container);
|
|
}
|
|
|
|
.side .spacer {
|
|
flex: 1;
|
|
}
|
|
|
|
.me {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 10px 12px;
|
|
border-radius: var(--r-card);
|
|
background: var(--app-card);
|
|
}
|
|
|
|
/* 用户名太长时省略,不要和右边的按钮叠在一起 */
|
|
.me {
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.me .grow {
|
|
flex: 1 1 100px;
|
|
min-width: 0;
|
|
}
|
|
|
|
.me .grow > div {
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.me .btn,
|
|
.me .avatar {
|
|
flex: none;
|
|
}
|
|
|
|
.avatar {
|
|
width: 32px;
|
|
height: 32px;
|
|
border-radius: 50%;
|
|
background: var(--app-accent);
|
|
color: var(--app-card);
|
|
display: grid;
|
|
place-items: center;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.main {
|
|
padding: 24px 32px 64px;
|
|
min-width: 0;
|
|
}
|
|
|
|
.main > header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
margin-bottom: 24px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.main > header h1 {
|
|
font-size: 24px;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.login {
|
|
min-height: 100%;
|
|
display: grid;
|
|
place-items: center;
|
|
padding: 24px;
|
|
}
|
|
|
|
.login .card {
|
|
width: min(400px, 100%);
|
|
padding: 32px;
|
|
}
|
|
|
|
.login h1 {
|
|
font-size: 28px;
|
|
font-weight: 800;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.kv {
|
|
display: grid;
|
|
grid-template-columns: 140px minmax(0, 1fr);
|
|
gap: 8px 16px;
|
|
}
|
|
|
|
.kv dt {
|
|
color: var(--app-ink-faint);
|
|
}
|
|
|
|
.kv dd {
|
|
margin: 0;
|
|
min-width: 0;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
.tags {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 6px;
|
|
}
|
|
|
|
.form-grid {
|
|
display: grid;
|
|
gap: 16px;
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
}
|
|
|
|
.form-grid .wide {
|
|
grid-column: 1 / -1;
|
|
}
|
|
|
|
.switch {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.switch input {
|
|
accent-color: var(--app-accent);
|
|
width: 18px;
|
|
height: 18px;
|
|
}
|
|
|
|
.test-status {
|
|
text-transform: none;
|
|
}
|
|
|
|
@media (max-width: 900px) {
|
|
.shell {
|
|
grid-template-columns: minmax(0, 1fr);
|
|
}
|
|
|
|
.side {
|
|
position: static;
|
|
height: auto;
|
|
flex-direction: row;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
}
|
|
|
|
.side .section,
|
|
.side .spacer,
|
|
.me .grow {
|
|
display: none;
|
|
}
|
|
|
|
.main {
|
|
padding: 16px;
|
|
}
|
|
|
|
.form-grid {
|
|
grid-template-columns: minmax(0, 1fr);
|
|
}
|
|
}
|
|
|
|
/* 登录页:左边选后端,右边输入凭据 */
|
|
.login .card.login-split {
|
|
width: min(760px, 100%);
|
|
padding: 0;
|
|
display: grid;
|
|
grid-template-columns: 260px minmax(0, 1fr);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.login-side {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 24px;
|
|
padding: 32px 24px;
|
|
background: var(--app-card-inset);
|
|
}
|
|
|
|
.login-main {
|
|
padding: 32px;
|
|
align-content: start;
|
|
}
|
|
|
|
.login-main h2 {
|
|
font-size: 18px;
|
|
font-weight: 700;
|
|
word-break: break-all;
|
|
}
|
|
|
|
@media (max-width: 640px) {
|
|
.login .card.login-split {
|
|
grid-template-columns: minmax(0, 1fr);
|
|
}
|
|
|
|
.login-side {
|
|
padding: 24px;
|
|
}
|
|
|
|
.login-main {
|
|
padding: 24px;
|
|
}
|
|
}
|
|
|
|
/* Agent 节点画板:节点使用世界坐标,缩放和平移只作用于画板内容。 */
|
|
.link-board-layout {
|
|
display: grid;
|
|
grid-template-columns: minmax(0, 1fr) 284px;
|
|
gap: 16px;
|
|
}
|
|
|
|
.link-board {
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
border: 1px solid var(--app-outline-soft);
|
|
border-radius: 20px;
|
|
background: var(--app-bg);
|
|
}
|
|
|
|
.link-board-tools {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
flex-wrap: wrap;
|
|
gap: 10px;
|
|
padding: 12px 16px;
|
|
border-bottom: 1px solid var(--app-outline-soft);
|
|
background: var(--app-card);
|
|
font-size: 12px;
|
|
}
|
|
|
|
.link-board-scale {
|
|
min-width: 42px;
|
|
text-align: center;
|
|
font-variant-numeric: tabular-nums;
|
|
color: var(--app-ink-muted);
|
|
}
|
|
|
|
.link-board-viewport {
|
|
position: relative;
|
|
height: clamp(440px, calc(100dvh - 230px), 1000px);
|
|
overflow: hidden;
|
|
cursor: grab;
|
|
touch-action: none;
|
|
user-select: none;
|
|
background-image: radial-gradient(var(--app-outline) 1px, transparent 1px);
|
|
background-size: 22px 22px;
|
|
}
|
|
|
|
.link-board-viewport.dragging,
|
|
.link-board-viewport.dragging .link-board-node {
|
|
cursor: grabbing;
|
|
}
|
|
|
|
.link-board-world {
|
|
position: absolute;
|
|
width: 1px;
|
|
height: 1px;
|
|
transform-origin: 0 0;
|
|
}
|
|
|
|
.link-board-edges {
|
|
position: absolute;
|
|
overflow: visible;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.link-board-edge {
|
|
cursor: pointer;
|
|
outline: none;
|
|
pointer-events: visiblePainted;
|
|
color: var(--app-ink-faint);
|
|
}
|
|
|
|
.link-board-edge.connected,
|
|
.link-board-legend .connected {
|
|
color: var(--app-ok);
|
|
}
|
|
|
|
.link-board-edge.pending,
|
|
.link-board-legend .pending {
|
|
color: var(--app-warn);
|
|
}
|
|
|
|
.link-board-edge.selected,
|
|
.link-board-edge:focus-visible {
|
|
color: var(--app-accent);
|
|
}
|
|
|
|
.link-board-edge-line {
|
|
stroke: currentColor;
|
|
stroke-width: 2;
|
|
fill: none;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.link-board-edge.disabled .link-board-edge-line {
|
|
stroke-dasharray: 6 6;
|
|
}
|
|
|
|
.link-board-edge.selected .link-board-edge-line,
|
|
.link-board-edge:hover .link-board-edge-line,
|
|
.link-board-edge:focus-visible .link-board-edge-line {
|
|
stroke-width: 3;
|
|
}
|
|
|
|
.link-board-edge-hit {
|
|
stroke: transparent;
|
|
stroke-width: 22;
|
|
fill: none;
|
|
pointer-events: stroke;
|
|
}
|
|
|
|
.link-board-arrow.connected {
|
|
fill: var(--app-ok);
|
|
}
|
|
|
|
.link-board-arrow.pending {
|
|
fill: var(--app-warn);
|
|
}
|
|
|
|
.link-board-arrow.disabled {
|
|
fill: var(--app-ink-faint);
|
|
}
|
|
|
|
.link-board-arrow.selected {
|
|
fill: var(--app-accent);
|
|
}
|
|
|
|
.link-board-edge-label rect {
|
|
fill: var(--app-card);
|
|
stroke: var(--app-outline-soft);
|
|
}
|
|
|
|
.link-board-edge.selected .link-board-edge-label rect,
|
|
.link-board-edge:focus-visible .link-board-edge-label rect {
|
|
fill: var(--app-accent-container);
|
|
stroke: var(--app-accent);
|
|
}
|
|
|
|
.link-board-edge-label text {
|
|
fill: currentColor;
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.link-board-node {
|
|
position: absolute;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
width: 216px;
|
|
height: 108px;
|
|
padding: 14px 16px;
|
|
border: 1px solid var(--app-outline);
|
|
border-radius: 18px;
|
|
background: var(--app-card);
|
|
box-shadow: 0 5px 18px color-mix(in srgb, var(--app-shadow) 7%, transparent);
|
|
cursor: grab;
|
|
}
|
|
|
|
.link-board-node:focus-visible {
|
|
outline: 2px solid var(--app-accent);
|
|
outline-offset: 4px;
|
|
}
|
|
|
|
.link-board-node.offline {
|
|
border-style: dashed;
|
|
}
|
|
|
|
.link-board-node-head {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.link-board-node-head > svg {
|
|
flex-shrink: 0;
|
|
color: var(--app-accent);
|
|
}
|
|
|
|
.link-board-node-head strong {
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.link-board-detail {
|
|
margin-left: auto;
|
|
flex-shrink: 0;
|
|
font-size: 12px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.link-board-node-counts {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
gap: 8px;
|
|
color: var(--app-ink-muted);
|
|
font-size: 11px;
|
|
}
|
|
|
|
.link-board-node-counts b {
|
|
color: var(--app-ink);
|
|
}
|
|
|
|
.link-board-inspector {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
gap: 18px;
|
|
min-width: 0;
|
|
padding: 16px;
|
|
border-radius: 20px;
|
|
background: var(--app-card-inset);
|
|
}
|
|
|
|
.link-board-inspector .input {
|
|
width: 100%;
|
|
}
|
|
|
|
.link-board-route {
|
|
display: flex;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
gap: 10px;
|
|
font-weight: 600;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
.link-board-storage {
|
|
margin-top: auto;
|
|
padding-top: 16px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.link-board-legend {
|
|
position: absolute;
|
|
bottom: 14px;
|
|
left: 16px;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 16px;
|
|
padding: 8px 12px;
|
|
border-radius: var(--r-pill);
|
|
background: var(--app-card);
|
|
pointer-events: none;
|
|
font-size: 11px;
|
|
}
|
|
|
|
.link-board-legend span::before {
|
|
display: inline-block;
|
|
width: 16px;
|
|
margin-right: 6px;
|
|
border-top: 2px solid currentColor;
|
|
vertical-align: middle;
|
|
content: '';
|
|
}
|
|
|
|
.link-board-legend .disabled::before {
|
|
border-top-style: dashed;
|
|
}
|
|
|
|
.link-board-empty {
|
|
position: absolute;
|
|
inset: 0;
|
|
display: grid;
|
|
place-items: center;
|
|
pointer-events: none;
|
|
}
|
|
|
|
@media (max-width: 1000px) {
|
|
.link-board-layout {
|
|
grid-template-columns: minmax(0, 1fr);
|
|
}
|
|
|
|
.link-board-viewport {
|
|
height: 480px;
|
|
}
|
|
}
|
|
|
|
.link-board-header {
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.link-board-header .switch {
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.link-board-tools > .row {
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
}
|