/
githubmirror
/
ydb-embedded-ui
Обзор
Документация
Войти
/
githubmirror
/
ydb-embedded-ui
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/types/additionalProps.ts
43 строки
1 KB
Copilot
fix: open external interface links in new tabs (#3920)
22 май 2026, 17:19
Не верифицирован
22 май 2026, 17:19
4c9f123
Код
Авторство
О чём код?
import type {IconData} from '@gravity-ui/uikit'; import type {TSystemStateInfo} from './api/nodes'; import type {ETenantType} from './api/tenant'; import type {InfoItem} from './components'; interface ClusterLinkBase { url: string; icon?: IconData; description?: string; target?: '_blank'; } /** A link with an explicit title (context is optional) */ export interface ClusterLinkWithTitle extends ClusterLinkBase { title: string; context?: string; } /** A link with a known context that provides a default title */ interface ClusterLinkWithContext extends ClusterLinkBase { title?: string; context: string; } /** Input cluster link: either title or context (or both) must be provided */ export type ClusterLink = ClusterLinkWithTitle | ClusterLinkWithContext; export interface DatabaseLink extends ClusterLinkWithTitle {} export interface AdditionalClusterProps { info?: InfoItem[]; links?: ClusterLink[]; } export interface AdditionalTenantsProps { prepareTenantBackend?: (nodeId?: string | number) => string | undefined; getMonitoringLink?: (name?: string, type?: ETenantType) => string | null; getLogsLink?: (name?: string) => string | null; getLinks?: (name?: string, type?: ETenantType) => DatabaseLink[]; } export type NodeAddress = Pick<TSystemStateInfo, 'Host' | 'Endpoints' | 'NodeId'>;