fix(ui): завершить основу таблиц и фильтров серверов
This commit is contained in:
1 parent
f9a4a07996
commit
3d3c45e4d2
24 files changed
+385
-263
No files matched your search
@@ -163,6 +163,7 @@ function ServerRowActions({
|
||||
}
|
||||
|
||||
interface ServersDataGridProps {
|
||||
hasUnfilteredRows?: boolean
|
||||
busy?: boolean
|
||||
servers: Server[]
|
||||
isLive: boolean
|
||||
@@ -174,6 +175,7 @@ interface ServersDataGridProps {
|
||||
}
|
||||
|
||||
function ServersDataGrid({
|
||||
hasUnfilteredRows = false,
|
||||
busy = false,
|
||||
servers,
|
||||
isLive,
|
||||
@@ -196,9 +198,14 @@ function ServersDataGrid({
|
||||
const expanded = row.getIsExpanded()
|
||||
return (
|
||||
<div className="flex items-start gap-2 min-w-0">
|
||||
<Button type="button" variant="ghost" size="icon-xs"
|
||||
aria-label={`${expanded ? "Свернуть" : "Раскрыть"}: ${s.name}`}
|
||||
aria-expanded={expanded}
|
||||
onClick={event => { event.stopPropagation(); row.toggleExpanded() }}>
|
||||
{expanded
|
||||
? <ChevronDownIcon className="size-3.5 mt-0.5 shrink-0 text-muted-foreground" />
|
||||
: <ChevronRightIcon className="size-3.5 mt-0.5 shrink-0 text-muted-foreground/40" />}
|
||||
? <ChevronDownIcon aria-hidden="true" className="size-3.5 shrink-0 text-muted-foreground" />
|
||||
: <ChevronRightIcon aria-hidden="true" className="size-3.5 shrink-0 text-muted-foreground/40" />}
|
||||
</Button>
|
||||
<div className="min-w-0">
|
||||
<p className="font-medium truncate">{s.name}</p>
|
||||
<p className="text-xs font-mono text-muted-foreground">{s.host}</p>
|
||||
@@ -374,8 +381,8 @@ function ServersDataGrid({
|
||||
return (
|
||||
<EmptyState
|
||||
icon={<ServerIcon className="size-4" />}
|
||||
title="Нет серверов"
|
||||
description="Добавьте первый MikroTik-сервер для мониторинга"
|
||||
title={hasUnfilteredRows ? "Нет совпадений" : "Нет серверов"}
|
||||
description={hasUnfilteredRows ? "Измените поиск или сбросьте фильтры" : "Добавьте первый MikroTik-сервер для мониторинга"}
|
||||
className="border-0 py-12"
|
||||
/>
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user