Skip to content

Commit

Permalink
fix(#15188): Ingestion Pipeline Run response
Browse files Browse the repository at this point in the history
  • Loading branch information
Sachin-chaurasiya committed Feb 15, 2024
1 parent 49dd0e8 commit 037429e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
*/
import { CheckOutlined } from '@ant-design/icons';
import { Button, Divider, Space } from 'antd';
import { AxiosError } from 'axios';
import React, { useState } from 'react';
import { useTranslation } from 'react-i18next';
import { Link, useHistory } from 'react-router-dom';
Expand All @@ -24,7 +23,6 @@ import {
getEditIngestionPath,
getLogsViewerPath,
} from '../../utils/RouterUtils';
import { showErrorToast, showSuccessToast } from '../../utils/ToastUtils';
import { PipelineActionsProps } from './PipelineActions.interface';

function PipelineActions({
Expand Down Expand Up @@ -59,16 +57,11 @@ function PipelineActions({
await triggerIngestion(id, displayName);

setCurrTriggerId({ id, state: 'success' });
showSuccessToast(t('message.pipeline-trigger-success-message'));
setTimeout(() => {
setCurrTriggerId({ id: '', state: '' });
}, 1500);
} catch (error) {
setCurrTriggerId({ id: '', state: '' });
showErrorToast(
error as AxiosError,
t('message.pipeline-trigger-failed-message')
);
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ const ServiceDetailsPage: FunctionComponent = () => {
async (id: string, displayName: string) => {
try {
const data = await triggerIngestionPipelineById(id);
showSuccessToast(t('message.pipeline-trigger-success-message'));

updateCurrentSelectedIngestion(id, data, 'pipelineStatuses');
} catch (err) {
Expand Down

0 comments on commit 037429e

Please sign in to comment.