mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-07-23 09:22:18 +00:00
Fix Pipleine cypress issue (#7654)
This commit is contained in:
parent
169ad3c687
commit
b7471ab5aa
@ -21,6 +21,7 @@ import { Paging } from '../generated/type/paging';
|
||||
import { ServicePageData } from '../pages/service';
|
||||
import { getURLWithQueryFields } from '../utils/APIUtils';
|
||||
import APIClient from './index';
|
||||
import { ListTestCaseResultsParams } from './testAPI';
|
||||
|
||||
export const getPipelineVersions = async (id: string) => {
|
||||
const url = `/pipelines/${id}/versions`;
|
||||
@ -123,11 +124,15 @@ export const patchPipelineDetails = async (id: string, data: Operation[]) => {
|
||||
return response.data;
|
||||
};
|
||||
|
||||
export const getPipelineStatus = async (fqn: string) => {
|
||||
export const getPipelineStatus = async (
|
||||
fqn: string,
|
||||
params?: ListTestCaseResultsParams
|
||||
) => {
|
||||
const url = `/pipelines/${fqn}/status`;
|
||||
|
||||
const response = await APIClient.get<PagingResponse<Array<PipelineStatus>>>(
|
||||
url
|
||||
url,
|
||||
{ params }
|
||||
);
|
||||
|
||||
return response.data;
|
||||
|
@ -14,6 +14,7 @@
|
||||
import { Space } from 'antd';
|
||||
import { AxiosError } from 'axios';
|
||||
import { isEmpty, isNil } from 'lodash';
|
||||
import moment from 'moment';
|
||||
import React, {
|
||||
FC,
|
||||
Fragment,
|
||||
@ -24,6 +25,7 @@ import React, {
|
||||
} from 'react';
|
||||
import Select, { SingleValue } from 'react-select';
|
||||
import { getPipelineStatus } from '../../axiosAPIs/pipelineAPI';
|
||||
import { PROFILER_FILTER_RANGE } from '../../constants/profiler.constant';
|
||||
import { Pipeline, PipelineStatus } from '../../generated/entity/data/pipeline';
|
||||
import jsonData from '../../jsons/en';
|
||||
import { STATUS_OPTIONS } from '../../utils/PipelineDetailsUtils';
|
||||
@ -73,7 +75,15 @@ const PipelineStatusList: FC<Prop> = ({
|
||||
|
||||
const fetchPipelineStatus = async () => {
|
||||
try {
|
||||
const response = await getPipelineStatus(pipelineFQN);
|
||||
const startTs = moment()
|
||||
.subtract(PROFILER_FILTER_RANGE.last60days.days, 'days')
|
||||
.unix();
|
||||
const endTs = moment().unix();
|
||||
|
||||
const response = await getPipelineStatus(pipelineFQN, {
|
||||
startTs,
|
||||
endTs,
|
||||
});
|
||||
setExecutions(response.data);
|
||||
} catch (error) {
|
||||
showErrorToast(
|
||||
|
Loading…
x
Reference in New Issue
Block a user