fix: 平台构建

This commit is contained in:
npc0-hue
2026-07-22 15:27:26 +08:00
parent 6c3eb6e45f
commit 8e34c8762a
12 changed files with 188 additions and 155 deletions
+11 -11
View File
@@ -182,7 +182,7 @@ export function MaintenancePage({ session, operations, onNavigate }: PageCompone
<span> {endpoint.capabilities.slice(0, 4).join(" / ") || "未上报"}</span>
<span> {relatedServers.length}</span>
</details>
<div className="maintenance-actions">
<div className="console-row-actions">
<button type="button" className="theme-upload" onClick={() => void refreshEndpoints()}>
</button>
@@ -220,17 +220,17 @@ export function MaintenancePage({ session, operations, onNavigate }: PageCompone
<EmptyState title="暂无失败任务" description="最近任务没有失败记录;如果节点异常,请先查看运行节点心跳和容量。" actionLabel="刷新任务" onAction={() => void refreshJobs()} />
)}
{jobs.status === "ready" && failedJobs.length > 0 && (
<div className="operation-list">
<div className="console-record-list">
{failedJobs.map((job) => {
const server = job.serverInstanceId ? serverById.get(job.serverInstanceId) : undefined;
const endpoint = endpointById.get(job.runEndpointId);
return (
<div key={job.id} className="operation-item">
<div className="operation-item-head">
<div key={job.id} className="console-record">
<div className="console-record-head">
<strong>{job.capability}</strong>
<span className="status-pill status-error">{jobStateLabel(job.state)}</span>
</div>
<div className="operation-meta">
<div className="console-record-meta">
<span>
<code>{job.id}</code>
</span>
@@ -242,7 +242,7 @@ export function MaintenancePage({ session, operations, onNavigate }: PageCompone
</span>
<span>{formatTimestamp(job.updatedAt)}</span>
</div>
<div className="maintenance-actions">
<div className="console-row-actions">
<button type="button" className="theme-upload" onClick={() => void retryJob(job)}>
<RotateCcw size={13} />
@@ -273,14 +273,14 @@ export function MaintenancePage({ session, operations, onNavigate }: PageCompone
<EmptyState title="暂无审计事件" description="平台还没有记录任何审计事件。" actionLabel="刷新" onAction={() => void refreshEvents()} />
)}
{events.status === "ready" && events.data.length > 0 && (
<div className="operation-list">
<div className="console-record-list">
{events.data.slice(0, 30).map((event) => (
<div key={event.id} className="operation-item">
<div className="operation-item-head">
<div key={event.id} className="console-record">
<div className="console-record-head">
<strong>{event.summary || `${event.action} ${event.resourceKind}`}</strong>
<span className={cx("status-pill", auditResultClass(event))}>{event.result}</span>
</div>
<div className="operation-meta">
<div className="console-record-meta">
<span>
<code>{event.id}</code>
</span>
@@ -290,7 +290,7 @@ export function MaintenancePage({ session, operations, onNavigate }: PageCompone
</span>
<span>{formatTimestamp(event.createdAt)}</span>
</div>
<div className="maintenance-actions">
<div className="console-row-actions">
<button type="button" className="theme-upload" onClick={() => void refreshEvents()}>
</button>