@yugabytedb/perf-advisor-ui 1.0.156 → 1.0.157
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/common/ChartCard/ChartCard.d.ts +2 -1
- package/dist/common/ChartCard/helpers/axes.d.ts +1 -0
- package/dist/common/ChartCard/helpers/index.d.ts +3 -2
- package/dist/common/ChartCard/helpers/interactions.d.ts +3 -1
- package/dist/common/ChartCard/helpers/legend.d.ts +2 -1
- package/dist/common/ChartCard/types.d.ts +20 -2
- package/dist/components/GanttChart/utils/severity.d.ts +6 -0
- package/dist/components/PrimaryDashboard/chartConfigs/cpuByDatabaseConfig.d.ts +1 -2
- package/dist/components/PrimaryDashboard/chartConfigs/shared.d.ts +0 -1
- package/dist/components/SecondaryDashboard/GraphView.d.ts +15 -1
- package/dist/components/hooks/useIsTruncated.d.ts +2 -0
- package/dist/esm/index.js +13855 -13287
- package/dist/esm/index.js.map +1 -1
- package/dist/helpers/echartsLegend.d.ts +6 -0
- package/package.json +1 -1
|
@@ -13,8 +13,9 @@ export interface ChartCardProps {
|
|
|
13
13
|
metricKey: string;
|
|
14
14
|
timezone?: string;
|
|
15
15
|
config?: ChartConfig;
|
|
16
|
+
rescaleYAxisOnLegendToggle?: boolean;
|
|
16
17
|
renderError?: RenderErrorFn;
|
|
17
18
|
onEChartsDateSelect: (start: number, end: number) => void;
|
|
18
19
|
onFilterBarData?: (data: string[]) => void;
|
|
19
20
|
}
|
|
20
|
-
export declare const ChartCard: ({ title, titleInfo, headerRightSlot, data, chartType, isLoading, isError, errorText, metricKey, timezone, config, renderError, onEChartsDateSelect, onFilterBarData }: ChartCardProps) => JSX.Element;
|
|
21
|
+
export declare const ChartCard: ({ title, titleInfo, headerRightSlot, data, chartType, isLoading, isError, errorText, metricKey, timezone, config, rescaleYAxisOnLegendToggle, renderError, onEChartsDateSelect, onFilterBarData }: ChartCardProps) => JSX.Element;
|
|
@@ -37,6 +37,7 @@ export interface ValueAxisConfig {
|
|
|
37
37
|
splitNumber: number;
|
|
38
38
|
max: number;
|
|
39
39
|
}
|
|
40
|
+
export declare const buildYAxis: (yAxisMax: number) => ValueAxisConfig;
|
|
40
41
|
export declare const buildAxes: (timezone: string | undefined, startTime: number | undefined, endTime: number | undefined, yAxisMax: number) => {
|
|
41
42
|
xAxis: TimeAxisConfig;
|
|
42
43
|
yAxis: ValueAxisConfig;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { buildAxes, computeYAxisMax } from './axes';
|
|
1
|
+
export { buildAxes, buildYAxis, computeYAxisMax } from './axes';
|
|
2
2
|
export type { TimeAxisConfig, ValueAxisConfig } from './axes';
|
|
3
3
|
export { buildSeries } from './series';
|
|
4
4
|
export type { BuildSeriesResult } from './series';
|
|
@@ -7,5 +7,6 @@ export type { BuiltLegend } from './legend';
|
|
|
7
7
|
export { buildTooltip } from './tooltip';
|
|
8
8
|
export type { BuiltTooltip } from './tooltip';
|
|
9
9
|
export { applyAnomalyOverlay } from './anomalyOverlay';
|
|
10
|
-
export { wireDragToZoom,
|
|
10
|
+
export { wireDragToZoom, wireYAxisRescale, applyYAxisMax, injectLegendTestIds } from './interactions';
|
|
11
11
|
export type { DateSelectHandler } from './interactions';
|
|
12
|
+
export { wireLegendIsolation } from '../../../helpers/echartsLegend';
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { MutableRefObject } from 'react';
|
|
2
|
+
import { EChartsSeriesItem } from '../types';
|
|
2
3
|
import * as echarts from 'echarts/core';
|
|
3
4
|
export type DateSelectHandler = (start: number, end: number) => void;
|
|
4
5
|
export declare const wireDragToZoom: (instance: echarts.EChartsType, onSelectRef: MutableRefObject<DateSelectHandler>) => (() => void);
|
|
5
|
-
export declare const
|
|
6
|
+
export declare const applyYAxisMax: (instance: echarts.EChartsType, visibleSeries: EChartsSeriesItem[], allSeries: EChartsSeriesItem[], quickAnimation?: boolean) => void;
|
|
7
|
+
export declare const wireYAxisRescale: (instance: echarts.EChartsType, series: EChartsSeriesItem[]) => void;
|
|
6
8
|
export declare const injectLegendTestIds: (container: HTMLElement | null, nameMapping: Record<string, string>) => void;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { LegendPosition } from '../../../helpers/dtos';
|
|
2
|
-
import { ChartConfig, EChartsSeriesItem, LegendIconOverride, LegendRichStyles } from '../types';
|
|
2
|
+
import { ChartConfig, EChartsLineStyle, EChartsSeriesItem, LegendIconOverride, LegendRichStyles } from '../types';
|
|
3
3
|
interface LegendDataEntry {
|
|
4
4
|
name: string;
|
|
5
5
|
icon?: LegendIconOverride;
|
|
6
|
+
lineStyle?: EChartsLineStyle;
|
|
6
7
|
}
|
|
7
8
|
export interface BuiltLegend {
|
|
8
9
|
type: 'scroll';
|
|
@@ -26,6 +26,7 @@ export interface EChartsItemStyle {
|
|
|
26
26
|
color?: string;
|
|
27
27
|
borderColor?: string;
|
|
28
28
|
borderWidth?: number;
|
|
29
|
+
opacity?: number;
|
|
29
30
|
}
|
|
30
31
|
export interface EChartsSeriesEmphasis {
|
|
31
32
|
lineStyle?: EChartsLineStyle;
|
|
@@ -40,6 +41,22 @@ export interface EChartsMarkArea {
|
|
|
40
41
|
data: Array<[EChartsMarkAreaDatum, EChartsMarkAreaDatum]>;
|
|
41
42
|
itemStyle?: EChartsItemStyle;
|
|
42
43
|
}
|
|
44
|
+
export interface EChartsMarkLine {
|
|
45
|
+
silent?: boolean;
|
|
46
|
+
symbol?: EChartsSymbol;
|
|
47
|
+
lineStyle?: EChartsLineStyle;
|
|
48
|
+
label?: {
|
|
49
|
+
show?: boolean;
|
|
50
|
+
position?: 'start' | 'middle' | 'end';
|
|
51
|
+
formatter?: (params?: unknown) => string;
|
|
52
|
+
color?: string;
|
|
53
|
+
fontFamily?: string;
|
|
54
|
+
fontSize?: number;
|
|
55
|
+
};
|
|
56
|
+
data: Array<{
|
|
57
|
+
yAxis: number;
|
|
58
|
+
}>;
|
|
59
|
+
}
|
|
43
60
|
export interface EChartsSeriesItem {
|
|
44
61
|
name: string;
|
|
45
62
|
type: 'line' | 'bar';
|
|
@@ -57,7 +74,7 @@ export interface EChartsSeriesItem {
|
|
|
57
74
|
z?: number;
|
|
58
75
|
emphasis?: EChartsSeriesEmphasis;
|
|
59
76
|
markArea?: EChartsMarkArea;
|
|
60
|
-
|
|
77
|
+
markLine?: EChartsMarkLine;
|
|
61
78
|
}
|
|
62
79
|
export interface EChartsTooltipParam {
|
|
63
80
|
seriesName: string;
|
|
@@ -108,10 +125,11 @@ export interface SeriesBuildContext {
|
|
|
108
125
|
showLegend: boolean;
|
|
109
126
|
showLineSymbols: boolean;
|
|
110
127
|
}
|
|
111
|
-
export type LegendIconOverride = 'none' | 'roundRect' | 'circle';
|
|
128
|
+
export type LegendIconOverride = 'none' | 'roundRect' | 'circle' | 'inherit';
|
|
112
129
|
export interface LegendItemDescriptor {
|
|
113
130
|
iconOverride?: LegendIconOverride;
|
|
114
131
|
formattedLabel?: string;
|
|
132
|
+
lineStyle?: EChartsLineStyle;
|
|
115
133
|
}
|
|
116
134
|
export type MarkAreaStyleOverride = Partial<Omit<EChartsMarkArea, 'data' | 'xAxisIndex'>>;
|
|
117
135
|
export interface AnomalyOverlayConfig {
|
|
@@ -16,4 +16,10 @@ export declare function getSeverityTextColor(severity: Severity): string;
|
|
|
16
16
|
export declare function shouldShowStatusDot(severity: Severity): boolean;
|
|
17
17
|
export declare function getHighestSeverity(severities: Severity[]): Severity;
|
|
18
18
|
export declare function getStatusDotTooltip(severity: Severity): TooltipContent | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Formats a load percent for display. Small non-zero values that round to
|
|
21
|
+
* "0.00%" at 2 decimal places read as no load at all — surface them as
|
|
22
|
+
* "<0.01%" instead. Values that round to 0.01% or higher are shown as-is.
|
|
23
|
+
*/
|
|
24
|
+
export declare function formatLoadPercent(loadPercent: number): string;
|
|
19
25
|
export declare function getPrefixTooltip(loadPercent: number): TooltipContent;
|
|
@@ -3,7 +3,6 @@ import { AnomalyGroup } from '../../../helpers/dtos';
|
|
|
3
3
|
export interface CpuByDatabaseConfigOptions {
|
|
4
4
|
anomalyData?: AnomalyGroup | null;
|
|
5
5
|
shouldAbbreviateTraceName?: boolean;
|
|
6
|
-
thresholdValuesMap?: Record<string | number, number>;
|
|
7
6
|
}
|
|
8
|
-
export declare const makeCpuByDatabaseConfig: ({ anomalyData, shouldAbbreviateTraceName
|
|
7
|
+
export declare const makeCpuByDatabaseConfig: ({ anomalyData, shouldAbbreviateTraceName }?: CpuByDatabaseConfigOptions) => ChartConfig;
|
|
9
8
|
export declare const cpuByDatabaseConfig: ChartConfig;
|
|
@@ -2,7 +2,6 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { EChartsPoint, RichTextFragment, SeriesDataItem } from '../../../common/ChartCard';
|
|
3
3
|
import { AppName } from '../../../helpers/dtos';
|
|
4
4
|
export declare const DASHED_LINE_RICH: RichTextFragment;
|
|
5
|
-
export declare const THRESHOLD_LINE_RICH: RichTextFragment;
|
|
6
5
|
export declare const THICK_LINE_RICH: RichTextFragment;
|
|
7
6
|
export declare const toPoints: (item: SeriesDataItem) => EChartsPoint[];
|
|
8
7
|
export declare const makeYbHostRenderError: (appName: AppName) => (errorText?: string) => ReactNode;
|
|
@@ -31,9 +31,23 @@ interface GraphViewProps {
|
|
|
31
31
|
* render as a dashed line.
|
|
32
32
|
*/
|
|
33
33
|
useStackedBars?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Legend interaction mode. When true (default), clicking a legend isolates
|
|
36
|
+
* that series (hides all others; clicking it again restores every series).
|
|
37
|
+
* When false, ECharts' native per-series toggle is used (a click hides only
|
|
38
|
+
* the clicked series).
|
|
39
|
+
*/
|
|
40
|
+
enableLegendIsolation?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* When true, recompute the y-axis ceiling from only the currently-visible
|
|
43
|
+
* series whenever the legend selection changes, so hiding a tall line lets
|
|
44
|
+
* the remaining series expand to fill the chart. Opt-in (default false);
|
|
45
|
+
* works with both legend isolation and native per-series toggle.
|
|
46
|
+
*/
|
|
47
|
+
rescaleYAxisOnLegendToggle?: boolean;
|
|
34
48
|
registerChartInstance?: (instance: echarts.ECharts) => void;
|
|
35
49
|
onEChartsDateSelect: (startDateTime: number, endDateTime: number) => void;
|
|
36
50
|
onSelectAshLabel?: (groupBy: string, metricData: GraphResponse, isHistoricalQueryView?: boolean) => void;
|
|
37
51
|
}
|
|
38
|
-
export declare const GraphView: React.MemoExoticComponent<({ metricData, appName, metricKey, metricMeasure, operations, groupByOperations, anomalyData, height, isRecommendationGraph, timezone, graphTitle, graphType, queryData, dateTimeRange, isHistoricalQueryView, showTitle, loading, useStackedBars, onEChartsDateSelect, onSelectAshLabel, registerChartInstance }: GraphViewProps) => JSX.Element>;
|
|
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>;
|
|
39
53
|
export {};
|