@yugabytedb/perf-advisor-ui 1.0.133 → 1.0.135
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/README.md +22 -1
- package/dist/api.d.ts +96 -0
- package/dist/common/ChartCard/ChartCard.d.ts +20 -0
- package/dist/common/ChartCard/ChartCard.styles.d.ts +1 -0
- package/dist/common/ChartCard/ChartTypeSelector.d.ts +8 -0
- package/dist/common/ChartCard/WaitEventTypeSelector.d.ts +8 -0
- package/dist/common/ChartCard/buildOptions.d.ts +3 -0
- package/dist/common/ChartCard/defaults.d.ts +9 -0
- package/dist/common/ChartCard/helpers/anomalyOverlay.d.ts +2 -0
- package/dist/common/ChartCard/helpers/axes.d.ts +43 -0
- package/dist/common/ChartCard/helpers/index.d.ts +11 -0
- package/dist/common/ChartCard/helpers/interactions.d.ts +6 -0
- package/dist/common/ChartCard/helpers/legend.d.ts +41 -0
- package/dist/common/ChartCard/helpers/series.d.ts +9 -0
- package/dist/common/ChartCard/helpers/tooltip.d.ts +27 -0
- package/dist/common/ChartCard/index.d.ts +8 -0
- package/dist/common/ChartCard/types.d.ts +171 -0
- package/dist/common/CopyToClipboardButton/CopyToClipboardButton.d.ts +8 -0
- package/dist/common/PAHeader/MetricSplitSelector.d.ts +8 -0
- package/dist/common/PAHeader/OutlierSelector.d.ts +13 -0
- package/dist/common/PAHeader/QueryTypeSelector.d.ts +8 -0
- package/dist/common/PAHeader/YBClusterRegionSelector.d.ts +9 -0
- package/dist/common/PAHeader/YBZoneNodeSelector.d.ts +11 -0
- package/dist/common/PerfAdvisorCodeBlock/PerfAdvisorCodeBlock.d.ts +23 -0
- package/dist/common/YBCheckbox/YBCheckboxField.d.ts +6 -0
- package/dist/common/YBCodeBlock/codeBlock.d.ts +1 -0
- package/dist/common/YBErrorIndicator/YBErrorIndicator.d.ts +8 -0
- package/dist/common/YBInput/YBInputField.d.ts +7 -0
- package/dist/common/YBPagination/YBInfinitePagination.d.ts +16 -0
- package/dist/common/YBPanelItem/YBPanelItem.d.ts +11 -0
- package/dist/common/YBTable/AnomaliesTableFooter.d.ts +4 -0
- package/dist/common/YBTable/TableHelper.d.ts +9 -0
- package/dist/common/YBToggle/YBToggleField.d.ts +6 -0
- package/dist/common/index.d.ts +14 -0
- package/dist/components/ConfigureUniverse/ConfigureUniverseMetadata.d.ts +8 -0
- package/dist/components/ConfigureUniverse/RemoveUniverseMetadata.d.ts +10 -0
- package/dist/components/ConfigureUniverse/UniverseListMetadata.d.ts +14 -0
- package/dist/components/GanttChart/GanttChart.d.ts +3 -0
- package/dist/components/GanttChart/adapters/anomalyAdapter.d.ts +5 -0
- package/dist/components/GanttChart/adapters/backgroundJobsAdapter.d.ts +3 -0
- package/dist/components/GanttChart/adapters/qpmAdapter.d.ts +4 -0
- package/dist/components/GanttChart/adapters/showMoreAnomalyAdapter.d.ts +3 -0
- package/dist/components/GanttChart/adapters/singleLevelAnomalyAdapter.d.ts +3 -0
- package/dist/components/GanttChart/components/Bar.d.ts +11 -0
- package/dist/components/GanttChart/components/ColumnHeader.d.ts +9 -0
- package/dist/components/GanttChart/components/GanttRefetchProgress.d.ts +2 -0
- package/dist/components/GanttChart/components/GroupPanel.d.ts +15 -0
- package/dist/components/GanttChart/components/GroupRow.d.ts +17 -0
- package/dist/components/GanttChart/components/TimeAxis.d.ts +12 -0
- package/dist/components/GanttChart/components/TimelinePanel.d.ts +24 -0
- package/dist/components/GanttChart/config.d.ts +36 -0
- package/dist/components/GanttChart/hooks/useGanttRows.d.ts +9 -0
- package/dist/components/GanttChart/hooks/useTimeScale.d.ts +12 -0
- package/dist/components/GanttChart/index.d.ts +9 -0
- package/dist/components/GanttChart/types.d.ts +111 -0
- package/dist/components/GanttChart/utils/mergeIntervals.d.ts +10 -0
- package/dist/components/GanttChart/utils/severity.d.ts +19 -0
- package/dist/components/GanttChart/utils/timeFormatters.d.ts +12 -0
- package/dist/components/GanttChart/utils/truncateLabel.d.ts +16 -0
- package/dist/components/Header/BreadCrumbsHeader.d.ts +16 -0
- package/dist/components/Header/DateSelectorHeader.d.ts +21 -0
- package/dist/components/Header/DbLoadHeader.d.ts +14 -0
- package/dist/components/Header/GenericHeader.d.ts +30 -0
- package/dist/components/Header/MetadataHeader.d.ts +16 -0
- package/dist/components/Header/TimezoneSelector.d.ts +9 -0
- package/dist/components/Header/metadata/AnomalyMetadataFields.d.ts +12 -0
- package/dist/components/Header/metadata/MetadataField.d.ts +22 -0
- package/dist/components/Header/metadata/index.d.ts +4 -0
- package/dist/components/Header/metadata/sqlMetadataFields.d.ts +4 -0
- package/dist/components/PrimaryDashboard/AshGate.d.ts +7 -0
- package/dist/components/PrimaryDashboard/BackgroundJobs.d.ts +15 -0
- package/dist/components/PrimaryDashboard/ClusterOverallLoadChart.d.ts +22 -0
- package/dist/components/PrimaryDashboard/ColumnSelectorDrawer.d.ts +10 -0
- package/dist/components/PrimaryDashboard/DbCPUActivity/CPUByDatabaseChart.d.ts +21 -0
- package/dist/components/PrimaryDashboard/DbCPUActivity/CPUByDatabaseMetadata.d.ts +13 -0
- package/dist/components/PrimaryDashboard/DbCPUActivity/DbCPUActivityDashboard.d.ts +13 -0
- package/dist/components/PrimaryDashboard/DbCPUActivity/DbCPUActivityView.d.ts +13 -0
- package/dist/components/PrimaryDashboard/DbLoadMetadata.d.ts +22 -0
- package/dist/components/PrimaryDashboard/DbNodeLoadChart.d.ts +22 -0
- package/dist/components/PrimaryDashboard/DbStatsTable/databaseStatsColumns.d.ts +51 -0
- package/dist/components/PrimaryDashboard/DbStatsTable/useDatabaseStatsTable.d.ts +62 -0
- package/dist/components/PrimaryDashboard/DetectedAnomalies.d.ts +19 -0
- package/dist/components/PrimaryDashboard/EChartsOptionsGenerator.d.ts +208 -0
- package/dist/components/PrimaryDashboard/ExportQueriesModal/BundleColumnsPicker.d.ts +9 -0
- package/dist/components/PrimaryDashboard/ExportQueriesModal/BundleDetailsPanel.d.ts +6 -0
- package/dist/components/PrimaryDashboard/ExportQueriesModal/ExportFormTab.d.ts +15 -0
- package/dist/components/PrimaryDashboard/ExportQueriesModal/RecentExportsTab.d.ts +10 -0
- package/dist/components/PrimaryDashboard/ExportQueriesModal/constants.d.ts +12 -0
- package/dist/components/PrimaryDashboard/ExportQueriesModal/helpers.d.ts +9 -0
- package/dist/components/PrimaryDashboard/ExportQueriesModal/index.d.ts +2 -0
- package/dist/components/PrimaryDashboard/ExportQueriesModal/recentExportColumns.d.ts +16 -0
- package/dist/components/PrimaryDashboard/ExportQueriesModal/types.d.ts +43 -0
- package/dist/components/PrimaryDashboard/HistoricalQueryData.d.ts +25 -0
- package/dist/components/PrimaryDashboard/PerfAdvisorBanner.d.ts +8 -0
- package/dist/components/PrimaryDashboard/PerfAdvisorEntry.d.ts +14 -0
- package/dist/components/PrimaryDashboard/PerfAdvisorTabs.d.ts +29 -0
- package/dist/components/PrimaryDashboard/ProcessTopKData.d.ts +10 -0
- package/dist/components/PrimaryDashboard/QueryEventsChart.d.ts +7 -0
- package/dist/components/PrimaryDashboard/QueryExportDropdown.d.ts +13 -0
- package/dist/components/PrimaryDashboard/ShowMoreAnomalies.d.ts +22 -0
- package/dist/components/PrimaryDashboard/chartConfigs/clusterLoadConfig.d.ts +8 -0
- package/dist/components/PrimaryDashboard/chartConfigs/cpuByDatabaseConfig.d.ts +9 -0
- package/dist/components/PrimaryDashboard/chartConfigs/dbNodeLoadConfig.d.ts +9 -0
- package/dist/components/PrimaryDashboard/chartConfigs/index.d.ts +7 -0
- package/dist/components/PrimaryDashboard/chartConfigs/shared.d.ts +8 -0
- package/dist/components/PrimaryDashboard/chartTitles.d.ts +2 -0
- package/dist/components/PrimaryDashboard/useChartData.d.ts +29 -0
- package/dist/components/RuntimeConfigs/ResetRuntimeConfig.d.ts +14 -0
- package/dist/components/RuntimeConfigs/RuntimeConfigs.d.ts +11 -0
- package/dist/components/RuntimeConfigs/UpdateRuntimeConfig.d.ts +14 -0
- package/dist/components/SecondaryDashboard/AnomalyPossibleCause.d.ts +7 -0
- package/dist/components/SecondaryDashboard/AnomalyRouter.d.ts +30 -0
- package/dist/components/SecondaryDashboard/DrilldownView/CpuSaturationDrilldown.d.ts +17 -0
- package/dist/components/SecondaryDashboard/DrilldownView/HistoricalQueryMetricGraphGrid.d.ts +22 -0
- package/dist/components/SecondaryDashboard/DrilldownView/NodeDrilldown.d.ts +23 -0
- package/dist/components/SecondaryDashboard/DrilldownView/OtherDrilldown.d.ts +20 -0
- package/dist/components/SecondaryDashboard/DrilldownView/QPMExportButton.d.ts +8 -0
- package/dist/components/SecondaryDashboard/DrilldownView/QPMPlanSelector.d.ts +9 -0
- package/dist/components/SecondaryDashboard/DrilldownView/QueryPlanManagement.d.ts +16 -0
- package/dist/components/SecondaryDashboard/DrilldownView/SqlDrilldown.d.ts +20 -0
- package/dist/components/SecondaryDashboard/DrilldownView/TabletDrilldown.d.ts +15 -0
- package/dist/components/SecondaryDashboard/GraphView.d.ts +39 -0
- package/dist/components/SecondaryDashboard/Metadata/AnomalyRCAGraphs.d.ts +25 -0
- package/dist/components/SecondaryDashboard/Metadata/NodeLoadMetadata.d.ts +13 -0
- package/dist/components/SecondaryDashboard/Metadata/QueriesMetadata.d.ts +20 -0
- package/dist/components/SecondaryDashboard/Metadata/QueryLevelTabletMetadata.d.ts +14 -0
- package/dist/components/SecondaryDashboard/Metadata/SizeBarChart.d.ts +6 -0
- package/dist/components/SecondaryDashboard/Metadata/TabletLevelQueryMetadata.d.ts +14 -0
- package/dist/components/SecondaryDashboard/Metadata/TabletMetadata.d.ts +18 -0
- package/dist/components/SecondaryDashboard/MetricsAnalysisEntry.d.ts +13 -0
- package/dist/components/SecondaryDashboard/MetricsSelectorDrawer.d.ts +16 -0
- package/dist/components/SecondaryDashboard/ProcessGraphData.d.ts +21 -0
- package/dist/components/SecondaryDashboard/QPMGanttChart.d.ts +14 -0
- package/dist/components/SecondaryDashboard/TopKMetricsView.d.ts +20 -0
- package/dist/components/hooks/useClusterFilterState.d.ts +27 -0
- package/dist/components/hooks/usePrevious.d.ts +1 -0
- package/dist/components/index.d.ts +10 -0
- package/dist/components/styles.d.ts +1 -0
- package/dist/contexts/ExportBundlesContext.d.ts +19 -0
- package/dist/esm/index.js +48536 -123936
- package/dist/esm/index.js.map +1 -1
- package/dist/helpers/anomalyRecommendationRenderer.d.ts +2 -0
- package/dist/helpers/columnPreferences.d.ts +11 -0
- package/dist/helpers/config.d.ts +2 -0
- package/dist/helpers/constants.d.ts +507 -0
- package/dist/helpers/dateUtils.d.ts +45 -0
- package/dist/helpers/downloadUtils.d.ts +72 -0
- package/dist/helpers/dtos.d.ts +861 -0
- package/dist/helpers/errorHandlingUtils.d.ts +1 -0
- package/dist/helpers/exportBundlesStorage.d.ts +47 -0
- package/dist/helpers/objectUtils.d.ts +11 -0
- package/dist/helpers/qpmStatus.d.ts +7 -0
- package/dist/helpers/utils.d.ts +240 -0
- package/dist/index.d.ts +8 -0
- package/dist/providers/YBThemeWrapper.d.ts +12 -0
- package/dist/theme/mainTheme.d.ts +14 -0
- package/dist/theme/variables.d.ts +50 -0
- package/package.json +33 -28
- package/dist/cjs/index.js +0 -19
- package/dist/cjs/index.js.map +0 -1
- package/dist/types.d.ts +0 -1865
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const assertUnreachableCase: (value: never) => never;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { BundleColumnSelection, BundleFormat, BundleMeta, SourceMode } from './downloadUtils';
|
|
2
|
+
export declare const EXPORT_BUNDLES_STORAGE_KEY = "perfAdvisor:exportBundleAttributes:v1";
|
|
3
|
+
export declare const EXPORT_BUNDLES_MAX_COUNT = 20;
|
|
4
|
+
export declare const BundleStatus: {
|
|
5
|
+
readonly GENERATING: "generating";
|
|
6
|
+
readonly READY: "ready";
|
|
7
|
+
readonly FAILED: "failed";
|
|
8
|
+
readonly CANCELLED: "cancelled";
|
|
9
|
+
readonly INTERRUPTED: "interrupted";
|
|
10
|
+
};
|
|
11
|
+
export type BundleStatus = typeof BundleStatus[keyof typeof BundleStatus];
|
|
12
|
+
export interface BundleParams {
|
|
13
|
+
universeUuid: string;
|
|
14
|
+
apiUrl: string;
|
|
15
|
+
startTime: string | null;
|
|
16
|
+
endTime: string | null;
|
|
17
|
+
searchInput: string;
|
|
18
|
+
database: string;
|
|
19
|
+
sortBy: string;
|
|
20
|
+
sortDirection: string;
|
|
21
|
+
queryType: string | null;
|
|
22
|
+
showSystemQueries: boolean;
|
|
23
|
+
topN: number;
|
|
24
|
+
source: SourceMode;
|
|
25
|
+
selectedQueryKeys: string[];
|
|
26
|
+
columns: BundleColumnSelection;
|
|
27
|
+
format: BundleFormat;
|
|
28
|
+
meta: Pick<BundleMeta, 'timeRange' | 'source'>;
|
|
29
|
+
}
|
|
30
|
+
export interface PersistedBundle {
|
|
31
|
+
id: string;
|
|
32
|
+
createdAt: number;
|
|
33
|
+
status: BundleStatus;
|
|
34
|
+
params: BundleParams;
|
|
35
|
+
filename?: string;
|
|
36
|
+
errorMessage?: string;
|
|
37
|
+
queryCount?: number;
|
|
38
|
+
progress?: {
|
|
39
|
+
fetched: number;
|
|
40
|
+
total: number;
|
|
41
|
+
phase: 'fetching' | 'queries' | 'plans';
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export declare const loadBundles: () => PersistedBundle[];
|
|
45
|
+
export declare const saveBundles: (bundles: PersistedBundle[]) => void;
|
|
46
|
+
export declare const pruneByCount: (bundles: PersistedBundle[]) => PersistedBundle[];
|
|
47
|
+
export declare const reclassifyOrphans: (bundles: PersistedBundle[]) => PersistedBundle[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare function isDefinedNotNull(obj: any): boolean;
|
|
2
|
+
export declare function isEmptyArray(arr: any): boolean;
|
|
3
|
+
export declare function isNonEmptyArray(arr: any): boolean;
|
|
4
|
+
export declare function isNullOrEmpty(obj: any): boolean;
|
|
5
|
+
export declare function isEmptyObject(obj: any): boolean;
|
|
6
|
+
export declare function isNonEmptyObject(obj: any): boolean;
|
|
7
|
+
export declare function isNonEmptyString(str: string): boolean;
|
|
8
|
+
export declare function isEmptyString(str: string): boolean;
|
|
9
|
+
export declare const isValidObject: typeof isDefinedNotNull;
|
|
10
|
+
export declare function removeNullProperties(obj: any): void;
|
|
11
|
+
export declare function isYAxisGreaterThanThousand(dataArray: any): boolean;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AppName } from './dtos';
|
|
2
|
+
export declare const MIN_QPM_DB_VERSION = "2025.2.3.0-b0";
|
|
3
|
+
export interface QpmDisabledReason {
|
|
4
|
+
title: string;
|
|
5
|
+
instruction: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const getQpmDisabledReason: (qpmSupported: boolean, qpmEnabled: boolean, appName: AppName) => QpmDisabledReason | null;
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import { Anomaly, AnomalyCategory, AppName, ClusterLoadOverallTabs, ClusterLoadSubTabs, GraphFilters, InsightsTabs, WaitEventClassification, GraphRequestParams, GraphType, MetricMeasure, QueryPageParams, AnomalyGroup, TransformedData, TransformedDbLoadData, TransformedNodeLoadData, TransformedTabletsData, BackgroundTasksResponse, TransformedBackgroundTasksResponse, AnomalyPossibleCauseData, UniverseNodeDetails, QueryPlanEntry, ClusterDetails } from './dtos';
|
|
2
|
+
export declare const formatData: (data: any) => any;
|
|
3
|
+
export declare const formatUniverseNodeDetails: (universeNodesDetails: UniverseNodeDetails) => {
|
|
4
|
+
primaryZoneMapping: any;
|
|
5
|
+
asyncZoneMapping: any;
|
|
6
|
+
primaryClusterMapping: any;
|
|
7
|
+
asyncClusterMapping: any;
|
|
8
|
+
nodeIPMapping: any;
|
|
9
|
+
};
|
|
10
|
+
export declare const getSqlAnomalyParams: (anomalyData: Anomaly) => {
|
|
11
|
+
dbId: string | undefined;
|
|
12
|
+
queryId: string | undefined;
|
|
13
|
+
tabletId: string | undefined;
|
|
14
|
+
tableName: string | undefined;
|
|
15
|
+
dbName: string | undefined;
|
|
16
|
+
};
|
|
17
|
+
export declare const getSqlAnomalyGroupParams: (anomalyData: AnomalyGroup) => {
|
|
18
|
+
dbId: string | undefined;
|
|
19
|
+
queryId: string | undefined;
|
|
20
|
+
tabletId: string | undefined;
|
|
21
|
+
tableName: string | undefined;
|
|
22
|
+
dbName: string | undefined;
|
|
23
|
+
schemaName: string | undefined;
|
|
24
|
+
};
|
|
25
|
+
export declare const getAnomalyMetricMeasure: (anomalyData: Anomaly) => MetricMeasure;
|
|
26
|
+
export declare const getAnomalyOutlierType: (anomalyData: Anomaly) => "TOP" | "BOTTOM";
|
|
27
|
+
export declare const getAnomalyNumNodes: (anomalyData: Anomaly) => number;
|
|
28
|
+
export declare const getAnomalyStartDate: (anomalyData: Anomaly) => Date | null;
|
|
29
|
+
export declare const getAnomalyEndTime: (anomalyData: Anomaly) => Date | null;
|
|
30
|
+
export declare const formatUniverseDetails: (universeData: any) => {
|
|
31
|
+
primaryZoneMapping: any;
|
|
32
|
+
asyncZoneMapping: any;
|
|
33
|
+
primaryClusterMapping: any;
|
|
34
|
+
asyncClusterMapping: any;
|
|
35
|
+
nodeIPMapping: any;
|
|
36
|
+
};
|
|
37
|
+
export declare const getNodesBasedOnZones: (nodeDetailsData: any, zoneName: string, uuid: string) => string[];
|
|
38
|
+
export declare const getRegionsBasedOnCluster: (nodeDetailsData: any, isReadReplica: boolean) => string[];
|
|
39
|
+
export declare const getFilteredItems: (zoneToNodesMap: any, isRegionChanged: boolean, isPrimaryCluster: boolean, filterParam: string) => Map<any, any>;
|
|
40
|
+
export declare const getPrimaryCluster: (clusters: any) => any;
|
|
41
|
+
export declare function getReadOnlyCluster(clusters: any): any;
|
|
42
|
+
export declare const getAnomalyMainGraphRequestParams: (anomalyData: AnomalyGroup) => any[];
|
|
43
|
+
export declare const getGraphRequestParams: (anomalyData: Anomaly) => any[];
|
|
44
|
+
export declare const formatAnomalyMainGraphs: (anomalyData: AnomalyGroup) => {
|
|
45
|
+
name: string;
|
|
46
|
+
index: number;
|
|
47
|
+
groupByControl: boolean;
|
|
48
|
+
displayName: string | undefined;
|
|
49
|
+
}[];
|
|
50
|
+
export declare const formatAnomalyRca: (anomalyData: Anomaly) => any[];
|
|
51
|
+
export declare const getAshOperations: (metricData: any, graphPayload: any, isAdvancedView: boolean) => any;
|
|
52
|
+
export declare const getOperations: (metricMeasure: string, metricData: any, graphType: GraphType, shouldShowGroupbyOperations: boolean, graphPayload: any, isAdvancedView?: boolean) => {
|
|
53
|
+
uniqueOperations: any;
|
|
54
|
+
groupByOperations: any;
|
|
55
|
+
};
|
|
56
|
+
export declare const calculateDateDifference: (startDate: Date, endDate: Date) => number;
|
|
57
|
+
export declare const applyClusterFilters: (filters: GraphFilters, details: Pick<ClusterDetails, 'cluster' | 'region' | 'zone' | 'node'>) => void;
|
|
58
|
+
export declare const buildClusterUrlParams: (details: Pick<ClusterDetails, 'cluster' | 'region' | 'zone' | 'node'>) => URLSearchParams;
|
|
59
|
+
export declare const buildTopKMetricParams: (clusterDetails: ClusterDetails, metricsTabNumber: number) => GraphRequestParams[] | undefined;
|
|
60
|
+
export declare const buildAnomalyGraphParams: (clusterDetails: ClusterDetails, graphParamsCopy: GraphRequestParams[]) => GraphRequestParams[];
|
|
61
|
+
export declare const buildHistoricalQueryParams: (clusterDetails: ClusterDetails, urlParams: QueryPageParams | null, graphNames: readonly string[], anomalyData?: AnomalyGroup | null, ashGroupBy?: WaitEventClassification) => GraphRequestParams[];
|
|
62
|
+
export declare const getStepSeconds: (startTime: string | null, endTime: string | null) => number;
|
|
63
|
+
export declare const getTruncatedSeriesName: (seriesName: string) => string;
|
|
64
|
+
export declare const getLegendKey: (color: string, seriesName: string) => string;
|
|
65
|
+
export declare const getLegendValue: (value: string) => string;
|
|
66
|
+
export declare const getDateRange: (filterDuration: string, today: Date) => {
|
|
67
|
+
formattedStartDate: Date;
|
|
68
|
+
formattedEndDate: Date;
|
|
69
|
+
};
|
|
70
|
+
export declare const initializeDateTimeRange: (filterDuration: string, today: Date, previousDate: Date) => {
|
|
71
|
+
startDateTime: Date;
|
|
72
|
+
endDateTime: Date;
|
|
73
|
+
};
|
|
74
|
+
export declare const syncFilterDurationToUrl: (filterDuration: string, dateTimeRange?: {
|
|
75
|
+
startDateTime: Date;
|
|
76
|
+
endDateTime: Date;
|
|
77
|
+
}) => void;
|
|
78
|
+
export declare const syncDateParamToUrl: (paramName: 'startTime' | 'endTime', isoString: string) => void;
|
|
79
|
+
export declare const getTransformedData: (data: any) => TransformedData[];
|
|
80
|
+
export declare const getTransformedDbLoadData: (data: any) => TransformedDbLoadData[];
|
|
81
|
+
export declare const getTabletsMetadataColumns: (data: any, isTabletMetadataView?: boolean) => TransformedTabletsData[];
|
|
82
|
+
export declare const getNodeLoadMetadataColumns: (data: any) => TransformedNodeLoadData[];
|
|
83
|
+
export declare const formatBytes: (sizeInBytes: any) => string;
|
|
84
|
+
/**
|
|
85
|
+
* Truncates text with ellipsis if it exceeds the maximum length
|
|
86
|
+
* @param text - The text to truncate
|
|
87
|
+
* @param maxLength - Maximum length before truncation
|
|
88
|
+
* @returns Truncated text with ellipsis if needed, or original text
|
|
89
|
+
*/
|
|
90
|
+
export declare const truncateText: (text: string | undefined | null, maxLength: number) => string;
|
|
91
|
+
/**
|
|
92
|
+
* Truncates text from the front with ellipsis at the beginning
|
|
93
|
+
* @param text - The text to truncate
|
|
94
|
+
* @param maxLength - Maximum length before truncation
|
|
95
|
+
* @returns Truncated text with ellipsis at the front if needed, or original text
|
|
96
|
+
*/
|
|
97
|
+
export declare const truncateTextFromFront: (text: string | undefined | null, maxLength: number) => string;
|
|
98
|
+
export declare const truncateEntityDisplayName: (entityDisplayName: string | undefined, anomalyCategory: AnomalyCategory | string | undefined, maxLength: number) => string;
|
|
99
|
+
/**
|
|
100
|
+
* Gets the category label for breadcrumb (second breadcrumb item)
|
|
101
|
+
* @param anomalyData - The anomaly data object (null if query view)
|
|
102
|
+
* @param anomalyCategory - The category of the anomaly (string or AnomalyCategory enum)
|
|
103
|
+
* @param urlState - The parsed URL state containing current tab and sub-tabs
|
|
104
|
+
* @returns The category label string
|
|
105
|
+
*/
|
|
106
|
+
export declare const getBreadcrumbCategoryLabel: (anomalyData: AnomalyGroup | null, anomalyCategory: string | AnomalyCategory | undefined, isHistoricalQueryView: boolean, urlState: ParsedUrlState) => string;
|
|
107
|
+
/**
|
|
108
|
+
* Gets the entity/query label for breadcrumb (third breadcrumb item)
|
|
109
|
+
* @param anomalyData - The anomaly data object (null if query view)
|
|
110
|
+
* @param entityDisplayName - The display name of the entity (for anomaly view)
|
|
111
|
+
* @param queryText - The query text (for query view)
|
|
112
|
+
* @param maxLength - Maximum length before truncation (default: 30)
|
|
113
|
+
* @returns The entity/query label string
|
|
114
|
+
*/
|
|
115
|
+
export declare const getBreadcrumbEntityLabel: ({ anomalyData, entityDisplayName, queryText, maxLength }: {
|
|
116
|
+
anomalyData: AnomalyGroup | null;
|
|
117
|
+
entityDisplayName: string | undefined | null;
|
|
118
|
+
queryText: string | undefined | null;
|
|
119
|
+
categoryLabel?: string | undefined | null;
|
|
120
|
+
maxLength?: number | undefined;
|
|
121
|
+
}) => string;
|
|
122
|
+
export interface ParsedUrlState {
|
|
123
|
+
currentTab: InsightsTabs;
|
|
124
|
+
clusterLoadSubTab: ClusterLoadSubTabs;
|
|
125
|
+
clusterLoadOverallSubTab: ClusterLoadOverallTabs;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Parse URL to determine current tab and sub-tabs
|
|
129
|
+
* @param appName - The application name (YBA or Web)
|
|
130
|
+
* @returns Parsed state from URL
|
|
131
|
+
*/
|
|
132
|
+
export declare const parseUrlState: (appName: AppName) => ParsedUrlState;
|
|
133
|
+
/**
|
|
134
|
+
* Build URL path for Web app
|
|
135
|
+
* @param tab - The current tab
|
|
136
|
+
* @param subTab - The cluster load sub-tab (optional)
|
|
137
|
+
* @param overallSubTab - The overall sub-tab for cluster load (optional)
|
|
138
|
+
* @returns The complete URL path with query string
|
|
139
|
+
*/
|
|
140
|
+
export declare const buildUrlPath: (tab: InsightsTabs, subTab?: ClusterLoadSubTabs, overallSubTab?: ClusterLoadOverallTabs) => string;
|
|
141
|
+
/**
|
|
142
|
+
* Update URL based on app type
|
|
143
|
+
* @param appName - The application name (YBA or Web)
|
|
144
|
+
* @param tab - The current tab
|
|
145
|
+
* @param subTab - The cluster load sub-tab (optional)
|
|
146
|
+
* @param overallSubTab - The overall sub-tab for cluster load (optional)
|
|
147
|
+
* @param usePushState - Whether to use pushState instead of replaceState (default: false)
|
|
148
|
+
*/
|
|
149
|
+
export declare const updateUrl: (appName: AppName, tab: InsightsTabs, subTab?: ClusterLoadSubTabs, overallSubTab?: ClusterLoadOverallTabs, usePushState?: boolean) => void;
|
|
150
|
+
/**
|
|
151
|
+
* Ensure complete URL path for Web app (adds missing segments)
|
|
152
|
+
* @param appName - The application name (YBM, YBA, Web)
|
|
153
|
+
* @param tab - The current tab
|
|
154
|
+
*/
|
|
155
|
+
export declare const ensureCompletePath: (appName: AppName, tab: InsightsTabs) => void;
|
|
156
|
+
/**
|
|
157
|
+
* Builds the primary dashboard URL by removing drilldown-specific query parameters
|
|
158
|
+
* @param appName - The application name (only Web)
|
|
159
|
+
* @returns The primary dashboard URL
|
|
160
|
+
*/
|
|
161
|
+
export declare const buildPrimaryDashboardUrl: (appName: AppName, isQueryViewFromAnomaly?: boolean) => string;
|
|
162
|
+
/**
|
|
163
|
+
* Builds the YBM current URL by removing specific query parameters
|
|
164
|
+
* @returns The YBM URL with cleaned query parameters
|
|
165
|
+
*/
|
|
166
|
+
export declare const buildYbmUrl: (isHistoricalQueryView: boolean, isQueryViewFromAnomalyView?: boolean, showStandaloneAnomalies?: boolean) => URL;
|
|
167
|
+
/**
|
|
168
|
+
* Builds the YBM drilldown URL by removing query-specific path segments and parameters
|
|
169
|
+
* This is used when navigating from query level (level 3) back to anomaly level (level 2)
|
|
170
|
+
* @returns The YBM URL with query path and parameters removed
|
|
171
|
+
*/
|
|
172
|
+
export declare const buildYbmDrilldownUrl: () => URL;
|
|
173
|
+
/**
|
|
174
|
+
* Navigates back to the primary dashboard
|
|
175
|
+
* @param appName - The application name (YBA, YBM, or Web)
|
|
176
|
+
* @param hasAnomalyData - Whether anomaly data exists
|
|
177
|
+
* @param onSelectedIssue - Optional callback to clear selected issue
|
|
178
|
+
* @param onSelectedQuery - Optional callback to clear selected query
|
|
179
|
+
* @param onNavigateToUrl - Optional callback for React Router navigation (used in YBM)
|
|
180
|
+
*/
|
|
181
|
+
export declare const navigateToPrimaryDashboard: (appName: AppName, isHistoricalQueryView: boolean, showStandaloneAnomalies: boolean, onSelectedIssue?: ((troubleshootUuid: string | null, params?: any) => void) | undefined, onSelectedQuery?: ((queryId: string | null, params?: any) => void) | undefined, onNavigateToUrl?: ((url: string) => void) | undefined) => void;
|
|
182
|
+
/**
|
|
183
|
+
* Navigates to the drilldown view (anomaly level) from query level
|
|
184
|
+
* @param appName - The application name (YBA, YBM, or Web)
|
|
185
|
+
* @param anomalyData - The anomaly data to navigate to
|
|
186
|
+
* @param onSelectedIssue - Optional callback to select the issue
|
|
187
|
+
* @param onNavigateToUrl - Optional callback for React Router navigation (used in YBM)
|
|
188
|
+
*/
|
|
189
|
+
export declare const navigateToDrilldownView: (appName: AppName, anomalyData: AnomalyGroup | null, onSelectedIssue?: ((troubleshootUuid: string | null, params?: any) => void) | undefined, onNavigateToUrl?: ((url: string) => void) | undefined) => void;
|
|
190
|
+
export declare const transformBackgroundTasksToAnomalyGroups: (response: BackgroundTasksResponse) => AnomalyGroup[];
|
|
191
|
+
export declare const transformBackgroundTasks: (response: BackgroundTasksResponse, options?: {
|
|
192
|
+
appName?: AppName | undefined;
|
|
193
|
+
backgroundTasksMappingFunc?: ((value: string) => string) | undefined;
|
|
194
|
+
} | undefined) => TransformedBackgroundTasksResponse;
|
|
195
|
+
export declare const getTelemetryPayload: (appName: AppName, key: string, startTime: string | null, endTime: string | null, universeUuid: string, source?: string) => {
|
|
196
|
+
timestamp: number;
|
|
197
|
+
category: string;
|
|
198
|
+
type: string;
|
|
199
|
+
payload: {
|
|
200
|
+
appName: AppName;
|
|
201
|
+
cluster_id: string;
|
|
202
|
+
key: string;
|
|
203
|
+
source: string;
|
|
204
|
+
start_time: string | null;
|
|
205
|
+
end_time: string | null;
|
|
206
|
+
};
|
|
207
|
+
}[];
|
|
208
|
+
/**
|
|
209
|
+
* Processes anomaly group data to extract possible cause information
|
|
210
|
+
* @param anomalyGroupData - The anomaly group data (can be null)
|
|
211
|
+
* @returns Processed data containing observation and possible causes
|
|
212
|
+
*/
|
|
213
|
+
export declare const getAnomalyPossibleCauseData: (anomalyGroupData: AnomalyGroup | null) => AnomalyPossibleCauseData;
|
|
214
|
+
export declare const setLocalStorageItem: (key: string, value: string) => void;
|
|
215
|
+
export declare const getLocalStorageItem: (key: string) => string | null;
|
|
216
|
+
export declare const getOverlappingAnomalyMarkRanges: (intervals: Array<{
|
|
217
|
+
lastInstanceStartTime: string;
|
|
218
|
+
lastInstanceEndTime: string;
|
|
219
|
+
}> | null | undefined, dateTimeRange: {
|
|
220
|
+
startDateTime: Date;
|
|
221
|
+
endDateTime: Date;
|
|
222
|
+
}) => Array<[
|
|
223
|
+
number,
|
|
224
|
+
number
|
|
225
|
+
]>;
|
|
226
|
+
export type AceMode = 'json' | 'sql' | 'pgsql' | 'text';
|
|
227
|
+
export declare function detectAceMode(text: string): AceMode;
|
|
228
|
+
export type ProcessedQueryPlan = QueryPlanEntry & {
|
|
229
|
+
color: string;
|
|
230
|
+
};
|
|
231
|
+
export declare function processQPMData(plans: QueryPlanEntry[]): ProcessedQueryPlan[];
|
|
232
|
+
export declare const formatPlanDate: (iso: string, displayTimezone?: string) => string;
|
|
233
|
+
export declare const formatNumberTo2Decimals: (value: unknown) => string;
|
|
234
|
+
export interface BuildQueryDrilldownUrlParams {
|
|
235
|
+
basePath: string;
|
|
236
|
+
baseSearch: string;
|
|
237
|
+
searchParams: Record<string, string | null | undefined>;
|
|
238
|
+
pathSegments?: string[];
|
|
239
|
+
}
|
|
240
|
+
export declare const buildQueryDrilldownUrl: ({ basePath, baseSearch, searchParams, pathSegments }: BuildQueryDrilldownUrlParams) => string;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './components';
|
|
2
|
+
export * from './common';
|
|
3
|
+
export * from './helpers/config';
|
|
4
|
+
export * from './helpers/constants';
|
|
5
|
+
export * from './helpers/objectUtils';
|
|
6
|
+
export { buildQueryDrilldownUrl } from './helpers/utils';
|
|
7
|
+
export type { BuildQueryDrilldownUrlParams } from './helpers/utils';
|
|
8
|
+
export * from './providers/YBThemeWrapper';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { AppName } from '../components';
|
|
3
|
+
interface YBThemeWrapperProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
appName: AppName;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Wraps components with the YBThemeProvider to ensure proper styling
|
|
9
|
+
* for @yugabyte-ui-library/core components
|
|
10
|
+
*/
|
|
11
|
+
export declare const YBThemeWrapper: React.FC<YBThemeWrapperProps>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AutocompleteClassKey } from '@material-ui/lab/Autocomplete';
|
|
2
|
+
/**
|
|
3
|
+
* Need to declare module directly in this file because we need to extend
|
|
4
|
+
* @types/mui-datatables to include extra property. Putting this declaration
|
|
5
|
+
* with augmentations.d.ts does not work for overriding a declaration from
|
|
6
|
+
* a 3rd party package.
|
|
7
|
+
*/
|
|
8
|
+
declare module '@material-ui/core/styles/overrides' {
|
|
9
|
+
interface ComponentNameToClassKey {
|
|
10
|
+
MUIDataTable: 'root' | 'caption' | 'liveAnnounce' | 'paper' | 'responsiveScroll' | 'tableRoot' | 'responsiveBase';
|
|
11
|
+
MuiAutocomplete: AutocompleteClassKey | 'icon';
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export declare const mainTheme: import('@material-ui/core').Theme;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { CommonColors, PaletteColor, TypeBackground } from '@material-ui/core/styles/createPalette';
|
|
2
|
+
export declare const colors: {
|
|
3
|
+
primary: PaletteColor;
|
|
4
|
+
secondary: PaletteColor;
|
|
5
|
+
grey: PaletteColor;
|
|
6
|
+
error: PaletteColor;
|
|
7
|
+
warning: PaletteColor;
|
|
8
|
+
success: PaletteColor;
|
|
9
|
+
info: PaletteColor;
|
|
10
|
+
background: TypeBackground;
|
|
11
|
+
common: CommonColors;
|
|
12
|
+
chartStroke: {
|
|
13
|
+
cat1: string;
|
|
14
|
+
cat2: string;
|
|
15
|
+
cat3: string;
|
|
16
|
+
cat4: string;
|
|
17
|
+
cat5: string;
|
|
18
|
+
cat6: string;
|
|
19
|
+
cat7: string;
|
|
20
|
+
cat8: string;
|
|
21
|
+
cat9: string;
|
|
22
|
+
cat10: string;
|
|
23
|
+
};
|
|
24
|
+
chartFill: {
|
|
25
|
+
area1: string;
|
|
26
|
+
area2: string;
|
|
27
|
+
area3: string;
|
|
28
|
+
area4: string;
|
|
29
|
+
area5: string;
|
|
30
|
+
area6: string;
|
|
31
|
+
area7: string;
|
|
32
|
+
area8: string;
|
|
33
|
+
area9: string;
|
|
34
|
+
area10: string;
|
|
35
|
+
bar1: string;
|
|
36
|
+
bar2: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export declare const themeVariables: {
|
|
40
|
+
screenMinWidth: number;
|
|
41
|
+
screenMinHeight: number;
|
|
42
|
+
sidebarWidthMin: number;
|
|
43
|
+
sidebarWidthMax: number;
|
|
44
|
+
footerHeight: number;
|
|
45
|
+
toolbarHeight: number;
|
|
46
|
+
inputHeight: number;
|
|
47
|
+
borderRadius: number;
|
|
48
|
+
shadowLight: string;
|
|
49
|
+
shadowThick: string;
|
|
50
|
+
};
|
package/package.json
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yugabytedb/perf-advisor-ui",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "1.0.135",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "dist/esm/index.js",
|
|
6
|
+
"module": "dist/esm/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/esm/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./package.json": "./package.json"
|
|
14
|
+
},
|
|
6
15
|
"author": "Rajagopalan Madhavan",
|
|
7
16
|
"files": [
|
|
8
17
|
"dist",
|
|
@@ -21,37 +30,28 @@
|
|
|
21
30
|
"npm": ">=10"
|
|
22
31
|
},
|
|
23
32
|
"devDependencies": {
|
|
24
|
-
"@
|
|
25
|
-
"@
|
|
26
|
-
"@rollup/plugin-json": "6.0.0",
|
|
27
|
-
"@rollup/plugin-node-resolve": "^15.0.2",
|
|
28
|
-
"@rollup/plugin-replace": "5.0.2",
|
|
29
|
-
"@rollup/plugin-terser": "0.4.4",
|
|
30
|
-
"@rollup/plugin-typescript": "^11.1.0",
|
|
31
|
-
"@testing-library/jest-dom": "^5.16.5",
|
|
32
|
-
"@testing-library/user-event": "^13.5.0",
|
|
33
|
+
"@svgr/core": "8.1.0",
|
|
34
|
+
"@svgr/plugin-jsx": "8.1.0",
|
|
33
35
|
"@typescript-eslint/eslint-plugin": "6.21.0",
|
|
34
36
|
"@typescript-eslint/parser": "6.21.0",
|
|
37
|
+
"@vitejs/plugin-react": "5.2.0",
|
|
35
38
|
"@yugabyte-ui-library/core": "2.0.25",
|
|
36
|
-
"
|
|
39
|
+
"eslint": "7.32.0",
|
|
37
40
|
"eslint-config-prettier": "8.3.0",
|
|
38
41
|
"eslint-plugin-import": "2.23.4",
|
|
39
|
-
"
|
|
40
|
-
"rollup": "
|
|
41
|
-
"rollup-plugin-dts": "5.3.1",
|
|
42
|
-
"rollup-plugin-peer-deps-external": "2.2.4",
|
|
43
|
-
"rollup-plugin-postcss": "^4.0.2",
|
|
44
|
-
"rollup-plugin-visualizer": "5.12.0",
|
|
42
|
+
"prettier": "2.1.0",
|
|
43
|
+
"rollup-plugin-visualizer": "5.14.0",
|
|
45
44
|
"standard-version": "9.5.0",
|
|
46
|
-
"typescript": "5.3.3"
|
|
45
|
+
"typescript": "5.3.3",
|
|
46
|
+
"vite": "8.0.14",
|
|
47
|
+
"vite-plugin-dts": "4.5.4"
|
|
47
48
|
},
|
|
48
49
|
"dependencies": {
|
|
49
50
|
"@material-ui/core": "4.12.3",
|
|
50
51
|
"@material-ui/icons": "4.11.2",
|
|
51
52
|
"@material-ui/lab": "4.0.0-alpha.58",
|
|
52
|
-
"@svgr/rollup": "6.5.1",
|
|
53
53
|
"@types/lodash-es": "4.17.12",
|
|
54
|
-
"@types/node": "
|
|
54
|
+
"@types/node": "22.19.19",
|
|
55
55
|
"@types/react": "17.0.4",
|
|
56
56
|
"@types/react-dom": "17.0.3",
|
|
57
57
|
"@types/react-router": "3.0.24",
|
|
@@ -63,7 +63,6 @@
|
|
|
63
63
|
"date-fns-tz": "2.0.1",
|
|
64
64
|
"echarts": "5.4.3",
|
|
65
65
|
"lodash-es": "4.18.1",
|
|
66
|
-
"prettier": "2.1.0",
|
|
67
66
|
"react": "17.0.2",
|
|
68
67
|
"react-ace": "14.0.1",
|
|
69
68
|
"react-dom": "17.0.2",
|
|
@@ -88,15 +87,21 @@
|
|
|
88
87
|
"react-query": "3.32.1"
|
|
89
88
|
},
|
|
90
89
|
"scripts": {
|
|
91
|
-
"
|
|
92
|
-
"build": "NODE_ENV=
|
|
93
|
-
"
|
|
90
|
+
"build": "NODE_ENV=production vite build",
|
|
91
|
+
"build:dev": "NODE_ENV=development vite build",
|
|
92
|
+
"dev": "NODE_ENV=development vite build --watch",
|
|
93
|
+
"typecheck": "tsc --noEmit",
|
|
94
|
+
"lint": "eslint src --ext .ts,.tsx,.js,.jsx",
|
|
95
|
+
"lint:fix": "eslint src --ext .ts,.tsx,.js,.jsx --fix",
|
|
96
|
+
"format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,css,md}\"",
|
|
97
|
+
"format:check": "prettier --check \"src/**/*.{ts,tsx,js,jsx,json,css,md}\"",
|
|
94
98
|
"changelog": "standard-version",
|
|
95
99
|
"release": "npm install && npm run build && npm publish",
|
|
96
|
-
"dev": "concurrently \"rollup -c -w\" \"nodemon --watch dist --exec 'npx yalc push'\" --names \"BUILD,YALC\" --prefix-colors \"blue,green\"",
|
|
97
100
|
"publish:yalc": "npm run build:dev && npx yalc publish --push"
|
|
98
101
|
},
|
|
99
|
-
"sideEffects":
|
|
102
|
+
"sideEffects": [
|
|
103
|
+
"**/*.css"
|
|
104
|
+
],
|
|
100
105
|
"eslintConfig": {
|
|
101
106
|
"extends": [
|
|
102
107
|
"react-app",
|