Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Beats CM] Update 'Disenroll' text to be consistent with menu option 'Unenroll'. #26816

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export const BeatsTableType: TableType = {
actions: [
{
name: i18n.translate('xpack.beatsManagement.beatsTable.disenrollSelectedLabel', {
defaultMessage: 'Disenroll Selected',
defaultMessage: 'Unenroll Selected',
}),
action: 'delete',
danger: true,
Expand Down
12 changes: 6 additions & 6 deletions x-pack/plugins/beats_management/public/pages/main/beats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ class BeatsPageUi extends React.PureComponent<BeatsPageProps, BeatsPageState> {
await this.props.libs.beats.update(beat.id, { active: false });
}

this.notifyBeatDisenrolled(selected);
this.notifyBeatUnenrolled(selected);

// because the compile code above has a very minor race condition, we wait,
// the max race condition time is really 10ms but doing 100 to be safe
Expand Down Expand Up @@ -229,15 +229,15 @@ class BeatsPageUi extends React.PureComponent<BeatsPageProps, BeatsPageState> {
}
};

private notifyBeatDisenrolled = async (beats: CMPopulatedBeat[]) => {
private notifyBeatUnenrolled = async (beats: CMPopulatedBeat[]) => {
const { intl } = this.props;
let title;
let text;
if (beats.length === 1) {
title = intl.formatMessage(
{
id: 'xpack.beatsManagement.beats.beatDisenrolledNotificationTitle',
defaultMessage: '{firstBeatNameOrId} disenrolled',
defaultMessage: '{firstBeatNameOrId} unenrolled',
},
{
firstBeatNameOrId: `"${beats[0].name || beats[0].id}"`,
Expand All @@ -246,7 +246,7 @@ class BeatsPageUi extends React.PureComponent<BeatsPageProps, BeatsPageState> {
text = intl.formatMessage(
{
id: 'xpack.beatsManagement.beats.beatDisenrolledNotificationDescription',
defaultMessage: 'Beat with ID {firstBeatId} was disenrolled.',
defaultMessage: 'Beat with ID {firstBeatId} was unenrolled.',
},
{
firstBeatId: `"${beats[0].id}"`,
Expand All @@ -256,7 +256,7 @@ class BeatsPageUi extends React.PureComponent<BeatsPageProps, BeatsPageState> {
title = intl.formatMessage(
{
id: 'xpack.beatsManagement.beats.disenrolledBeatsNotificationTitle',
defaultMessage: '{beatsLength} beats disenrolled',
defaultMessage: '{beatsLength} beats unenrolled',
},
{
beatsLength: beats.length,
Expand All @@ -267,7 +267,7 @@ class BeatsPageUi extends React.PureComponent<BeatsPageProps, BeatsPageState> {
this.setState({
notifications: this.state.notifications.concat({
color: 'warning',
id: `disenroll_${new Date()}`,
id: `unenroll_${new Date()}`,
title,
text,
}),
Expand Down