@yugabytedb/perf-advisor-ui 1.0.167 → 1.0.168

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,7 +12,6 @@ interface TableIndexesModalProps {
12
12
  initialTab?: ModalTab;
13
13
  expandIndexName?: string;
14
14
  }
15
- export declare const SCHEMA_STALE_TIME_MS = 60000;
16
15
  export declare const ViewSchemaLoader: () => JSX.Element;
17
16
  export declare const TableIndexesModal: ({ universeUuid, apiUrl, namespaceName, schemaName, tableName, materializedViewName, open, onClose, initialTab, expandIndexName }: TableIndexesModalProps) => JSX.Element;
18
17
  export {};
@@ -0,0 +1,106 @@
1
+ import { ReactNode } from 'react';
2
+ import { mui, YBTableColumn } from '@yugabyte-ui-library/core';
3
+ import { IndexAttribute, IndexResponseMetadata, MaterializedViewResponseMetadata, TableResponseMetadata } from '../../../helpers/dtos';
4
+ export declare const ALL_TYPES = "All types";
5
+ export interface IndexRow {
6
+ name: string;
7
+ type: string;
8
+ method: string;
9
+ columns: string;
10
+ definition: string;
11
+ updated: string;
12
+ whereClause: string;
13
+ primary: boolean;
14
+ unique: boolean;
15
+ constraintIndex: boolean;
16
+ nullNotDistinct: boolean;
17
+ tablespaceName: string;
18
+ attributes: IndexAttribute[];
19
+ }
20
+ export declare const DetailPanel: import('@emotion/styled').StyledComponent<import('@mui/system').BoxOwnProps<mui.Theme> & Omit<Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import('react').HTMLAttributes<HTMLDivElement>> & {
21
+ ref?: ((instance: HTMLDivElement | null) => void) | import('react').RefObject<HTMLDivElement> | null | undefined;
22
+ }, keyof import('@mui/system').BoxOwnProps<mui.Theme>> & import('@mui/system').MUIStyledCommonProps<mui.Theme>, {}, {}>;
23
+ export declare const Section: import('@emotion/styled').StyledComponent<import('@mui/system').BoxOwnProps<mui.Theme> & Omit<Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import('react').HTMLAttributes<HTMLDivElement>> & {
24
+ ref?: ((instance: HTMLDivElement | null) => void) | import('react').RefObject<HTMLDivElement> | null | undefined;
25
+ }, keyof import('@mui/system').BoxOwnProps<mui.Theme>> & import('@mui/system').MUIStyledCommonProps<mui.Theme>, {}, {}>;
26
+ export declare const SectionLabel: import('@emotion/styled').StyledComponent<import('@mui/system').BoxOwnProps<mui.Theme> & Omit<Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import('react').HTMLAttributes<HTMLDivElement>> & {
27
+ ref?: ((instance: HTMLDivElement | null) => void) | import('react').RefObject<HTMLDivElement> | null | undefined;
28
+ }, keyof import('@mui/system').BoxOwnProps<mui.Theme>> & import('@mui/system').MUIStyledCommonProps<mui.Theme>, {}, {}>;
29
+ export declare const SectionValue: import('@emotion/styled').StyledComponent<import('@mui/system').BoxOwnProps<mui.Theme> & Omit<Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import('react').HTMLAttributes<HTMLDivElement>> & {
30
+ ref?: ((instance: HTMLDivElement | null) => void) | import('react').RefObject<HTMLDivElement> | null | undefined;
31
+ }, keyof import('@mui/system').BoxOwnProps<mui.Theme>> & import('@mui/system').MUIStyledCommonProps<mui.Theme>, {}, {}>;
32
+ export declare const PropsGrid: import('@emotion/styled').StyledComponent<import('@mui/system').BoxOwnProps<mui.Theme> & Omit<Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import('react').HTMLAttributes<HTMLDivElement>> & {
33
+ ref?: ((instance: HTMLDivElement | null) => void) | import('react').RefObject<HTMLDivElement> | null | undefined;
34
+ }, keyof import('@mui/system').BoxOwnProps<mui.Theme>> & import('@mui/system').MUIStyledCommonProps<mui.Theme>, {}, {}>;
35
+ export declare const EmptyState: ({ title, description }: {
36
+ title: string;
37
+ description?: ReactNode;
38
+ }) => JSX.Element;
39
+ export declare const TypeFilterSelect: import('@emotion/styled').StyledComponent<{
40
+ tooltip?: ReactNode;
41
+ renderValue?: ((value: unknown) => ReactNode) | undefined;
42
+ menuProps?: Partial<mui.MenuProps> | undefined;
43
+ size?: "medium" | "large" | "small" | import('@yugabyte-ui-library/core').YBSelectSize | undefined;
44
+ selectProps?: Partial<mui.SlotProps<import('react').ElementType<mui.SelectProps>, {}, mui.BaseTextFieldProps>> | undefined;
45
+ dataTestId: string;
46
+ withoutBorder?: boolean | undefined;
47
+ } & Omit<mui.StandardTextFieldProps, "color" | "placeholder" | "select" | "variant" | "classes" | "FormHelperTextProps" | "SelectProps"> & {
48
+ children?: ReactNode;
49
+ } & import('@mui/system').MUIStyledCommonProps<mui.Theme>, {}, {}>;
50
+ export declare const COLUMN_TABLE_COLUMNS: YBTableColumn[];
51
+ export declare const TABLE_COLUMN_TABLE_COLUMNS: YBTableColumn[];
52
+ export declare const INDEX_COLUMNS: YBTableColumn[];
53
+ export declare const attributeLabel: (attribute: IndexAttribute) => string;
54
+ export declare const formatColumns: (attributes: IndexAttribute[]) => string;
55
+ export declare const computeTypes: (index: IndexResponseMetadata) => string[];
56
+ export declare const renderTypeTags: (value: unknown) => ReactNode;
57
+ export declare const buildIndexRows: (indexes: IndexResponseMetadata[]) => {
58
+ types: string[];
59
+ row: IndexRow;
60
+ }[];
61
+ interface DefinitionBlockProps {
62
+ text: string;
63
+ dataTestId?: string;
64
+ }
65
+ export declare const DefinitionBlock: ({ text, dataTestId }: DefinitionBlockProps) => JSX.Element;
66
+ export declare const buildIndexColumnRows: (index: IndexRow) => {
67
+ name: string;
68
+ ordering: string;
69
+ }[];
70
+ interface IndexColumnsTableProps {
71
+ index: IndexRow;
72
+ withBorder?: boolean;
73
+ dataTestIdPrefix?: string;
74
+ }
75
+ export declare const IndexColumnsTable: ({ index, withBorder, dataTestIdPrefix }: IndexColumnsTableProps) => JSX.Element;
76
+ interface IndexDetailPanelProps {
77
+ index: IndexRow;
78
+ autoScroll?: boolean;
79
+ dataTestIdPrefix?: string;
80
+ showSectionLabel?: boolean;
81
+ showColumns?: boolean;
82
+ }
83
+ export declare const IndexDetailPanel: ({ index, autoScroll, dataTestIdPrefix, showSectionLabel, showColumns }: IndexDetailPanelProps) => JSX.Element;
84
+ export declare const buildTableColumnRows: (tableMeta: TableResponseMetadata) => {
85
+ name: string;
86
+ type: string;
87
+ }[];
88
+ interface TableColumnsTableProps {
89
+ tableMeta: TableResponseMetadata;
90
+ withBorder?: boolean;
91
+ dataTestIdPrefix?: string;
92
+ }
93
+ export declare const TableColumnsTable: ({ tableMeta, withBorder, dataTestIdPrefix }: TableColumnsTableProps) => JSX.Element;
94
+ interface TableDefinitionPanelProps {
95
+ tableMeta: TableResponseMetadata;
96
+ dataTestIdPrefix?: string;
97
+ showSectionLabel?: boolean;
98
+ showColumns?: boolean;
99
+ }
100
+ export declare const TableDefinitionPanel: ({ tableMeta, dataTestIdPrefix, showSectionLabel, showColumns }: TableDefinitionPanelProps) => JSX.Element;
101
+ interface MaterializedViewDefinitionPanelProps {
102
+ materializedViewMeta: MaterializedViewResponseMetadata;
103
+ showSectionLabel?: boolean;
104
+ }
105
+ export declare const MaterializedViewDefinitionPanel: ({ materializedViewMeta, showSectionLabel }: MaterializedViewDefinitionPanelProps) => JSX.Element;
106
+ export {};
@@ -0,0 +1,28 @@
1
+ import { IndexResponseMetadata, MaterializedViewResponseMetadata, TableResponseMetadata } from '../../../helpers/dtos';
2
+ export declare const SCHEMA_QUERY_OPTIONS: {
3
+ readonly staleTime: number;
4
+ readonly cacheTime: number;
5
+ readonly refetchOnWindowFocus: false;
6
+ readonly refetchOnReconnect: false;
7
+ };
8
+ interface UseRelationSchemaParams {
9
+ universeUuid: string;
10
+ apiUrl: string;
11
+ namespaceName: string;
12
+ schemaName: string;
13
+ tableName: string;
14
+ materializedViewName?: string;
15
+ enabled?: boolean;
16
+ }
17
+ interface UseRelationSchemaResult {
18
+ tableMeta: TableResponseMetadata | undefined;
19
+ materializedViewMeta: MaterializedViewResponseMetadata | undefined;
20
+ indexes: IndexResponseMetadata[];
21
+ isTableFetching: boolean;
22
+ isMaterializedViewFetching: boolean;
23
+ areIndexesLoading: boolean;
24
+ isTableLoading: boolean;
25
+ isMaterializedViewLoading: boolean;
26
+ }
27
+ export declare const useRelationSchema: ({ universeUuid, apiUrl, namespaceName, schemaName, tableName, materializedViewName, enabled }: UseRelationSchemaParams) => UseRelationSchemaResult;
28
+ export {};
@@ -1,10 +1,3 @@
1
- /**
2
- * A tablet's physical relation resolved into logical YSQL metadata.
3
- *
4
- * `isResolved` is false for YCQL and for any relation neither catalog knows about - in that case no
5
- * definition lookup is possible and callers must not offer one. `isLoading` separates "not yet
6
- * known" from that, so callers can show progress instead of claiming the relation is unresolvable.
7
- */
8
1
  export interface TabletRelation {
9
2
  tableName?: string;
10
3
  indexName?: string;
@@ -20,14 +13,5 @@ interface UseTabletRelationParams {
20
13
  physicalRelationName?: string;
21
14
  enabled: boolean;
22
15
  }
23
- /**
24
- * Resolves a physical tablet relation to its owning table / index name.
25
- *
26
- * A tablet anomaly only carries `tableName` as reported by tablet metadata, which is the physical
27
- * relation and may well be an index - nothing in the anomaly says which. Since tables and indexes
28
- * share one PostgreSQL relation namespace, an exact (database, schema, name) hit in either catalog
29
- * identifies the relation unambiguously, so we probe the table catalog first and fall back to the
30
- * index catalog. Both are plain metadata reads.
31
- */
32
16
  export declare const useTabletRelation: ({ universeUuid, apiUrl, dbName, schemaName, physicalRelationName, enabled }: UseTabletRelationParams) => TabletRelation;
33
17
  export {};
@@ -12,10 +12,11 @@ export interface ProcessGraphDataProps {
12
12
  queryIdParam: string | null;
13
13
  showStandaloneAnomalies: boolean;
14
14
  showExplainPlan?: boolean;
15
+ showSchema?: boolean;
15
16
  showPgssRpcStats?: boolean;
16
17
  showQueriesExport?: boolean;
17
18
  onSelectedIssue?: (troubleshootUuid: string | null, params?: PAUrlParams) => void;
18
19
  onSelectedQuery?: (queryId: string | null, params?: QueryPageParams) => void;
19
20
  onNavigateToUrl?: (url: string) => void;
20
21
  }
21
- export declare const ProcessGraphData: React.MemoExoticComponent<({ universeUuid, anomalyData, amomalyGraphRequestParams, appName, apiUrl, dbIdParam, isHistoricalQueryView, troubleshootUuid, queryIdParam, showStandaloneAnomalies, showExplainPlan, showPgssRpcStats, showQueriesExport, onSelectedIssue, onSelectedQuery, onNavigateToUrl }: ProcessGraphDataProps) => JSX.Element>;
22
+ export declare const ProcessGraphData: React.MemoExoticComponent<({ universeUuid, anomalyData, amomalyGraphRequestParams, appName, apiUrl, dbIdParam, isHistoricalQueryView, troubleshootUuid, queryIdParam, showStandaloneAnomalies, showExplainPlan, showSchema, showPgssRpcStats, showQueriesExport, onSelectedIssue, onSelectedQuery, onNavigateToUrl }: ProcessGraphDataProps) => JSX.Element>;
@@ -0,0 +1,15 @@
1
+ import { AppName, ClusterDetails } from '../../../helpers/dtos';
2
+ interface QuerySchemaTabProps {
3
+ appName: AppName;
4
+ apiUrl: string;
5
+ universeUuid: string;
6
+ queryId: string | null;
7
+ dbId: string | null;
8
+ dateTimeRange: {
9
+ startDateTime: Date;
10
+ endDateTime: Date;
11
+ };
12
+ getClusterDetails: () => ClusterDetails;
13
+ }
14
+ export declare const QuerySchemaTab: ({ appName, apiUrl, universeUuid, queryId, dbId, dateTimeRange, getClusterDetails }: QuerySchemaTabProps) => JSX.Element;
15
+ export {};
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ interface SchemaColumnHeaderProps {
3
+ label: string;
4
+ tooltip: string;
5
+ }
6
+ export declare const SchemaColumnHeader: ({ label, tooltip }: SchemaColumnHeaderProps) => JSX.Element;
7
+ export {};
@@ -0,0 +1,9 @@
1
+ import { SchemaObjectRow } from '../../../helpers/dtos';
2
+ interface SchemaObjectDetailPanelProps {
3
+ object: SchemaObjectRow;
4
+ universeUuid: string;
5
+ apiUrl: string;
6
+ onOpenIndex: (indexName: string) => void;
7
+ }
8
+ export declare const SchemaObjectDetailPanel: ({ object, universeUuid, apiUrl, onOpenIndex }: SchemaObjectDetailPanelProps) => JSX.Element;
9
+ export {};
@@ -0,0 +1,10 @@
1
+ import { SchemaObjectRow } from '../../../helpers/dtos';
2
+ interface SchemaObjectSidePanelProps {
3
+ object: SchemaObjectRow;
4
+ indexName?: string;
5
+ universeUuid: string;
6
+ apiUrl: string;
7
+ onClose: () => void;
8
+ }
9
+ export declare const SchemaObjectSidePanel: ({ object, indexName, universeUuid, apiUrl, onClose }: SchemaObjectSidePanelProps) => JSX.Element;
10
+ export {};
@@ -0,0 +1,23 @@
1
+ import { ResolvedRelationType, SchemaObjectRow } from '../../../helpers/dtos';
2
+ export declare const OBJECT_TYPE_LABEL: Record<ResolvedRelationType, string>;
3
+ export declare const buildSchemaObjectLabel: (object: {
4
+ databaseName: string;
5
+ schemaName: string;
6
+ name: string;
7
+ }) => string;
8
+ interface TabletStatsEntity {
9
+ databaseName?: string;
10
+ schemaName?: string;
11
+ physicalRelationName?: string;
12
+ tableName?: string;
13
+ indexName?: string;
14
+ materializedViewName?: string;
15
+ resolvedRelationType?: ResolvedRelationType;
16
+ eps?: number;
17
+ totalEpsRatio?: number;
18
+ deletedDate?: string;
19
+ }
20
+ export declare const buildSchemaObjects: (entities?: TabletStatsEntity[]) => SchemaObjectRow[];
21
+ export declare const summarizeSchemaObjects: (objects: SchemaObjectRow[]) => string;
22
+ export declare const matchesSchemaFilter: (object: SchemaObjectRow, searchInput: string) => boolean;
23
+ export {};
@@ -0,0 +1,22 @@
1
+ import { AxiosError } from 'axios';
2
+ import { ClusterDetails, SchemaObjectRow } from '../../../helpers/dtos';
3
+ interface UseQuerySchemaObjectsParams {
4
+ universeUuid: string;
5
+ apiUrl: string;
6
+ queryId: string | null;
7
+ dbId: string | null;
8
+ startTime: string | null;
9
+ endTime: string | null;
10
+ getClusterDetails: () => ClusterDetails;
11
+ }
12
+ interface UseQuerySchemaObjectsResult {
13
+ objects: SchemaObjectRow[];
14
+ totalTabletCount: number;
15
+ isTruncated: boolean;
16
+ isLoading: boolean;
17
+ isFetching: boolean;
18
+ isError: boolean;
19
+ error: AxiosError | null;
20
+ }
21
+ export declare const useQuerySchemaObjects: ({ universeUuid, apiUrl, queryId, dbId, startTime, endTime, getClusterDetails }: UseQuerySchemaObjectsParams) => UseQuerySchemaObjectsResult;
22
+ export {};
@@ -0,0 +1,9 @@
1
+ import { SchemaObjectRow } from '../../../helpers/dtos';
2
+ interface UseSchemaObjectsUpdatedAtParams {
3
+ objects: SchemaObjectRow[];
4
+ universeUuid: string;
5
+ apiUrl: string;
6
+ enabled: boolean;
7
+ }
8
+ export declare const useSchemaObjectsUpdatedAt: ({ objects, universeUuid, apiUrl, enabled }: UseSchemaObjectsUpdatedAtParams) => Map<string, string>;
9
+ export {};