Skip to content

Commit

Permalink
Fix missing Chart name in Alert Trend Inspect Modal Title (elastic#15…
Browse files Browse the repository at this point in the history
…6476)

issue: elastic#155032

## Summary

Add a title to the "inspect model".

**BEFORE**
<img width="500"
src="https://user-images.githubusercontent.com/1490444/235864517-e04b1f20-454c-4ae7-9ad2-84ffc378cb82.png">

**AFTER**
<img width="500"
src="https://user-images.githubusercontent.com/1490444/235864520-46b9b5d4-9f87-41cc-b71e-e5531a73a26a.png">

(cherry picked from commit 0974e59)
  • Loading branch information
machadoum committed May 4, 2023
1 parent 33efd47 commit 97ca209
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export interface HeaderSectionProps extends HeaderProps {
toggleQuery?: (status: boolean) => void;
toggleStatus?: boolean;
title: string | React.ReactNode;
inspectTitle?: string;
inspectTitle?: React.ReactNode;
titleSize?: EuiTitleSize;
tooltip?: string;
}
Expand Down Expand Up @@ -193,7 +193,7 @@ const HeaderSectionComponent: React.FC<HeaderSectionProps> = ({
queryId={id}
multiple={inspectMultiple}
showInspectButton={showInspectButton}
title={inspectTitle != null ? inspectTitle : title}
title={inspectTitle ?? title}
/>
</EuiFlexItem>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export interface LensEmbeddableComponentProps {
height?: string;
id: string;
inputsModelId?: InputsModelId.global | InputsModelId.timeline;
inspectTitle?: string;
inspectTitle?: React.ReactNode;
lensAttributes?: LensAttributes;
onLoad?: OnEmbeddableLoaded;
scopeId?: SourcererScopeName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ interface AlertsHistogramPanelProps {
extraActions?: Action[];
filters?: Filter[];
headerChildren?: React.ReactNode;
inspectTitle?: string;
inspectTitle?: React.ReactNode;
legendPosition?: Position;
onFieldSelected?: (field: string) => void;
/** Override all defaults, and only display this field */
Expand Down Expand Up @@ -444,7 +444,7 @@ export const AlertsHistogramPanel = memo<AlertsHistogramPanelProps>(
getLensAttributes={getLensAttributes}
height={ChartHeight}
id={visualizationId}
inspectTitle={inspectTitle}
inspectTitle={inspectTitle ?? title}
scopeId={SourcererScopeName.detections}
stackByField={selectedStackByOption}
timerange={timerange}
Expand Down

0 comments on commit 97ca209

Please sign in to comment.