[ML] File upload: Adding link to full file upload tool (#211443)

Adds a link to the original file upload page from file upload lite help
text.


![image](https://github.com/user-attachments/assets/12c9799f-95e6-4fa4-81f3-d997a689677a)
This commit is contained in:
James Gowdy 2025-02-17 16:38:05 +00:00 committed by GitHub
parent d6b250b806
commit 24dbf7ecfd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -13,6 +13,7 @@ import {
EuiFlyoutBody,
EuiFlyoutFooter,
EuiFlyoutHeader,
EuiLink,
EuiLoadingSpinner,
EuiSpacer,
EuiText,
@ -38,6 +39,7 @@ import { IndexInput } from './index_input';
import { OverallUploadStatus } from './overall_upload_status';
import { ImportErrors } from './import_errors';
import { DataViewIllustration } from './data_view_illustration';
import { useDataVisualizerKibana } from '../application/kibana_context';
interface Props {
dataStart: DataPublicPluginStart;
@ -63,6 +65,12 @@ export const FileUploadLiteView: FC<Props> = ({
indexSettings,
onClose,
}) => {
const {
services: {
application: { navigateToApp },
},
} = useDataVisualizerKibana();
const [indexName, setIndexName] = useState<string>('');
const [indexValidationStatus, setIndexValidationStatus] = useState<STATUS>(STATUS.NOT_STARTED);
@ -88,6 +96,11 @@ export const FileUploadLiteView: FC<Props> = ({
[uploadStatus.fileClashes]
);
const fullFileUpload = useCallback(
() => navigateToApp('home', { path: '#/tutorial_directory/fileDataViz' }),
[navigateToApp]
);
useEffect(() => {
return () => {
fm.destroy();
@ -131,6 +144,23 @@ export const FileUploadLiteView: FC<Props> = ({
id="xpack.dataVisualizer.file.uploadView.uploadFileDescription"
defaultMessage="Upload your file, analyze its data, and import the data into an Elasticsearch index. The data can also be automatically vectorized using semantic text."
/>
<br />
<FormattedMessage
id="xpack.dataVisualizer.file.uploadView.uploadFileDescriptionLink"
defaultMessage="If you need to customize the file upload process, the full version is available {fullToolLink}."
values={{
fullToolLink: (
<EuiLink onClick={fullFileUpload}>
<FormattedMessage
id="xpack.dataVisualizer.file.uploadView.uploadFileDescriptionLinkText"
defaultMessage="here"
/>
</EuiLink>
),
}}
/>
</p>
</EuiText>