Skip to content
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 @@ -128,6 +128,7 @@ export const MlPage: FC<{ pageDeps: PageDependencies }> = React.memo(({ pageDeps
className={'ml-app'}
data-test-subj={'mlApp'}
restrictWidth={false}
panelled
solutionNav={
showMLNavMenu
? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import type { FC } from 'react';
import React, { useEffect, useState } from 'react';
import { EuiCallOut, EuiLoadingSpinner } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n-react';
import { useEnabledFeatures } from '../../../../contexts/ml';
import { ML_DATA_PREVIEW_COUNT } from '../../../../../../common/util/job_utils';
import { useMlApiContext } from '../../../../contexts/kibana';
import { usePermissionCheck } from '../../../../capabilities/check_capabilities';
Expand All @@ -23,6 +24,7 @@ export const DatafeedPreviewPane: FC<Props> = ({ job }) => {
const {
jobs: { datafeedPreview },
} = useMlApiContext();
const { showNodeInfo } = useEnabledFeatures();

const canPreviewDatafeed = usePermissionCheck('canPreviewDatafeed');
const [loading, setLoading] = useState(false);
Expand Down Expand Up @@ -54,7 +56,7 @@ export const DatafeedPreviewPane: FC<Props> = ({ job }) => {
) : (
<>
{previewJson === null ? (
<EmptyResults />
<EmptyResults showFrozenTierText={showNodeInfo === true} />
) : (
<MLJobEditor value={previewJson} readOnly={true} />
)}
Expand Down Expand Up @@ -82,7 +84,7 @@ const InsufficientPermissions: FC = () => (
</EuiCallOut>
);

const EmptyResults: FC = () => (
const EmptyResults: FC<{ showFrozenTierText: boolean }> = ({ showFrozenTierText }) => (
<EuiCallOut
title={
<FormattedMessage
Expand All @@ -93,11 +95,13 @@ const EmptyResults: FC = () => (
color="warning"
iconType="warning"
>
<p>
<FormattedMessage
id="xpack.ml.jobsList.jobDetails.noResults.text"
defaultMessage="Note: Datafeed preview does not return results from frozen tiers."
/>
</p>
{showFrozenTierText ? (
<p>
<FormattedMessage
id="xpack.ml.jobsList.jobDetails.noResults.text"
defaultMessage="Note: Datafeed preview does not return results from frozen tiers."
/>
</p>
) : null}
</EuiCallOut>
);