Skip to content

Commit

Permalink
[Index Management] Fix lifecycle tooltip copy on serverless (#184715)
Browse files Browse the repository at this point in the history
  • Loading branch information
sabarasaba authored Jun 5, 2024
1 parent a7af72c commit 115f9cb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export const DataStreamDetailPanel: React.FunctionComponent<Props> = ({
const { error, data: dataStream, isLoading } = useLoadDataStream(dataStreamName);

const ilmPolicyLink = useIlmLocator(ILM_PAGES_POLICY_EDIT, dataStream?.ilmPolicyName);
const { history } = useAppContext();
const { history, config } = useAppContext();
let indicesLink;

let content;
Expand Down Expand Up @@ -314,7 +314,10 @@ export const DataStreamDetailPanel: React.FunctionComponent<Props> = ({
defaultMessage: 'Effective data retention',
}),
toolTip: i18n.translate('xpack.idxMgmt.dataStreamDetailPanel.dataRetentionToolTip', {
defaultMessage: `Data is kept at least this long before being automatically deleted. The data retention value only applies to the data managed directly by the data stream. If some data is subject to an index lifecycle management policy, then the data retention value set for the data stream doesn't apply to that data.`,
defaultMessage: `Data is kept at least this long before being automatically deleted. The data retention value only applies to the data managed directly by the data stream. {canEnableDataRetention, plural, one {If some data is subject to an index lifecycle management policy, then the data retention value set for the data stream doesn't apply to that data.} other {}}`,
values: {
canEnableDataRetention: config.enableTogglingDataRetention ? 1 : 0,
},
}),
content: (
<ConditionalWrap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,13 @@ export const DataStreamTable: React.FunctionComponent<Props> = ({
name: (
<EuiToolTip
content={i18n.translate('xpack.idxMgmt.dataStreamList.table.dataRetentionColumnTooltip', {
defaultMessage: `Data is kept at least this long before being automatically deleted. The data retention value only applies to the data managed directly by the data stream. If some data is subject to an index lifecycle management policy, then the data retention value set for the data stream doesn't apply to that data.`,
defaultMessage: `Data is kept at least this long before being automatically deleted. The data retention value only applies to the data managed directly by the data stream. {canDisableDataRetention, plural, one {If some data is subject to an index lifecycle management policy, then the data retention value set for the data stream doesn't apply to that data.} other {}}`,
values: {
// ILM is not applicable on serverless, so when the user isnt able to
// disable data retention (which is only for serverless) we want to
// tweak the copy of the tooltip to hide any references to it.
canDisableDataRetention: config.enableTogglingDataRetention ? 1 : 0,
},
})}
>
<span>
Expand Down

0 comments on commit 115f9cb

Please sign in to comment.