Skip to content

Commit

Permalink
[Logs UI] Remove unnecessary mountReactNode usage (#122173)
Browse files Browse the repository at this point in the history
Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
weltenwort and kibanamachine authored Jan 4, 2022
1 parent c69aac8 commit 8a1f595
Showing 1 changed file with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
* 2.0.
*/

import { EuiCard, EuiIcon, EuiButtonEmpty, EuiSpacer } from '@elastic/eui';
import { EuiButtonEmpty, EuiCard, EuiIcon, EuiSpacer } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n-react';
import React, { useEffect, useState } from 'react';
import { SetupStatus } from '../../../../../common/log_analysis';
import { CreateJobButton, RecreateJobButton } from '../../log_analysis_setup/create_job_button';
import { useKibanaContextForPlugin } from '../../../../hooks/use_kibana';
import { mountReactNode } from '../../../../../../../../src/core/public/utils';
import { CreateJobButton, RecreateJobButton } from '../../log_analysis_setup/create_job_button';

export const LogAnalysisModuleListCard: React.FC<{
jobId: string;
Expand Down Expand Up @@ -41,12 +41,7 @@ export const LogAnalysisModuleListCard: React.FC<{
const getMlUrl = async () => {
if (!ml.locator) {
toasts.addWarning({
title: mountReactNode(
<FormattedMessage
id="xpack.infra.logs.analysis.mlNotAvailable"
defaultMessage="ML plugin is not available"
/>
),
title: mlNotAvailableMessage,
});
return;
}
Expand Down Expand Up @@ -102,3 +97,7 @@ export const LogAnalysisModuleListCard: React.FC<{
/>
);
};

const mlNotAvailableMessage = i18n.translate('xpack.infra.logs.analysis.mlNotAvailable', {
defaultMessage: 'ML plugin is not available',
});

0 comments on commit 8a1f595

Please sign in to comment.