fix(ui): проверять контекст расчёта OSPF оптимизатора
This commit is contained in:
1 parent
f93dfe34c2
commit
bf2815b5a4
9 files changed
+131
-108
No files matched your search
@@ -118,9 +118,9 @@ function RouteOptimizerOspfPreviewDataGrid({
|
||||
getRowId: (row) => row.id,
|
||||
})
|
||||
|
||||
if (error) {
|
||||
if (error && rows.length === 0) {
|
||||
return (
|
||||
<p className="px-3 py-2 text-xs text-destructive">Ошибка preview: {error}</p>
|
||||
<p role="alert" className="px-3 py-2 text-xs text-destructive">Ошибка preview: {error}</p>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -135,14 +135,18 @@ function RouteOptimizerOspfPreviewDataGrid({
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
{error && <p role="alert" className="px-3 py-2 text-xs text-warning">Ошибка preview: {error}. Последний снимок; актуальность неизвестна.</p>}
|
||||
{loading && rows.length > 0 && <p role="status" className="px-3 py-2 text-xs text-muted-foreground">Обновление preview OSPF…</p>}
|
||||
<DataGridShell
|
||||
table={table}
|
||||
recordCount={rows.length}
|
||||
isLoading={loading}
|
||||
isLoading={loading && rows.length === 0}
|
||||
loadingMode="skeleton"
|
||||
tableClassNames={{ headerRow: "border-b bg-muted/30", bodyRow: "group/row" }}
|
||||
tableLayout={{ dense: true }}
|
||||
/>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user