mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-30 03:46:10 +00:00
parent
2120b38672
commit
7009fb7c77
@ -12,7 +12,6 @@
|
|||||||
*/
|
*/
|
||||||
import { CheckOutlined } from '@ant-design/icons';
|
import { CheckOutlined } from '@ant-design/icons';
|
||||||
import { Button, Divider, Space } from 'antd';
|
import { Button, Divider, Space } from 'antd';
|
||||||
import { AxiosError } from 'axios';
|
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { Link, useHistory } from 'react-router-dom';
|
import { Link, useHistory } from 'react-router-dom';
|
||||||
@ -22,7 +21,6 @@ import {
|
|||||||
getEditIngestionPath,
|
getEditIngestionPath,
|
||||||
getLogsViewerPath,
|
getLogsViewerPath,
|
||||||
} from '../../../../utils/RouterUtils';
|
} from '../../../../utils/RouterUtils';
|
||||||
import { showErrorToast, showSuccessToast } from '../../../../utils/ToastUtils';
|
|
||||||
import Loader from '../../../common/Loader/Loader';
|
import Loader from '../../../common/Loader/Loader';
|
||||||
import KillIngestionModal from '../../../Modals/KillIngestionPipelineModal/KillIngestionPipelineModal';
|
import KillIngestionModal from '../../../Modals/KillIngestionPipelineModal/KillIngestionPipelineModal';
|
||||||
import { PipelineActionsProps } from './PipelineActions.interface';
|
import { PipelineActionsProps } from './PipelineActions.interface';
|
||||||
@ -59,16 +57,11 @@ function PipelineActions({
|
|||||||
await triggerIngestion(id, displayName);
|
await triggerIngestion(id, displayName);
|
||||||
|
|
||||||
setCurrTriggerId({ id, state: 'success' });
|
setCurrTriggerId({ id, state: 'success' });
|
||||||
showSuccessToast(t('message.pipeline-trigger-success-message'));
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
setCurrTriggerId({ id: '', state: '' });
|
setCurrTriggerId({ id: '', state: '' });
|
||||||
}, 1500);
|
}, 1500);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
setCurrTriggerId({ id: '', state: '' });
|
setCurrTriggerId({ id: '', state: '' });
|
||||||
showErrorToast(
|
|
||||||
error as AxiosError,
|
|
||||||
t('message.pipeline-trigger-failed-message')
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -321,6 +321,7 @@ const ServiceDetailsPage: FunctionComponent = () => {
|
|||||||
async (id: string, displayName: string) => {
|
async (id: string, displayName: string) => {
|
||||||
try {
|
try {
|
||||||
const data = await triggerIngestionPipelineById(id);
|
const data = await triggerIngestionPipelineById(id);
|
||||||
|
showSuccessToast(t('message.pipeline-trigger-success-message'));
|
||||||
|
|
||||||
updateCurrentSelectedIngestion(id, data, 'pipelineStatuses');
|
updateCurrentSelectedIngestion(id, data, 'pipelineStatuses');
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user