feat(web): add console update panel, system maintenance path and connection settings UI

- Add online update workflow with plan, backup and install states.

- Expose maintenance paths, component backup jobs and connection authorization modes.

- Align auth and automation screens with the fused control plane.
This commit is contained in:
chick
2026-09-07 00:45:44 +08:00
parent 6d251dab7b
commit f6319374cd
20 changed files with 1985 additions and 67 deletions
+494
View File
@@ -581,6 +581,13 @@ main > section > header p,
.fleet-cross-health-item strong[data-tone='attention'] {
color: var(--warning);
}
/* The identity rail entry opens a drawer instead of a page, so it is a button dressed as a link. */
button.fleet-cross-health-item {
width: 100%;
font: inherit;
text-align: left;
cursor: pointer;
}
.fleet-toolbar {
display: grid;
gap: 0.7rem;
@@ -1396,6 +1403,34 @@ main > section > header p,
letter-spacing: 0;
}
.backup-directory {
display: flex;
flex-wrap: wrap;
align-items: baseline;
gap: 0.4rem;
}
.backup-directory span {
color: var(--muted);
font-size: 0.72rem;
}
.backup-directory code {
min-width: 0;
overflow-wrap: anywhere;
color: var(--muted);
font-size: 0.72rem;
letter-spacing: 0;
}
.backup-note {
display: block;
margin-top: 0.15rem;
overflow-wrap: anywhere;
color: var(--muted);
font-size: 0.7rem;
}
.backup-component-picker {
display: grid;
gap: 0.4rem;
@@ -1481,6 +1516,40 @@ main > section > header p,
font-size: 0.86rem;
overflow-wrap: anywhere;
}
.backup-preview-panel {
display: grid;
gap: 0.6rem;
padding: 0.8rem;
border: 1px solid var(--line);
border-radius: 10px;
background: var(--surface-soft);
}
.backup-preview-panel h3 {
margin: 0;
font-size: 0.86rem;
overflow-wrap: anywhere;
}
.backup-preview-grid {
display: grid;
grid-template-columns: max-content minmax(0, 1fr);
gap: 0.35rem 0.8rem;
}
.backup-preview-grid span {
color: var(--muted);
font-size: 0.72rem;
}
.backup-preview-grid strong {
font-size: 0.78rem;
min-width: 0;
overflow-wrap: anywhere;
}
.backup-preview-components {
margin: 0;
padding-left: 1.1rem;
display: grid;
gap: 0.25rem;
font-size: 0.78rem;
}
.backup-schedule {
display: grid;
gap: 0.6rem;
@@ -1601,6 +1670,26 @@ main > section > header p,
font-weight: 400;
}
.connection-mode {
display: grid;
gap: 0.35rem;
margin: 1rem 0 0;
}
.connection-mode-label {
font-size: 0.8rem;
font-weight: 700;
}
.connection-mode .connection-mode-control {
max-width: 20rem;
margin-bottom: 0;
}
.connection-mode .maintenance-hint {
margin: 0;
}
.maintenance-notice,
.maintenance-error {
margin: 0;
@@ -1619,6 +1708,70 @@ main > section > header p,
background: var(--danger-soft);
}
/* Console online update */
.system-maintenance > .update-card {
margin-bottom: 1rem;
}
.update-card h2 {
display: flex;
align-items: center;
gap: 0.45rem;
}
.update-card h2 svg {
width: 1.05rem;
height: 1.05rem;
}
.update-status-row {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 0.6rem;
margin-bottom: 0.75rem;
}
.update-phase-message {
font-weight: 700;
line-height: 1.5;
}
.update-progress {
display: flex;
align-items: center;
gap: 0.6rem;
margin-bottom: 0.75rem;
}
.update-progress > div {
flex: 1 1 auto;
min-width: 8rem;
}
.update-progress strong {
min-width: 3rem;
font-variant-numeric: tabular-nums;
}
.update-summary {
grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
}
.update-release-summary {
margin: 0.75rem 0 0;
padding: 0.7rem 0.9rem;
border: 1px dashed rgba(37, 59, 88, 0.18);
border-radius: 10px;
background: rgba(255, 255, 255, 0.55);
font-size: 0.86rem;
line-height: 1.6;
white-space: pre-wrap;
word-break: break-word;
}
.update-actions {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.6rem;
margin-top: 0.9rem;
}
.update-actions button svg {
width: 0.95rem;
height: 0.95rem;
}
/* Instance detail */
.instance-detail {
display: grid;
@@ -1922,6 +2075,36 @@ dd {
font-size: 0.74rem;
line-height: 1.5;
}
.device-action-banner {
display: flex;
gap: 0.4rem;
align-items: flex-start;
margin: 0.55rem 0 0;
padding: 0.5rem 0.6rem;
border: 1px solid rgba(217, 87, 87, 0.2);
border-radius: 10px;
color: #98393a;
background: rgba(253, 233, 231, 0.72);
font-size: 0.74rem;
line-height: 1.5;
}
.device-action-banner svg {
width: 0.9rem;
height: 0.9rem;
flex: none;
margin-top: 0.1rem;
}
.device-action-held {
display: flex;
gap: 0.35rem;
align-items: center;
color: #a3413c;
}
.device-action-held svg {
width: 0.85rem;
height: 0.85rem;
flex: none;
}
.device-action-form {
display: grid;
gap: 0.55rem;
@@ -3327,6 +3510,317 @@ main {
color: var(--workbench-muted);
font-size: 0.78rem;
}
.identity-drawer .identity-summary {
margin: 0.15rem 0 0;
color: var(--workbench-muted);
font-size: 0.74rem;
}
.identity-toolbar {
display: flex;
gap: 0.5rem;
align-items: center;
padding: 0.75rem 1.1rem;
border-bottom: 1px solid var(--workbench-border);
}
.identity-toolbar button:first-child {
min-height: 2.1rem;
padding: 0 0.7rem;
border: 1px solid var(--workbench-border);
border-radius: 999px;
color: var(--workbench-muted);
background: #fff;
font: inherit;
font-size: 0.75rem;
font-weight: 700;
cursor: pointer;
}
.identity-toolbar button:first-child.is-active {
color: #98393a;
border-color: #e0a3a3;
background: #fdf0ef;
}
.identity-notice {
margin: 0.75rem 1.1rem 0;
padding: 0.55rem 0.7rem;
border: 1px solid var(--workbench-border-strong);
border-radius: 10px;
color: var(--workbench-text);
background: var(--workbench-surface-muted);
font-size: 0.76rem;
}
.identity-list {
display: grid;
gap: 0.7rem;
margin: 0;
padding: 0.9rem 1.1rem;
list-style: none;
}
.identity-card {
display: grid;
gap: 0.55rem;
padding: 0.8rem 0.85rem;
border: 1px solid var(--workbench-border);
border-radius: 12px;
background: #fff;
}
.identity-card.identity-pending {
border-color: #e0a3a3;
background: #fdf6f5;
}
.identity-card-head {
display: flex;
gap: 0.5rem;
align-items: center;
justify-content: space-between;
}
.identity-card-head strong {
color: var(--workbench-text);
font-size: 0.86rem;
overflow-wrap: anywhere;
}
.identity-fields {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 0.35rem 0.8rem;
margin: 0;
}
.identity-fields > div {
display: flex;
gap: 0.4rem;
align-items: baseline;
min-width: 0;
}
.identity-fields dt {
color: var(--workbench-muted);
font-size: 0.7rem;
white-space: nowrap;
}
.identity-fields dd {
margin: 0;
color: var(--workbench-text);
font-size: 0.76rem;
font-variant-numeric: tabular-nums;
overflow-wrap: anywhere;
}
.identity-changes,
.identity-reasons {
display: grid;
gap: 0.3rem;
margin: 0;
padding: 0;
list-style: none;
font-size: 0.75rem;
}
.identity-changes li {
display: flex;
gap: 0.45rem;
align-items: baseline;
flex-wrap: wrap;
}
.identity-changes span {
color: var(--workbench-muted);
}
.identity-changes s {
color: #a3413c;
}
.identity-changes em {
color: var(--workbench-text);
font-style: normal;
font-weight: 700;
}
.identity-reasons li {
display: grid;
gap: 0.15rem;
color: #98393a;
}
.identity-reasons small {
color: var(--workbench-muted);
font-size: 0.72rem;
overflow-wrap: anywhere;
}
.identity-fingerprints {
display: flex;
gap: 0.75rem;
flex-wrap: wrap;
margin: 0;
color: var(--workbench-muted);
font-size: 0.7rem;
font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
}
.identity-actions {
display: flex;
gap: 0.5rem;
justify-content: flex-end;
}
.identity-actions button {
min-height: 2.1rem;
padding: 0 0.8rem;
border: 1px solid var(--workbench-border-strong);
border-radius: 999px;
color: var(--workbench-text);
background: #fff;
font: inherit;
font-size: 0.75rem;
font-weight: 700;
cursor: pointer;
}
.identity-actions button:disabled {
opacity: 0.45;
cursor: not-allowed;
}
.identity-actions .primary-action {
color: #fff;
border-color: var(--workbench-mint);
background: var(--workbench-mint);
}
.identity-hint {
margin: 0;
padding: 0.8rem 1.1rem 1.1rem;
border-top: 1px solid var(--workbench-border);
color: var(--workbench-muted);
font-size: 0.72rem;
}
.fleet-card-identity {
display: grid;
gap: 0.25rem;
margin: 0;
padding: 0.45rem 0.55rem;
border: 1px solid rgba(217, 87, 87, 0.16);
border-radius: 12px;
background: rgba(253, 233, 231, 0.72);
font-size: 0.74rem;
}
.fleet-card-identity small {
color: #a3413c;
}
.device-context-drawer {
max-width: min(34rem, 100%);
}
.device-context-eyebrow {
display: flex;
gap: 0.35rem;
align-items: center;
margin: 0;
color: var(--workbench-muted);
font-size: 0.7rem;
font-weight: 700;
text-transform: uppercase;
}
.device-context-content {
padding: 1.1rem;
}
.device-context-section {
margin-bottom: 1rem;
padding: 0.85rem;
border: 1px solid var(--workbench-border);
border-radius: 8px;
background: #fff;
}
.device-context-section dl {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 0.75rem;
margin: 0;
}
.device-context-section dl > div {
min-width: 0;
}
.device-context-section dt {
margin-bottom: 0.2rem;
color: var(--workbench-muted);
font-size: 0.7rem;
}
.device-context-section dd {
margin: 0;
color: var(--workbench-text);
font-size: 0.82rem;
overflow-wrap: anywhere;
}
.device-context-section time {
display: block;
margin-top: 0.35rem;
color: var(--workbench-muted);
font-size: 0.72rem;
}
.device-context-actions {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
gap: 0.55rem;
margin: 0;
padding: 0;
}
.device-context-actions a {
display: flex;
gap: 0.45rem;
align-items: center;
min-height: 2.5rem;
padding: 0 0.8rem;
border: 1px solid var(--workbench-border);
border-radius: 999px;
color: var(--workbench-text);
background: #fff;
font-size: 0.78rem;
font-weight: 700;
text-decoration: none;
}
.device-context-actions a:hover {
border-color: var(--workbench-border-strong);
background: var(--workbench-surface-muted);
}
.device-context-primary {
color: #fff;
border-color: var(--workbench-mint);
background: var(--workbench-mint);
}
.device-context-primary:hover {
color: #fff;
border-color: var(--workbench-mint);
background: var(--workbench-mint);
}
.fleet-card-context-trigger {
display: inline-flex;
align-items: center;
justify-content: center;
width: 2rem;
height: 2rem;
border: 1px solid transparent;
border-radius: 50%;
color: var(--workbench-muted);
background: transparent;
cursor: pointer;
}
.fleet-card-context-trigger:hover {
border-color: var(--workbench-border);
color: var(--workbench-text);
background: var(--workbench-surface-muted);
}
.device-context-backdrop {
background: rgba(56, 47, 36, 0.24);
backdrop-filter: blur(4px);
}
@media (max-width: 640px) {
.device-context-section dl {
grid-template-columns: minmax(0, 1fr);
}
}
.color-picker {
display: flex;
flex-wrap: wrap;