@yugabytedb/perf-advisor-ui 1.0.163 → 1.0.165
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 +7 -8
- package/dist/api.d.ts +4 -1
- package/dist/common/ChartCard/ChartCard.d.ts +10 -1
- package/dist/common/ChartCard/ChartCard.styles.d.ts +8 -1
- package/dist/common/ExpandedChartModal/ExpandChartButton.d.ts +8 -0
- package/dist/common/ExpandedChartModal/ExpandedChartModal.d.ts +15 -0
- package/dist/common/ExpandedChartModal/index.d.ts +5 -0
- package/dist/common/ExpandedChartModal/useExpandedChart.d.ts +17 -0
- package/dist/common/index.d.ts +2 -0
- package/dist/components/SecondaryDashboard/DrilldownView/BindVariablesSection.d.ts +3 -2
- package/dist/components/SecondaryDashboard/GraphView.d.ts +22 -1
- package/dist/components/SecondaryDashboard/Metadata/AnomalyRCAGraphs.d.ts +7 -6
- package/dist/components/hooks/useAnomalyPreselection.d.ts +4 -3
- package/dist/components/hooks/useClusterFilterState.d.ts +5 -2
- package/dist/esm/index.js +16035 -15690
- package/dist/esm/index.js.map +1 -1
- package/dist/helpers/bindVariablesText.d.ts +4 -2
- package/dist/helpers/constants.d.ts +0 -2
- package/dist/helpers/dtos.d.ts +4 -10
- package/dist/helpers/utils.d.ts +2 -2
- package/package.json +7 -7
- package/dist/helpers/gflagUtils.d.ts +0 -4
package/README.md
CHANGED
|
@@ -58,14 +58,13 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
58
58
|
|
|
59
59
|
# Build and Publish UI
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
2. Generates a section for adding notes in CHANGELOG file for latest version
|
|
61
|
+
Bump `version` in `package.json` by hand and append a section to the end of `CHANGELOG.md`
|
|
62
|
+
— it is ordered oldest-first. There is no changelog generator; commit titles here are
|
|
63
|
+
`[PLAT-nnnnn] ...` rather than conventional commits, so nothing can derive the entries.
|
|
65
64
|
|
|
66
65
|
### `npm run release`
|
|
67
66
|
|
|
68
|
-
1.
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
1. Runs `npm ci`, then publishes to the NPM registry using Yugabyte credentials.
|
|
68
|
+
2. Publishing is gated by the `prepublishOnly` hook, which runs `typecheck`, `lint` and the
|
|
69
|
+
production build first, so a broken tree cannot be published. The same gate applies to a
|
|
70
|
+
bare `npm publish`.
|
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, MaterializedViewPagedResponse,
|
|
2
|
+
import { Anomaly, AnomalyDetectionStatus, AnomalyGroup, BackgroundTasksResponse, ClusterLoadResponseData, MetadataFields, GraphRequestParams, QueryPlanData, QueryStatsPagedBody, ClusterDetails, IndexPagedResponse, MaterializedViewPagedResponse, HaState, HaGroupRequest, HaPromoteRequest, RuntimeConfigData, TablePagedResponse } from './helpers/dtos';
|
|
3
3
|
export declare enum QUERY_KEY {
|
|
4
4
|
fetchAnomalies = "fetchAnomalies",
|
|
5
5
|
fetchGraphs = "fetchGraphs",
|
|
@@ -23,6 +23,7 @@ export declare enum QUERY_KEY {
|
|
|
23
23
|
fetchSpecificRuntimeConfigs = "fetchSpecificRuntimeConfigs",
|
|
24
24
|
fetchSpecificRuntimeConfigsKey = "fetchSpecificRuntimeConfigsKey",
|
|
25
25
|
updateRuntimeConfig = "updateRuntimeConfig",
|
|
26
|
+
fetchUniverseRuntimeConfigs = "fetchUniverseRuntimeConfigs",
|
|
26
27
|
fetchAnomalyGroups = "fetchAnomalyGroups",
|
|
27
28
|
fetchAnomalyGroupsByType = "fetchAnomalyGroupsByType",
|
|
28
29
|
fetchAnomalyGroupsById = "fetchAnomalyGroupsById",
|
|
@@ -116,6 +117,8 @@ declare class ApiService {
|
|
|
116
117
|
fetchSpecificRuntimeConfigs: (scopeUuid: string | undefined, keys: string[], apiUrl?: string) => Promise<string[]>;
|
|
117
118
|
updateRuntimeConfig: (scopeUuid: string | undefined, configKey: string, configValue: string, apiUrl?: string) => Promise<any>;
|
|
118
119
|
deleteRuntimeConfig: (scopeUuid: string | undefined, configKey: string, apiUrl?: string) => Promise<any>;
|
|
120
|
+
fetchUniverseRuntimeConfigs: (universeUuid: string, keys: string[], apiUrl?: string) => Promise<RuntimeConfigData[]>;
|
|
121
|
+
updateUniverseRuntimeConfig: (universeUuid: string, configKey: string, configValue: string, apiUrl?: string) => Promise<any>;
|
|
119
122
|
fetchBackgroundTasks: (universeUuid: string, startTime: string | null, endTime: string | null, limit?: number | null, apiUrl?: string) => Promise<BackgroundTasksResponse>;
|
|
120
123
|
fetchAnomalyGroups: (universeUuid: string, startTime: string | null, endTime: string | null, anomalyType: string | undefined, getClusterDetails: () => ClusterDetails, apiUrl?: string) => {};
|
|
121
124
|
fetchAnomalyGroupsByType: (universeUuid: string, startTime: string, endTime: string, anomalyType: string, apiUrl?: string) => Promise<AnomalyGroup[]>;
|
|
@@ -15,7 +15,16 @@ export interface ChartCardProps {
|
|
|
15
15
|
config?: ChartConfig;
|
|
16
16
|
rescaleYAxisOnLegendToggle?: boolean;
|
|
17
17
|
renderError?: RenderErrorFn;
|
|
18
|
+
/**
|
|
19
|
+
* When provided, an expand affordance is rendered in the card header. Omit it
|
|
20
|
+
* (the default) to keep the header as-is.
|
|
21
|
+
*/
|
|
22
|
+
onExpand?: () => void;
|
|
23
|
+
/** Marks this instance as the fullscreen copy rendered inside ExpandedChartModal. */
|
|
24
|
+
isExpanded?: boolean;
|
|
25
|
+
/** Explicit card height in px. Defaults to the standard in-grid card height. */
|
|
26
|
+
chartHeight?: number;
|
|
18
27
|
onEChartsDateSelect: (start: number, end: number) => void;
|
|
19
28
|
onFilterBarData?: (data: string[]) => void;
|
|
20
29
|
}
|
|
21
|
-
export declare const ChartCard: ({ title, titleInfo, headerRightSlot, data, chartType, isLoading, isError, errorText, metricKey, timezone, config, rescaleYAxisOnLegendToggle, renderError, onEChartsDateSelect, onFilterBarData }: ChartCardProps) => JSX.Element;
|
|
30
|
+
export declare const ChartCard: ({ title, titleInfo, headerRightSlot, data, chartType, isLoading, isError, errorText, metricKey, timezone, config, rescaleYAxisOnLegendToggle, renderError, onExpand, isExpanded, chartHeight, onEChartsDateSelect, onFilterBarData }: ChartCardProps) => JSX.Element;
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const DEFAULT_CARD_HEIGHT = 320;
|
|
2
|
+
export interface ChartCardStyleProps {
|
|
3
|
+
/** Total card height in px. Defaults to the standard in-grid card height. */
|
|
4
|
+
cardHeight?: number;
|
|
5
|
+
/** Fullscreen copy: the dialog provides the frame, so drop the card border. */
|
|
6
|
+
isExpanded?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const useChartCardStyles: (props: ChartCardStyleProps) => import('@material-ui/styles').ClassNameMap<string>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface ExpandedChartSize {
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
}
|
|
6
|
+
interface ExpandedChartModalProps {
|
|
7
|
+
open: boolean;
|
|
8
|
+
title: ReactNode;
|
|
9
|
+
dataTestId: string;
|
|
10
|
+
onClose: () => void;
|
|
11
|
+
headerRightSlot?: ReactNode;
|
|
12
|
+
children: (size: ExpandedChartSize) => ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export declare const ExpandedChartModal: ({ open, title, dataTestId, onClose, headerRightSlot, children }: ExpandedChartModalProps) => JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { ExpandChartButton } from './ExpandChartButton';
|
|
2
|
+
export { ExpandedChartModal } from './ExpandedChartModal';
|
|
3
|
+
export type { ExpandedChartSize } from './ExpandedChartModal';
|
|
4
|
+
export { useExpandedChart } from './useExpandedChart';
|
|
5
|
+
export type { UseExpandedChartResult, SharedChartControlProps } from './useExpandedChart';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GraphView props that hand its header selectors over to this hook. Spread these
|
|
3
|
+
* into the prop builder shared by a grid card and its fullscreen copy.
|
|
4
|
+
*/
|
|
5
|
+
export interface SharedChartControlProps {
|
|
6
|
+
selectedMetricOperation: string | null;
|
|
7
|
+
selectedGroupByOperation: string | null;
|
|
8
|
+
onMetricOperationChange: (operation: string) => void;
|
|
9
|
+
onGroupByOperationChange: (operation: string) => void;
|
|
10
|
+
}
|
|
11
|
+
export interface UseExpandedChartResult {
|
|
12
|
+
expandedKey: string | null;
|
|
13
|
+
expand: (key: string) => void;
|
|
14
|
+
collapse: () => void;
|
|
15
|
+
getSharedControlProps: (chartKey: string) => SharedChartControlProps;
|
|
16
|
+
}
|
|
17
|
+
export declare const useExpandedChart: () => UseExpandedChartResult;
|
package/dist/common/index.d.ts
CHANGED
|
@@ -13,3 +13,5 @@ export { NodeTypeSelector } from './PAHeader/NodeTypeSelector';
|
|
|
13
13
|
export { YBCheckboxField } from './YBCheckbox/YBCheckboxField';
|
|
14
14
|
export { PerfAdvisorCodeBlock } from './PerfAdvisorCodeBlock/PerfAdvisorCodeBlock';
|
|
15
15
|
export { CopyToClipboardButton } from './CopyToClipboardButton/CopyToClipboardButton';
|
|
16
|
+
export { ExpandChartButton, ExpandedChartModal, useExpandedChart } from './ExpandedChartModal';
|
|
17
|
+
export type { ExpandedChartSize, UseExpandedChartResult, SharedChartControlProps } from './ExpandedChartModal';
|
|
@@ -4,7 +4,8 @@ interface BindVariablesSectionProps {
|
|
|
4
4
|
universeUuid: string;
|
|
5
5
|
apiUrl: string;
|
|
6
6
|
appName: AppName;
|
|
7
|
-
|
|
7
|
+
bindVariablesSupported: boolean;
|
|
8
|
+
bindVariablesEnabled: boolean;
|
|
8
9
|
}
|
|
9
|
-
export declare const BindVariablesSection: ({ bindVariables, universeUuid, apiUrl, appName,
|
|
10
|
+
export declare const BindVariablesSection: ({ bindVariables, universeUuid, apiUrl, appName, bindVariablesSupported, bindVariablesEnabled }: BindVariablesSectionProps) => JSX.Element;
|
|
10
11
|
export {};
|
|
@@ -45,9 +45,30 @@ interface GraphViewProps {
|
|
|
45
45
|
* works with both legend isolation and native per-series toggle.
|
|
46
46
|
*/
|
|
47
47
|
rescaleYAxisOnLegendToggle?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* When provided, an expand affordance is rendered in the graph header. Omit it
|
|
50
|
+
* (the default) to keep the header as-is.
|
|
51
|
+
*/
|
|
52
|
+
onExpand?: () => void;
|
|
53
|
+
/**
|
|
54
|
+
* Marks this instance as the fullscreen copy rendered inside ExpandedChartModal:
|
|
55
|
+
* pixel grid insets, longer legend labels, DOM ids suffixed to avoid colliding
|
|
56
|
+
* with the in-grid copy, and container-driven (rather than clamped) sizing.
|
|
57
|
+
*/
|
|
58
|
+
isExpanded?: boolean;
|
|
59
|
+
/** Explicit chart height in px. Defaults to the standard in-grid height. */
|
|
60
|
+
chartHeight?: number;
|
|
61
|
+
/**
|
|
62
|
+
* Header selector state. Supplying a value together with its change handler
|
|
63
|
+
* makes that selector controlled; GraphView otherwise owns it internally.
|
|
64
|
+
*/
|
|
65
|
+
selectedMetricOperation?: string | null;
|
|
66
|
+
onMetricOperationChange?: (operation: string) => void;
|
|
67
|
+
selectedGroupByOperation?: string | null;
|
|
68
|
+
onGroupByOperationChange?: (operation: string) => void;
|
|
48
69
|
registerChartInstance?: (instance: echarts.ECharts) => void;
|
|
49
70
|
onEChartsDateSelect: (startDateTime: number, endDateTime: number) => void;
|
|
50
71
|
onSelectAshLabel?: (groupBy: string, metricData: GraphResponse, isHistoricalQueryView?: boolean) => void;
|
|
51
72
|
}
|
|
52
|
-
export declare const GraphView: React.MemoExoticComponent<({ metricData, appName, metricKey, metricMeasure, operations, groupByOperations, anomalyData, height, isRecommendationGraph, timezone, graphTitle, graphType, queryData, dateTimeRange, isHistoricalQueryView, showTitle, loading, useStackedBars, enableLegendIsolation, rescaleYAxisOnLegendToggle, onEChartsDateSelect, onSelectAshLabel, registerChartInstance }: GraphViewProps) => JSX.Element>;
|
|
73
|
+
export declare const GraphView: React.MemoExoticComponent<({ metricData, appName, metricKey, metricMeasure, operations, groupByOperations, anomalyData, height, isRecommendationGraph, timezone, graphTitle, graphType, queryData, dateTimeRange, isHistoricalQueryView, showTitle, loading, useStackedBars, enableLegendIsolation, rescaleYAxisOnLegendToggle, onExpand, isExpanded, chartHeight, selectedMetricOperation: metricOperationProp, onMetricOperationChange, selectedGroupByOperation: groupByOperationProp, onGroupByOperationChange, onEChartsDateSelect, onSelectAshLabel, registerChartInstance }: GraphViewProps) => JSX.Element>;
|
|
53
74
|
export {};
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { AnomalyGroup, AppName, ClusterDetails, GraphRequestParams, UrlParams } from '../../../helpers/dtos';
|
|
2
|
+
interface FormattedMainGraph {
|
|
3
|
+
name: string;
|
|
4
|
+
index: number;
|
|
5
|
+
groupByControl: boolean;
|
|
6
|
+
displayName?: string;
|
|
7
|
+
}
|
|
2
8
|
interface AnomalyRCAGraphsProps {
|
|
3
9
|
appName: AppName;
|
|
4
10
|
metricMeasure: string;
|
|
@@ -7,12 +13,7 @@ interface AnomalyRCAGraphsProps {
|
|
|
7
13
|
anomalyData: AnomalyGroup;
|
|
8
14
|
apiUrl: string;
|
|
9
15
|
amomalyGraphRequestParams?: GraphRequestParams[] | null;
|
|
10
|
-
formattedMainGraphs?:
|
|
11
|
-
name: string;
|
|
12
|
-
index: number;
|
|
13
|
-
groupByControl: boolean;
|
|
14
|
-
displayName?: string;
|
|
15
|
-
}[];
|
|
16
|
+
formattedMainGraphs?: FormattedMainGraph[];
|
|
16
17
|
urlParams: UrlParams;
|
|
17
18
|
dateTimeRange: {
|
|
18
19
|
startDateTime: Date;
|
|
@@ -14,13 +14,14 @@ export interface UseAnomalyPreselectionParams {
|
|
|
14
14
|
dateTimeRange: DateTimeRange;
|
|
15
15
|
region: string;
|
|
16
16
|
node: string;
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
hasUserScopeOverride: boolean;
|
|
18
|
+
applyClusterRegionSelection: (selection: ClusterRegionSelection) => void;
|
|
19
|
+
applyZoneNodeSelection: (selection: ZoneNodeSelection) => void;
|
|
19
20
|
setMetricMeasure: Dispatch<SetStateAction<MetricMeasure>>;
|
|
20
21
|
}
|
|
21
22
|
/**
|
|
22
23
|
* Applies all of an anomaly's initial-load pre-selections (affected node, affected region, and the
|
|
23
24
|
* split/measure) to the page-level cluster-filter + metric-measure state.
|
|
24
25
|
*/
|
|
25
|
-
export declare const useAnomalyPreselection: ({ viewConfig, anomalyGroupData, universeUuid, apiUrl, dateTimeRange, region, node,
|
|
26
|
+
export declare const useAnomalyPreselection: ({ viewConfig, anomalyGroupData, universeUuid, apiUrl, dateTimeRange, region, node, hasUserScopeOverride, applyClusterRegionSelection, applyZoneNodeSelection, setMetricMeasure }: UseAnomalyPreselectionParams) => void;
|
|
26
27
|
export {};
|
|
@@ -23,8 +23,11 @@ export declare const useClusterFilterState: () => {
|
|
|
23
23
|
zone: string;
|
|
24
24
|
node: string;
|
|
25
25
|
nodeType: NodeType;
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
hasUserScopeOverride: boolean;
|
|
27
|
+
applyClusterRegionSelection: ({ isCluster, isRegion, selectedOption, isPrimaryCluster, clusterUuid }: ClusterRegionSelection) => void;
|
|
28
|
+
applyZoneNodeSelection: ({ isZone, isNode, selectedOption, clusterUuid, isPrimaryCluster: isPrimary, showClusterTag }: ZoneNodeSelection) => void;
|
|
29
|
+
onClusterRegionSelected: (selection: ClusterRegionSelection) => void;
|
|
30
|
+
onZoneNodeSelected: (selection: ZoneNodeSelection) => void;
|
|
28
31
|
onNodeTypeSelected: (selection: NodeType) => void;
|
|
29
32
|
resetFilters: () => void;
|
|
30
33
|
};
|