fix: 平台构建
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user