fix: correct dashboard freshness wiring
This commit is contained in:
@@ -218,15 +218,18 @@ export class DashboardService {
|
||||
const freshness: FreshnessMeta = {
|
||||
generatedAt: new Date().toISOString(),
|
||||
activityLatestAt: activities[0]?.createdAt?.toISOString() ?? null,
|
||||
sistersLatestAt: sisters
|
||||
.map((sister) => sister.lastSeen)
|
||||
.filter((value): value is Date => value instanceof Date)
|
||||
.sort((a, b) => b.getTime() - a.getTime())[0]
|
||||
?.toISOString() ?? null,
|
||||
qaDocLatestAt: board
|
||||
.filter((item) => item.category === 'qa-log')
|
||||
.map((item) => item.time)
|
||||
.sort((a, b) => new Date(b).getTime() - new Date(a).getTime())[0] ?? null,
|
||||
sistersLatestAt:
|
||||
sisters
|
||||
.map((sister) => sister.lastSeen)
|
||||
.filter((value): value is Date => value instanceof Date)
|
||||
.sort((a, b) => b.getTime() - a.getTime())[0]
|
||||
?.toISOString() ?? null,
|
||||
qaDocLatestAt:
|
||||
board
|
||||
.filter((item) => item.category === 'DOC-DERIVED')
|
||||
.map((item) => item.time)
|
||||
.sort((a, b) => new Date(b).getTime() - new Date(a).getTime())[0] ??
|
||||
null,
|
||||
};
|
||||
|
||||
return {
|
||||
|
||||
@@ -1197,7 +1197,7 @@ export default function DashboardPage() {
|
||||
<InfraCard key={card.title}>
|
||||
<InfraTitle>{card.title}</InfraTitle>
|
||||
<InfraMeta>{card.meta}</InfraMeta>
|
||||
<EventTag $tone={card.title === 'Gateway / Runtime' && connected ? 'ok' : card.detail.includes('없음') ? 'default' : 'active'}>{card.detail}</EventTag>
|
||||
<EventTag $tone={card.title === 'Runtime' && connected ? 'ok' : card.detail.startsWith('NO ') ? 'default' : 'active'}>{card.detail}</EventTag>
|
||||
</InfraCard>
|
||||
))}
|
||||
</InfraMap>
|
||||
|
||||
Reference in New Issue
Block a user