Compare commits

..
2 Commits
Author SHA1 Message Date
DenozordecandCursor 9c00b268dc fix(ui): выровнять очередь внимания дашборда под Frame и IconTile
quality / changes (push) Successful in 8s
quality / api (push) Skipped
quality / commitlint (push) Skipped
quality / docker-check (push) Skipped
CD / update-wiki (push) Successful in 5s
quality / web (push) Successful in 1m6s
CD / quality (push) Successful in 1m21s
CD / publish (push) Successful in 2m36s
Соседние Frame-колонки как в EvoBGP вместо вложенной оболочки; compact empty через IconTile elevated; счётчики ReUI Badge.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-19 01:11:36 +07:00
Denozordec a185b3a2cb chore: update dependencies and improve wiki update process
CD / update-wiki (push) Successful in 11s
quality / commitlint (push) Skipped
quality / changes (push) Successful in 9s
quality / docker-check (push) Skipped
quality / web (push) Successful in 1m34s
quality / api (push) Successful in 1m4s
CD / quality (push) Successful in 2m52s
CD / publish (push) Successful in 54s
- Added new dependencies for @tanstack/router-cli and updated related packages in pnpm-lock.yaml.
- Modified the build script in package.json to include `tsr generate` for route generation.
- Enhanced the wiki update job in Gitea Actions to use a fallback for the GITEA_TOKEN and improved the authorization method for pushing changes.
- Updated .dockerignore to clarify generated files.

This commit improves the build process and ensures smoother updates to the wiki documentation.
2026-08-19 01:00:24 +07:00
12 changed files with 465 additions and 247 deletions
+1
View File
@@ -22,6 +22,7 @@ node_modules
**/node_modules
**/dist
**/.turbo
# Генерируется `tsr generate` в `web` build (tsc идёт до Vite-плагина).
apps/web/src/routeTree.gen.ts
apps/web/playwright-report
apps/web/test-results
+1 -1
View File
@@ -35,7 +35,7 @@ Runner: `ubuntu-latest`, Docker для **docker-check** (PR) и **publish** (CD)
Повтор упавшего **publish** (тег уже есть, bake нет): detect берёт `v*` на `HEAD` и всё равно пушит образы. Подробнее: [docs/releasing.md](../docs/releasing.md#перезапуск-упавшего-job-publish).
Job **update-wiki** идёт **параллельно** publish (не блокирует образы): при diff `docs/Home.md` копирует файл в wiki-репозиторий (`GITEA_TOKEN`).
Job **update-wiki** идёт **параллельно** publish (не блокирует образы): при diff `docs/Home.md` копирует файл в wiki-репозиторий. Clone/push идут с `Authorization: Basic oauth2:<token>` — после clone git вырезает токен из `origin`, без header Gitea отвечает `Repository not found` (часто на внутреннем `GITEA_INSTANCE_URL` раннера). Секрет: **`GITEA_TOKEN`**, fallback **`ACTIONS_PAT`**.
### Секреты
+21 -7
View File
@@ -37,21 +37,35 @@ jobs:
else
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: Clone Wiki repository
if: steps.check_changes.outputs.changed == 'true'
run: |
WIKI_URL=$(echo "${{ github.server_url }}/${{ github.repository }}.wiki.git" | sed -e "s|://|://gitea-actions:${{ secrets.GITEA_TOKEN }}@|")
git clone "${WIKI_URL}" cfdm.wiki
- name: Update and push Wiki content
if: steps.check_changes.outputs.changed == 'true'
env:
WIKI_TOKEN: ${{ secrets.GITEA_TOKEN || secrets.ACTIONS_PAT }}
SERVER_URL: ${{ gitea.server_url }}
REPO: ${{ gitea.repository }}
run: |
set -euo pipefail
if [ -z "${WIKI_TOKEN:-}" ]; then
echo "GITEA_TOKEN / ACTIONS_PAT is empty — cannot push wiki"
exit 1
fi
# runner GITEA_INSTANCE_URL часто внутренний (http://192.168.x.x:3000).
# git после clone вырезает userinfo из origin → push без токена даёт 404
# «Repository not found». Authorization header переживает insteadOf/sanitize.
WIKI_URL="${SERVER_URL}/${REPO}.wiki.git"
AUTH_HEADER="Authorization: Basic $(printf '%s' "oauth2:${WIKI_TOKEN}" | base64 | tr -d '\n')"
git -c http.extraHeader="${AUTH_HEADER}" clone "${WIKI_URL}" cfdm.wiki
cp docs/Home.md cfdm.wiki/Home.md
cd cfdm.wiki
git config user.name "Gitea Actions"
git config user.email "actions@gitea"
git add Home.md
git diff --staged --quiet || git commit -m "docs: Update Wiki from main repository"
git push
if git diff --staged --quiet; then
echo "Wiki Home.md already up to date"
exit 0
fi
git commit -m "docs: Update Wiki from main repository"
git -c http.extraHeader="${AUTH_HEADER}" push origin HEAD
publish:
needs: [quality]
+2 -1
View File
@@ -5,7 +5,7 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"build": "tsr generate && tsc -b && vite build",
"test": "vitest run",
"lint": "eslint .",
"preview": "vite preview"
@@ -42,6 +42,7 @@
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"@tanstack/router-cli": "^1.167.31",
"@types/node": "^24.12.3",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
+15 -5
View File
@@ -1,5 +1,6 @@
import { InboxIcon, type LucideIcon } from 'lucide-react'
import { IconStack } from '@/components/reui/icon-stack'
import { IconTile } from '@/components/reui/icon-tile'
import {
Empty,
EmptyContent,
@@ -46,20 +47,29 @@ export function EmptyState({
!centered && className,
)}
>
<EmptyHeader className="gap-5 text-center">
<EmptyHeader className={cn('text-center', stackedIcon ? 'gap-5' : 'gap-3')}>
<EmptyMedia className="mb-0">
{stackedIcon ? (
<IconStack aria-hidden="true" className="h-14 w-12">
<Icon strokeWidth={1.9} aria-hidden="true" className="size-5" />
</IconStack>
) : (
<span className="bg-muted text-muted-foreground flex size-10 items-center justify-center rounded-lg [&_svg]:size-5">
<Icon aria-hidden="true" />
</span>
<IconTile
variant="elevated"
className="size-10.5 text-muted-foreground"
aria-hidden="true"
>
<Icon />
</IconTile>
)}
</EmptyMedia>
<div className="flex flex-col items-center gap-2">
<EmptyTitle className="text-base font-semibold tracking-tight">
<EmptyTitle
className={cn(
'font-semibold tracking-tight',
stackedIcon ? 'text-base' : 'text-sm',
)}
>
{title}
</EmptyTitle>
{description ? (
@@ -0,0 +1,95 @@
import type { ReactNode } from 'react'
import type { LucideIcon } from 'lucide-react'
import { EmptyState } from '@/components/empty-state'
import { Badge } from '@/components/reui/badge'
import {
Frame,
FrameHeader,
FramePanel,
FrameTitle,
} from '@/components/reui/frame'
import { IconTile } from '@/components/reui/icon-tile'
import { cn } from '@cfdm/ui/lib/utils'
/**
* Sibling Frame columns for dashboard attention queue.
* Preview: https://reui.io/preview/base/dashboard-1 · https://reui.io/preview/base/stats-12
* Docs: https://reui.io/docs/components/base/frame · https://reui.io/docs/components/base/icon-tile
*/
export interface AttentionQueueColumn {
id: string
title: string
icon: LucideIcon
iconClassName?: string
count: number
countVariant?: 'destructive' | 'warning' | 'secondary' | 'destructive-light' | 'warning-light'
emptyTitle: string
emptyDescription: string
emptyAction?: ReactNode
children: ReactNode
}
interface AttentionQueueProps {
columns: AttentionQueueColumn[]
className?: string
}
const DEFAULT_ICON_CLASS = 'text-muted-foreground [&_svg]:text-current'
export function AttentionQueue({ columns, className }: AttentionQueueProps) {
return (
<div
className={cn(
'grid min-w-0 items-start gap-2 @3xl:grid-cols-3',
className,
)}
>
{columns.map((column) => {
const Icon = column.icon
const isEmpty = column.count === 0
return (
<Frame key={column.id} dense spacing="sm" className="min-w-0 w-full">
<FrameHeader>
<div className="flex min-w-0 items-center gap-2">
<IconTile
variant="elevated"
size="sm"
className={cn(DEFAULT_ICON_CLASS, column.iconClassName)}
aria-hidden="true"
>
<Icon />
</IconTile>
<FrameTitle className="min-w-0 truncate">{column.title}</FrameTitle>
{column.count > 0 ? (
<Badge
size="sm"
variant={column.countVariant ?? 'secondary'}
className="tabular-nums"
>
{column.count}
</Badge>
) : null}
</div>
</FrameHeader>
<FramePanel className="min-w-0">
{isEmpty ? (
<div className="flex min-h-28 items-center justify-center py-4">
<EmptyState
icon={Icon}
title={column.emptyTitle}
description={column.emptyDescription}
action={column.emptyAction}
centered={false}
stackedIcon={false}
/>
</div>
) : (
column.children
)}
</FramePanel>
</Frame>
)
})}
</div>
)
}
@@ -13,6 +13,7 @@ export {
type OpsKpiCard,
} from './kpi-stat-grid'
export { QuickActionGrid, type QuickActionItem } from './quick-action-grid'
export { AttentionQueue, type AttentionQueueColumn } from './attention-queue'
export { OpsDashboard } from './ops-dashboard'
export { KanbanBoard, KanbanBoardSkeleton, type KanbanBoardProps, type KanbanColumnConfig } from './kanban-board'
export { DetailPanel, type DetailMetricCard } from './detail-panel'
@@ -1,11 +1,4 @@
import type { ReactNode } from 'react'
import {
Frame,
FrameDescription,
FrameHeader,
FramePanel,
FrameTitle,
} from '@/components/reui/frame'
import { Skeleton } from '@cfdm/ui/components/skeleton'
import { KpiStatGrid, type KpiStatCard } from './kpi-stat-grid'
@@ -17,10 +10,18 @@ interface OpsDashboardProps {
afterKpi?: ReactNode
charts: ReactNode
queue: ReactNode
queueTitle?: string
queueDescription?: string
isLoading?: boolean
}
/** Denser stack for KPI / charts / queue. PageHeader lives outside via PageShell. */
/**
* Ops dashboard: KPI → optional Quick Actions → charts → queue.
* Queue is a sibling Frame grid — never wrap Frames inside another Frame.
* @see https://reui.io/preview/base/dashboard-1
* @see https://reui.io/preview/base/stats-12
* @see https://reui.io/docs/components/base/frame
*/
const rootClassName =
'text-foreground @container flex w-full flex-col gap-2 md:gap-3'
@@ -32,7 +33,11 @@ function OpsDashboardSkeleton() {
<Skeleton className="h-64 w-full rounded-xl" />
<Skeleton className="h-64 w-full rounded-xl" />
</div>
<Skeleton className="h-48 w-full rounded-xl" />
<div className="grid gap-2 @3xl:grid-cols-3">
<Skeleton className="h-40 w-full rounded-xl" />
<Skeleton className="h-40 w-full rounded-xl" />
<Skeleton className="h-40 w-full rounded-xl" />
</div>
</div>
)
}
@@ -42,6 +47,8 @@ export function OpsDashboard({
afterKpi,
charts,
queue,
queueTitle = 'Требуют внимания',
queueDescription = 'Проблемы health-check, истекающие сертификаты и домены без группы',
isLoading = false,
}: OpsDashboardProps) {
if (isLoading) {
@@ -63,16 +70,16 @@ export function OpsDashboard({
{charts}
</section>
<section aria-label="Требуют внимания">
<Frame dense spacing="sm" className="w-full">
<FrameHeader>
<FrameTitle>Требуют внимания</FrameTitle>
<FrameDescription>
Проблемы health-check, истекающие сертификаты и домены без группы
</FrameDescription>
</FrameHeader>
<FramePanel>{queue}</FramePanel>
</Frame>
<section aria-label={queueTitle} className="flex min-w-0 flex-col gap-2">
<div className="flex min-w-0 flex-col gap-1">
<h2 className="text-sm font-semibold tracking-tight">{queueTitle}</h2>
{queueDescription ? (
<p className="text-muted-foreground max-w-prose text-sm">
{queueDescription}
</p>
) : null}
</div>
{queue}
</section>
</div>
)
+77 -77
View File
@@ -9,44 +9,39 @@
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
import { Route as rootRouteImport } from './routes/__root'
import { Route as LoginRouteImport } from './routes/login'
import { Route as AuthRouteImport } from './routes/_auth'
import { Route as LoginRouteImport } from './routes/login'
import { Route as AuthIndexRouteImport } from './routes/_auth/index'
import { Route as AuthCallbackRouteImport } from './routes/auth.callback'
import { Route as AuthServicesRouteImport } from './routes/_auth/services'
import { Route as AuthGroupsRouteImport } from './routes/_auth/groups'
import { Route as AuthCertificatesRouteImport } from './routes/_auth/certificates'
import { Route as AuthGroupsRouteImport } from './routes/_auth/groups'
import { Route as AuthServicesRouteImport } from './routes/_auth/services'
import { Route as AuthSettingsRouteRouteImport } from './routes/_auth/settings/route'
import { Route as AuthSettingsIndexRouteImport } from './routes/_auth/settings/index'
import { Route as AuthCallbackRouteImport } from './routes/auth.callback'
import { Route as AuthDomainsIndexRouteImport } from './routes/_auth/domains/index'
import { Route as AuthSettingsIntegrationsRouteImport } from './routes/_auth/settings/integrations'
import { Route as AuthSettingsAppearanceRouteImport } from './routes/_auth/settings/appearance'
import { Route as AuthGroupsGroupIdRouteImport } from './routes/_auth/groups/$groupId'
import { Route as AuthSettingsIndexRouteImport } from './routes/_auth/settings/index'
import { Route as AuthSettingsAppearanceRouteImport } from './routes/_auth/settings/appearance'
import { Route as AuthSettingsIntegrationsRouteImport } from './routes/_auth/settings/integrations'
import { Route as AuthDomainsDomainIdIndexRouteImport } from './routes/_auth/domains/$domainId/index'
import { Route as AuthDomainsDomainIdDnsRouteImport } from './routes/_auth/domains/$domainId/dns'
const AuthRoute = AuthRouteImport.update({
id: '/_auth',
getParentRoute: () => rootRouteImport,
} as any)
const LoginRoute = LoginRouteImport.update({
id: '/login',
path: '/login',
getParentRoute: () => rootRouteImport,
} as any)
const AuthRoute = AuthRouteImport.update({
id: '/_auth',
getParentRoute: () => rootRouteImport,
} as any)
const AuthIndexRoute = AuthIndexRouteImport.update({
id: '/',
path: '/',
getParentRoute: () => AuthRoute,
} as any)
const AuthCallbackRoute = AuthCallbackRouteImport.update({
id: '/auth/callback',
path: '/auth/callback',
getParentRoute: () => rootRouteImport,
} as any)
const AuthServicesRoute = AuthServicesRouteImport.update({
id: '/services',
path: '/services',
const AuthCertificatesRoute = AuthCertificatesRouteImport.update({
id: '/certificates',
path: '/certificates',
getParentRoute: () => AuthRoute,
} as any)
const AuthGroupsRoute = AuthGroupsRouteImport.update({
@@ -54,9 +49,9 @@ const AuthGroupsRoute = AuthGroupsRouteImport.update({
path: '/groups',
getParentRoute: () => AuthRoute,
} as any)
const AuthCertificatesRoute = AuthCertificatesRouteImport.update({
id: '/certificates',
path: '/certificates',
const AuthServicesRoute = AuthServicesRouteImport.update({
id: '/services',
path: '/services',
getParentRoute: () => AuthRoute,
} as any)
const AuthSettingsRouteRoute = AuthSettingsRouteRouteImport.update({
@@ -64,32 +59,37 @@ const AuthSettingsRouteRoute = AuthSettingsRouteRouteImport.update({
path: '/settings',
getParentRoute: () => AuthRoute,
} as any)
const AuthSettingsIndexRoute = AuthSettingsIndexRouteImport.update({
id: '/',
path: '/',
getParentRoute: () => AuthSettingsRouteRoute,
const AuthCallbackRoute = AuthCallbackRouteImport.update({
id: '/auth/callback',
path: '/auth/callback',
getParentRoute: () => rootRouteImport,
} as any)
const AuthDomainsIndexRoute = AuthDomainsIndexRouteImport.update({
id: '/domains/',
path: '/domains/',
getParentRoute: () => AuthRoute,
} as any)
const AuthGroupsGroupIdRoute = AuthGroupsGroupIdRouteImport.update({
id: '/$groupId',
path: '/$groupId',
getParentRoute: () => AuthGroupsRoute,
} as any)
const AuthSettingsIndexRoute = AuthSettingsIndexRouteImport.update({
id: '/',
path: '/',
getParentRoute: () => AuthSettingsRouteRoute,
} as any)
const AuthSettingsAppearanceRoute = AuthSettingsAppearanceRouteImport.update({
id: '/appearance',
path: '/appearance',
getParentRoute: () => AuthSettingsRouteRoute,
} as any)
const AuthSettingsIntegrationsRoute =
AuthSettingsIntegrationsRouteImport.update({
id: '/integrations',
path: '/integrations',
getParentRoute: () => AuthSettingsRouteRoute,
} as any)
const AuthSettingsAppearanceRoute = AuthSettingsAppearanceRouteImport.update({
id: '/appearance',
path: '/appearance',
getParentRoute: () => AuthSettingsRouteRoute,
} as any)
const AuthGroupsGroupIdRoute = AuthGroupsGroupIdRouteImport.update({
id: '/$groupId',
path: '/$groupId',
getParentRoute: () => AuthGroupsRoute,
} as any)
const AuthDomainsDomainIdIndexRoute =
AuthDomainsDomainIdIndexRouteImport.update({
id: '/domains/$domainId/',
@@ -210,13 +210,6 @@ export interface RootRouteChildren {
declare module '@tanstack/react-router' {
interface FileRoutesByPath {
'/login': {
id: '/login'
path: '/login'
fullPath: '/login'
preLoaderRoute: typeof LoginRouteImport
parentRoute: typeof rootRouteImport
}
'/_auth': {
id: '/_auth'
path: ''
@@ -224,6 +217,13 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof AuthRouteImport
parentRoute: typeof rootRouteImport
}
'/login': {
id: '/login'
path: '/login'
fullPath: '/login'
preLoaderRoute: typeof LoginRouteImport
parentRoute: typeof rootRouteImport
}
'/_auth/': {
id: '/_auth/'
path: '/'
@@ -231,18 +231,11 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof AuthIndexRouteImport
parentRoute: typeof AuthRoute
}
'/auth/callback': {
id: '/auth/callback'
path: '/auth/callback'
fullPath: '/auth/callback'
preLoaderRoute: typeof AuthCallbackRouteImport
parentRoute: typeof rootRouteImport
}
'/_auth/services': {
id: '/_auth/services'
path: '/services'
fullPath: '/services'
preLoaderRoute: typeof AuthServicesRouteImport
'/_auth/certificates': {
id: '/_auth/certificates'
path: '/certificates'
fullPath: '/certificates'
preLoaderRoute: typeof AuthCertificatesRouteImport
parentRoute: typeof AuthRoute
}
'/_auth/groups': {
@@ -252,11 +245,11 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof AuthGroupsRouteImport
parentRoute: typeof AuthRoute
}
'/_auth/certificates': {
id: '/_auth/certificates'
path: '/certificates'
fullPath: '/certificates'
preLoaderRoute: typeof AuthCertificatesRouteImport
'/_auth/services': {
id: '/_auth/services'
path: '/services'
fullPath: '/services'
preLoaderRoute: typeof AuthServicesRouteImport
parentRoute: typeof AuthRoute
}
'/_auth/settings': {
@@ -266,12 +259,12 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof AuthSettingsRouteRouteImport
parentRoute: typeof AuthRoute
}
'/_auth/settings/': {
id: '/_auth/settings/'
path: '/'
fullPath: '/settings/'
preLoaderRoute: typeof AuthSettingsIndexRouteImport
parentRoute: typeof AuthSettingsRouteRoute
'/auth/callback': {
id: '/auth/callback'
path: '/auth/callback'
fullPath: '/auth/callback'
preLoaderRoute: typeof AuthCallbackRouteImport
parentRoute: typeof rootRouteImport
}
'/_auth/domains/': {
id: '/_auth/domains/'
@@ -280,11 +273,18 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof AuthDomainsIndexRouteImport
parentRoute: typeof AuthRoute
}
'/_auth/settings/integrations': {
id: '/_auth/settings/integrations'
path: '/integrations'
fullPath: '/settings/integrations'
preLoaderRoute: typeof AuthSettingsIntegrationsRouteImport
'/_auth/groups/$groupId': {
id: '/_auth/groups/$groupId'
path: '/$groupId'
fullPath: '/groups/$groupId'
preLoaderRoute: typeof AuthGroupsGroupIdRouteImport
parentRoute: typeof AuthGroupsRoute
}
'/_auth/settings/': {
id: '/_auth/settings/'
path: '/'
fullPath: '/settings/'
preLoaderRoute: typeof AuthSettingsIndexRouteImport
parentRoute: typeof AuthSettingsRouteRoute
}
'/_auth/settings/appearance': {
@@ -294,12 +294,12 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof AuthSettingsAppearanceRouteImport
parentRoute: typeof AuthSettingsRouteRoute
}
'/_auth/groups/$groupId': {
id: '/_auth/groups/$groupId'
path: '/$groupId'
fullPath: '/groups/$groupId'
preLoaderRoute: typeof AuthGroupsGroupIdRouteImport
parentRoute: typeof AuthGroupsRoute
'/_auth/settings/integrations': {
id: '/_auth/settings/integrations'
path: '/integrations'
fullPath: '/settings/integrations'
preLoaderRoute: typeof AuthSettingsIntegrationsRouteImport
parentRoute: typeof AuthSettingsRouteRoute
}
'/_auth/domains/$domainId/': {
id: '/_auth/domains/$domainId/'
+157 -134
View File
@@ -19,12 +19,12 @@ import {
} from '@/queries'
import { PageShell } from '@/components/page-shell'
import { PageHeader } from '@/components/page-header'
import { EmptyState } from '@/components/empty-state'
import {
CertStatusChart,
GroupDomainsChart,
OpsDashboard,
QuickActionGrid,
AttentionQueue,
type KpiStatCard,
type QuickActionItem,
} from '@/components/reui-kit'
@@ -32,10 +32,12 @@ import { HealthCheckBadge } from '@/components/health-check-badge'
import { StatusBadge } from '@/components/status-badge'
import {
Item,
ItemActions,
ItemContent,
ItemGroup,
ItemTitle,
} from '@cfdm/ui/components/item'
import { Button } from '@cfdm/ui/components/button'
import { formatRelative } from '@/lib/format'
import { DEBUG_BUILD_STAMP, debugAgentLog } from '@/lib/debug-agent-log'
import { api } from '@/lib/api-client'
@@ -300,143 +302,164 @@ function DashboardPage() {
</>
}
queue={
<div className="grid gap-3 lg:grid-cols-3">
<div className="flex flex-col gap-2">
<div className="flex items-center gap-2">
<ActivityIcon
className="text-destructive size-4 shrink-0"
aria-hidden="true"
/>
<h3 className="text-sm font-semibold">Проблемы health-check</h3>
{attentionCount > 0 ? (
<span className="text-muted-foreground text-xs tabular-nums">
({attentionCount})
</span>
) : null}
</div>
{attentionServices.length === 0 ? (
<div className="flex min-h-24 items-center justify-center py-4">
<EmptyState
title="Нет проблем"
description="Нет сервисов со статусом Down или Slow"
centered={false}
stackedIcon={false}
/>
</div>
) : (
<ItemGroup className="gap-2">
{attentionServices.map((service) => (
<Item key={service.id} variant="outline" size="sm">
<ItemContent className="flex flex-row items-center justify-between gap-2">
<ItemTitle className="truncate font-medium">
<Link
to="/services"
className="hover:underline"
>
<AttentionQueue
columns={[
{
id: 'health',
title: 'Проблемы health-check',
icon: ActivityIcon,
iconClassName: 'text-destructive [&_svg]:text-current',
count: attentionCount,
countVariant: 'destructive-light',
emptyTitle: 'Нет проблем',
emptyDescription: 'Нет сервисов со статусом Down или Slow',
emptyAction: (
<Button
variant="outline"
size="sm"
nativeButton={false}
render={<Link to="/services" />}
>
К сервисам
</Button>
),
children: (
<ItemGroup className="gap-2">
{attentionServices.map((service) => (
<Item key={service.id} variant="outline" size="sm">
<ItemContent className="min-w-0 gap-1">
<ItemTitle className="truncate font-medium">
{service.name}
</Link>
</ItemTitle>
<HealthCheckBadge
status={
(service.health_status as
| 'up'
| 'down'
| 'degraded'
| 'unknown') ?? 'unknown'
}
latencyMs={service.health_latency_ms}
size="xs"
/>
</ItemContent>
</Item>
))}
</ItemGroup>
)}
</div>
<div className="flex flex-col gap-2">
<div className="flex items-center gap-2">
<AlertTriangleIcon
className="text-warning size-4 shrink-0"
aria-hidden="true"
/>
<h3 className="text-sm font-semibold">Истекающие сертификаты</h3>
{expiringCerts.length > 0 ? (
<span className="text-muted-foreground text-xs tabular-nums">
({expiringCerts.length})
</span>
) : null}
</div>
{expiringCerts.length === 0 ? (
<div className="flex min-h-24 items-center justify-center py-4">
<EmptyState
title="Нет истечений"
description="В пределах 14 дней истечений нет"
centered={false}
stackedIcon={false}
/>
</div>
) : (
<ItemGroup className="gap-2">
{expiringCerts.map(({ cert, ts }) => (
<Item key={cert.id} variant="outline" size="sm">
<ItemContent className="flex flex-row items-center justify-between gap-2">
<ItemTitle className="truncate font-medium">{cert.hostname}</ItemTitle>
<div className="flex shrink-0 items-center gap-2">
<StatusBadge status={cert.status} />
</ItemTitle>
</ItemContent>
<ItemActions>
<HealthCheckBadge
status={
(service.health_status as
| 'up'
| 'down'
| 'degraded'
| 'unknown') ?? 'unknown'
}
latencyMs={service.health_latency_ms}
size="xs"
/>
<Button
variant="outline"
size="sm"
nativeButton={false}
render={
<Link
to="/services"
search={{ serviceId: service.id }}
/>
}
>
Открыть
</Button>
</ItemActions>
</Item>
))}
</ItemGroup>
),
},
{
id: 'certs',
title: 'Истекающие сертификаты',
icon: AlertTriangleIcon,
iconClassName: 'text-warning [&_svg]:text-current',
count: expiringCerts.length,
countVariant: 'warning-light',
emptyTitle: 'Нет истечений',
emptyDescription: 'В пределах 14 дней истечений нет',
emptyAction: (
<Button
variant="outline"
size="sm"
nativeButton={false}
render={<Link to="/certificates" />}
>
К сертификатам
</Button>
),
children: (
<ItemGroup className="gap-2">
{expiringCerts.map(({ cert, ts }) => (
<Item key={cert.id} variant="outline" size="sm">
<ItemContent className="min-w-0 gap-1">
<ItemTitle className="truncate font-medium">
{cert.hostname}
</ItemTitle>
<span className="text-muted-foreground text-xs tabular-nums">
{formatRelative(new Date(ts).toISOString())}
</span>
</div>
</ItemContent>
</Item>
))}
</ItemGroup>
)}
</div>
<div className="flex flex-col gap-2">
<div className="flex items-center gap-2">
<FolderTreeIcon
className="text-muted-foreground size-4 shrink-0"
aria-hidden="true"
/>
<h3 className="text-sm font-semibold">Домены без группы</h3>
{ungroupedCount > 0 ? (
<span className="text-muted-foreground text-xs tabular-nums">
({ungroupedCount})
</span>
) : null}
</div>
{ungroupedDomains.length === 0 ? (
<div className="flex min-h-24 items-center justify-center py-4">
<EmptyState
title="Всё сгруппировано"
description="Все домены в группах"
centered={false}
stackedIcon={false}
/>
</div>
) : (
<ItemGroup className="gap-2">
{ungroupedDomains.map((domain) => (
<Item key={domain.id} variant="outline" size="sm">
<ItemContent className="flex flex-row items-center justify-between gap-2">
<ItemTitle className="truncate font-medium">
{domain.zone_name}
</ItemTitle>
<Link
to="/domains/$domainId"
params={{ domainId: String(domain.id) }}
className="text-primary text-xs font-medium hover:underline"
>
Открыть
</Link>
</ItemContent>
</Item>
))}
</ItemGroup>
)}
</div>
</div>
</ItemContent>
<ItemActions>
<StatusBadge status={cert.status} />
<Button
variant="outline"
size="sm"
nativeButton={false}
render={<Link to="/certificates" />}
>
Открыть
</Button>
</ItemActions>
</Item>
))}
</ItemGroup>
),
},
{
id: 'ungrouped',
title: 'Домены без группы',
icon: FolderTreeIcon,
iconClassName: 'text-info [&_svg]:text-current',
count: ungroupedCount,
countVariant: 'warning-light',
emptyTitle: 'Всё сгруппировано',
emptyDescription: 'Все домены в группах',
emptyAction: (
<Button
variant="outline"
size="sm"
nativeButton={false}
render={<Link to="/domains" />}
>
К доменам
</Button>
),
children: (
<ItemGroup className="gap-2">
{ungroupedDomains.map((domain) => (
<Item key={domain.id} variant="outline" size="sm">
<ItemContent className="min-w-0">
<ItemTitle className="truncate font-medium">
{domain.zone_name}
</ItemTitle>
</ItemContent>
<ItemActions>
<Button
variant="outline"
size="sm"
nativeButton={false}
render={
<Link
to="/domains/$domainId"
params={{ domainId: String(domain.id) }}
/>
}
>
Открыть
</Button>
</ItemActions>
</Item>
))}
</ItemGroup>
),
},
]}
/>
}
/>
</PageShell>
+1 -1
View File
@@ -51,7 +51,7 @@ Workflows: [.gitea/workflows/ci.yaml](../.gitea/workflows/ci.yaml), [.gitea/work
Fallback для **git tag**: `gitea.token`, если PAT недоступен. Push образов в Container Registry — **только `ACTIONS_PAT`** (у job token Gitea нет права packages).
Wiki: секрет **`GITEA_TOKEN`** для clone/push `*.wiki.git`.
Wiki: секрет **`GITEA_TOKEN`** (fallback `ACTIONS_PAT`) для clone/push `*.wiki.git`. Push идёт с HTTP `Authorization`, потому что git после clone вырезает токен из remote URL.
## Источник правды для версии
+68 -2
View File
@@ -206,6 +206,9 @@ importers:
'@eslint/js':
specifier: ^10.0.1
version: 10.0.1(eslint@10.5.0(jiti@2.7.0))
'@tanstack/router-cli':
specifier: ^1.167.31
version: 1.167.31
'@types/node':
specifier: ^24.12.3
version: 24.13.2
@@ -596,11 +599,11 @@ packages:
'@esbuild-kit/core-utils@3.3.2':
resolution: {integrity: sha512-sPRAnw9CdSsRmEtnsl2WXWdyquogVpB3yZ3dgwJfe8zrOzTsV7cJvmwrKVa+0ma5BoiGJ+BoqkMvawbayKUsqQ==}
deprecated: 'Merged into tsx: https://tsx.is'
deprecated: 'Merged into tsx: https://tsx.hirok.io'
'@esbuild-kit/esm-loader@2.6.5':
resolution: {integrity: sha512-FxEMIkJKnodyA1OaCUoEvbYRkoZlLZ4d/eXFu9Fh8CbBBgP5EmZxrfTRyN0qpXZ4vOvqnE5YdRdcrmUUXuU+dA==}
deprecated: 'Merged into tsx: https://tsx.is'
deprecated: 'Merged into tsx: https://tsx.hirok.io'
'@esbuild/aix-ppc64@0.25.12':
resolution: {integrity: sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==}
@@ -2284,6 +2287,10 @@ packages:
resolution: {integrity: sha512-79pf/RkhteYZTRgcR4F9kbk84P2N8rugQJswxfIqovlbRiT3yI7eBE+5QorIrZaOKktsgzRlXh1l/du/xpl4iA==}
engines: {node: '>=20.19'}
'@tanstack/history@1.162.1':
resolution: {integrity: sha512-DR9t6lfLVdrjgCwpglrR9DR7Ok8/HlXjcOE+goWXF3zyuLUO/ug7vMbSFxTqrQTtbRghJfyhmIZ0S6LhPIy44w==}
engines: {node: '>=20.19'}
'@tanstack/query-core@5.101.0':
resolution: {integrity: sha512-cQetA74EB+seWySv1TTKr828TnP0u39m6LykwDXIo84SNortpDkp30TMEjkqtYCNP9c40uT/iwl6MLiufEt0Ow==}
@@ -2318,14 +2325,27 @@ packages:
react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0
react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0
'@tanstack/router-cli@1.167.31':
resolution: {integrity: sha512-/jjZzcwOdBpcLIXRYsmHzFlchbd3esBD6m9bmeoY8l9mVkv/NZOhfx1h/mEn6nETkpxBT4y3pTJ0Ave2EoYXnQ==}
engines: {node: '>=20.19'}
hasBin: true
'@tanstack/router-core@1.171.13':
resolution: {integrity: sha512-+NOwEj1kO/6IGmpHRIZHasYxYWpyBQGNIZAST9aNrk9Q3YlU9SgqVnl1pbLa9qAKfeNdXQIRve0RQb/0kyDeDA==}
engines: {node: '>=20.19'}
'@tanstack/router-core@1.171.25':
resolution: {integrity: sha512-w74Al2ar8UKx3Xp4ICTxIZD2Vmd6N9Yn4xH8ILq40gI5UqlxzjPPYoR5l2+5cmv9XCWZehxw7saIofmZpf1G4w==}
engines: {node: '>=20.19'}
'@tanstack/router-generator@1.167.17':
resolution: {integrity: sha512-xtB9tB2Ws0tWR6Pi7nc3Qk9IYgoh1mQCKWjHqIl9tf6BNUpKoqniJoPAQ4+LGrK8FeZYU0o0p/qlZEyj9FAulA==}
engines: {node: '>=20.19'}
'@tanstack/router-generator@1.167.31':
resolution: {integrity: sha512-xgk+8BCKzAoIONVJPeyyzLRKhb9W0PNWJepPIjx5gRU36+FDZUMNeZ/gjyOBZ4EzQgrUOCPs4/Vkr8JcnuRLLA==}
engines: {node: '>=20.19'}
'@tanstack/router-plugin@1.168.18':
resolution: {integrity: sha512-MofS28/axfnfnhOD2RSgJEaU882aX5RsAzhGz5Vc4XhAmvCjy919u9JrNs4QsTWFbTD1P7IJ8WFlFVsrg0pStg==}
engines: {node: '>=20.19'}
@@ -4875,10 +4895,20 @@ packages:
peerDependencies:
seroval: ^1.0
seroval-plugins@1.6.2:
resolution: {integrity: sha512-TfxuUjlbBESzUOWdTkTKqvSmav0ABym+itetDXLK6mDz8SmrpdI30aF8RTXE8Bvq+tH/1yIDkvy3W0lfQb1ipQ==}
engines: {node: '>=10'}
peerDependencies:
seroval: ^1.0
seroval@1.5.4:
resolution: {integrity: sha512-46uFvgrXTVxZcUorgSSRZ4y+ieqLLQRMlG4bnCZKW3qI6BZm7Rg4ntMW4p1mILEEBZWrFlcpp0AyIIlM6jD9iw==}
engines: {node: '>=10'}
seroval@1.6.2:
resolution: {integrity: sha512-mPT+SD2TrlB6wvte1KkYOYUkubaTbd6pZ/6Kk3C9nxzrHmCZyhxOO7XGAeL7f+yLKZglzGtM9odUVvg/EhO+vQ==}
engines: {node: '>=10'}
set-cookie-parser@2.7.2:
resolution: {integrity: sha512-oeM1lpU/UvhTxw+g3cIfxXHyJRc/uidd3yK1P242gzHds0udQBYzs3y8j4gCCW+ZJ7ad0yctld8RYO+bdurlvw==}
@@ -7288,6 +7318,8 @@ snapshots:
'@tanstack/history@1.162.0': {}
'@tanstack/history@1.162.1': {}
'@tanstack/query-core@5.101.0': {}
'@tanstack/react-query@5.101.0(react@19.2.7)':
@@ -7323,6 +7355,14 @@ snapshots:
react: 19.2.7
react-dom: 19.2.7(react@19.2.7)
'@tanstack/router-cli@1.167.31':
dependencies:
'@tanstack/router-generator': 1.167.31
chokidar: 5.0.0
yargs: 17.7.3
transitivePeerDependencies:
- supports-color
'@tanstack/router-core@1.171.13':
dependencies:
'@tanstack/history': 1.162.0
@@ -7330,6 +7370,13 @@ snapshots:
seroval: 1.5.4
seroval-plugins: 1.5.4(seroval@1.5.4)
'@tanstack/router-core@1.171.25':
dependencies:
'@tanstack/history': 1.162.1
cookie-es: 3.1.1
seroval: 1.6.2
seroval-plugins: 1.6.2(seroval@1.6.2)
'@tanstack/router-generator@1.167.17':
dependencies:
'@babel/types': 7.29.7
@@ -7343,6 +7390,19 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@tanstack/router-generator@1.167.31':
dependencies:
'@babel/types': 7.29.7
'@tanstack/router-core': 1.171.25
'@tanstack/router-utils': 1.162.2
'@tanstack/virtual-file-routes': 1.162.0
jiti: 2.7.0
magic-string: 0.30.21
prettier: 3.8.4
zod: 4.4.3
transitivePeerDependencies:
- supports-color
'@tanstack/router-plugin@1.168.18(@tanstack/react-router@1.170.15(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(vite@8.0.16(@types/node@24.13.2)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.22.4)(yaml@2.9.0))':
dependencies:
'@babel/core': 7.29.7
@@ -9829,8 +9889,14 @@ snapshots:
dependencies:
seroval: 1.5.4
seroval-plugins@1.6.2(seroval@1.6.2):
dependencies:
seroval: 1.6.2
seroval@1.5.4: {}
seroval@1.6.2: {}
set-cookie-parser@2.7.2: {}
setprototypeof@1.2.0: {}