feat(web): add job run timeline and code-block revision diff
Раскрытие строки задачи показывает вертикальный ReUI Timeline: создана (с триггером) -> взята в работу -> результат с текстом ошибки. Diff ревизий переведён с самодельных <pre> на официальный @reui/code-block: единый блок с разметкой добавленных и удалённых строк (знаки +/- и тонировка), нумерацией, копированием и разворотом длинных списков. ResourcePage (filtered-вариант) получил поддержку expandedContent/getRowCanExpand — колонка раскрытия строится так же, как во FrameDataGrid. Точечные упрощения: прогресс BGP-сессий в мониторинге переведён на Progress из кита вместо самодельного бара; удалены @deprecated-константы ui-surface.ts, мёртвый data-grid-defaults.ts и неиспользуемый sparkline-ряд дашборда.
This commit is contained in:
@@ -3,6 +3,7 @@ import { useQuery } from '@tanstack/react-query'
|
||||
import { Bird, RefreshCw } from 'lucide-react'
|
||||
|
||||
import { Button } from '@evobgp/ui/components/button'
|
||||
import { Progress } from '@evobgp/ui/components/progress'
|
||||
import { MonitoringHealthCard } from '@/components/analytics'
|
||||
import { MonitoringReadyGrid } from '@/components/monitoring/monitoring-ready-grid'
|
||||
import { PageHeader } from '@/components/page-header'
|
||||
@@ -164,14 +165,17 @@ function BirdSummary({ bird }: { bird: import('@/types/api').BirdStatus }) {
|
||||
</span>
|
||||
</div>
|
||||
{ratio !== null ? (
|
||||
<div className="h-2 overflow-hidden rounded-full bg-muted">
|
||||
<div
|
||||
className={`h-full rounded-full transition-all ${
|
||||
ratio >= 100 ? 'bg-success' : ratio >= 50 ? 'bg-warning' : 'bg-destructive'
|
||||
}`}
|
||||
style={{ width: `${ratio}%` }}
|
||||
/>
|
||||
</div>
|
||||
<Progress
|
||||
value={ratio}
|
||||
aria-label="Установлено BGP-сессий"
|
||||
className={
|
||||
ratio >= 100
|
||||
? '[&_[data-slot=progress-indicator]]:bg-success'
|
||||
: ratio >= 50
|
||||
? '[&_[data-slot=progress-indicator]]:bg-warning'
|
||||
: '[&_[data-slot=progress-indicator]]:bg-destructive'
|
||||
}
|
||||
/>
|
||||
) : null}
|
||||
{bird.error ? <p className="text-xs text-destructive">{bird.error}</p> : null}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user