@yugabytedb/perf-advisor-ui 1.0.158 → 1.0.160

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.
package/dist/api.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios';
2
- import { Anomaly, AnomalyDetectionStatus, AnomalyGroup, BackgroundTasksResponse, ClusterLoadResponseData, MetadataFields, GraphRequestParams, QueryPlanData, QueryStatsPagedBody, ClusterDetails, IndexPagedResponse, TablePagedResponse } from './helpers/dtos';
2
+ import { Anomaly, AnomalyDetectionStatus, AnomalyGroup, BackgroundTasksResponse, ClusterLoadResponseData, MetadataFields, GraphRequestParams, QueryPlanData, QueryStatsPagedBody, ClusterDetails, IndexPagedResponse, MaterializedViewPagedResponse, TablePagedResponse } from './helpers/dtos';
3
3
  export declare enum QUERY_KEY {
4
4
  fetchAnomalies = "fetchAnomalies",
5
5
  fetchGraphs = "fetchGraphs",
@@ -35,7 +35,8 @@ export declare enum QUERY_KEY {
35
35
  fetchBackgroundTasks = "fetchBackgroundTasks",
36
36
  fetchClusterDetails = "fetchClusterDetails",
37
37
  fetchIndexesPage = "fetchIndexesPage",
38
- fetchTableMetadata = "fetchTableMetadata"
38
+ fetchTableMetadata = "fetchTableMetadata",
39
+ fetchMaterializedViewMetadata = "fetchMaterializedViewMetadata"
39
40
  }
40
41
  export type { AxiosError, AxiosRequestConfig, AxiosResponse };
41
42
  export type PerfAdvisorRequestInterceptor = (config: AxiosRequestConfig) => AxiosRequestConfig | Promise<AxiosRequestConfig>;
@@ -90,8 +91,9 @@ declare class ApiService {
90
91
  excludeSystemDBs?: boolean | undefined;
91
92
  }, apiUrl?: string, signal?: AbortSignal) => Promise<QueryStatsPagedBody>;
92
93
  fetchTablesPage: (universeUuid: string, payload: any) => Promise<AxiosResponse<any[]>>;
93
- fetchIndexesPage: (universeUuid: string, namespaceName: string, schemaName: string, tableName: string, apiUrl?: string, limit?: number) => Promise<AxiosResponse<IndexPagedResponse>>;
94
- fetchTableMetadata: (universeUuid: string, namespaceName: string, schemaName: string, tableName: string, apiUrl?: string, limit?: number) => Promise<AxiosResponse<TablePagedResponse>>;
94
+ fetchIndexesPage: (universeUuid: string, namespaceName: string, schemaName: string, tableName: string, apiUrl?: string, limit?: number, indexName?: string) => Promise<AxiosResponse<IndexPagedResponse>>;
95
+ fetchTableMetadata: (universeUuid: string, namespaceName: string, schemaName: string, tableName: string, apiUrl?: string, limit?: number, exactMatch?: boolean) => Promise<AxiosResponse<TablePagedResponse>>;
96
+ fetchMaterializedViewMetadata: (universeUuid: string, namespaceName: string, schemaName: string, materializedViewName: string, apiUrl?: string, limit?: number) => Promise<AxiosResponse<MaterializedViewPagedResponse>>;
95
97
  fetchNamespaces: (universeUuid: string, apiUrl?: string) => Promise<string[]>;
96
98
  fetchQueriesDatabases: (universeUuid: string, apiUrl?: string) => Promise<string[]>;
97
99
  fetchAnomaliesById: (universeUuid: string, anomalyUuid: string, apiUrl?: string) => Promise<Anomaly>;
@@ -1,3 +1,4 @@
1
+ import { TabletRelation } from './useTabletRelation';
1
2
  import { AnomalyGroup, QueryPlanData } from '../../../helpers/dtos';
2
3
  interface AnomalyMetadataFieldsProps {
3
4
  anomalyData: AnomalyGroup;
@@ -8,6 +9,7 @@ interface AnomalyMetadataFieldsProps {
8
9
  zoneName: string;
9
10
  universeUuid: string;
10
11
  apiUrl: string;
12
+ tabletRelation?: TabletRelation;
11
13
  }
12
14
  /** Assembles the anomaly (non-historical) metadata columns for a given category. */
13
15
  export declare const AnomalyMetadataFields: (props: AnomalyMetadataFieldsProps) => JSX.Element;
@@ -1,15 +1,18 @@
1
1
  /// <reference types="react" />
2
- type ModalTab = 'table' | 'indexes';
2
+ type ModalTab = 'table' | 'indexes' | 'materialized-view';
3
3
  interface TableIndexesModalProps {
4
4
  universeUuid: string;
5
5
  apiUrl: string;
6
6
  namespaceName: string;
7
7
  schemaName: string;
8
8
  tableName: string;
9
+ materializedViewName?: string;
9
10
  open?: boolean;
10
11
  onClose?: () => void;
11
12
  initialTab?: ModalTab;
12
13
  expandIndexName?: string;
13
14
  }
14
- export declare const TableIndexesModal: ({ universeUuid, apiUrl, namespaceName, schemaName, tableName, open, onClose, initialTab, expandIndexName }: TableIndexesModalProps) => JSX.Element;
15
+ export declare const SCHEMA_STALE_TIME_MS = 60000;
16
+ export declare const ViewSchemaLoader: () => JSX.Element;
17
+ export declare const TableIndexesModal: ({ universeUuid, apiUrl, namespaceName, schemaName, tableName, materializedViewName, open, onClose, initialTab, expandIndexName }: TableIndexesModalProps) => JSX.Element;
15
18
  export {};
@@ -2,3 +2,5 @@ export { MetadataField } from './MetadataField';
2
2
  export type { MetadataFieldConfig } from './MetadataField';
3
3
  export { buildSqlMetadataFields } from './sqlMetadataFields';
4
4
  export { AnomalyMetadataFields } from './AnomalyMetadataFields';
5
+ export { useTabletRelation } from './useTabletRelation';
6
+ export type { TabletRelation } from './useTabletRelation';
@@ -0,0 +1,33 @@
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
+ export interface TabletRelation {
9
+ tableName?: string;
10
+ indexName?: string;
11
+ isResolved: boolean;
12
+ isLoading: boolean;
13
+ }
14
+ interface UseTabletRelationParams {
15
+ universeUuid: string;
16
+ apiUrl: string;
17
+ dbName?: string;
18
+ schemaName?: string;
19
+ /** Raw relation name from tablet metadata - may name either a base table or an index. */
20
+ physicalRelationName?: string;
21
+ enabled: boolean;
22
+ }
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
+ export declare const useTabletRelation: ({ universeUuid, apiUrl, dbName, schemaName, physicalRelationName, enabled }: UseTabletRelationParams) => TabletRelation;
33
+ export {};
@@ -3,5 +3,7 @@ import { AnomalyGroup } from '../../helpers/dtos';
3
3
  export interface AnomalyPossibleCauseProps {
4
4
  accordianExpanded?: boolean;
5
5
  anomalyGroupData: AnomalyGroup | null;
6
+ universeUuid?: string;
7
+ apiUrl?: string;
6
8
  }
7
9
  export declare const AnomalyPossibleCause: React.FC<AnomalyPossibleCauseProps>;
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ import { IndexAnomalyDetails } from '../../helpers/dtos';
3
+ export interface IndexAnomalySummaryProps {
4
+ details: IndexAnomalyDetails;
5
+ universeUuid?: string;
6
+ apiUrl?: string;
7
+ }
8
+ export declare const IndexAnomalySummary: React.FC<IndexAnomalySummaryProps>;