mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-07-25 10:20:10 +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 { ServicePageData } from '../pages/service';
|
||||||
import { getURLWithQueryFields } from '../utils/APIUtils';
|
import { getURLWithQueryFields } from '../utils/APIUtils';
|
||||||
import APIClient from './index';
|
import APIClient from './index';
|
||||||
|
import { ListTestCaseResultsParams } from './testAPI';
|
||||||
|
|
||||||
export const getPipelineVersions = async (id: string) => {
|
export const getPipelineVersions = async (id: string) => {
|
||||||
const url = `/pipelines/${id}/versions`;
|
const url = `/pipelines/${id}/versions`;
|
||||||
@ -123,11 +124,15 @@ export const patchPipelineDetails = async (id: string, data: Operation[]) => {
|
|||||||
return response.data;
|
return response.data;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getPipelineStatus = async (fqn: string) => {
|
export const getPipelineStatus = async (
|
||||||
|
fqn: string,
|
||||||
|
params?: ListTestCaseResultsParams
|
||||||
|
) => {
|
||||||
const url = `/pipelines/${fqn}/status`;
|
const url = `/pipelines/${fqn}/status`;
|
||||||
|
|
||||||
const response = await APIClient.get<PagingResponse<Array<PipelineStatus>>>(
|
const response = await APIClient.get<PagingResponse<Array<PipelineStatus>>>(
|
||||||
url
|
url,
|
||||||
|
{ params }
|
||||||
);
|
);
|
||||||
|
|
||||||
return response.data;
|
return response.data;
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
import { Space } from 'antd';
|
import { Space } from 'antd';
|
||||||
import { AxiosError } from 'axios';
|
import { AxiosError } from 'axios';
|
||||||
import { isEmpty, isNil } from 'lodash';
|
import { isEmpty, isNil } from 'lodash';
|
||||||
|
import moment from 'moment';
|
||||||
import React, {
|
import React, {
|
||||||
FC,
|
FC,
|
||||||
Fragment,
|
Fragment,
|
||||||
@ -24,6 +25,7 @@ import React, {
|
|||||||
} from 'react';
|
} from 'react';
|
||||||
import Select, { SingleValue } from 'react-select';
|
import Select, { SingleValue } from 'react-select';
|
||||||
import { getPipelineStatus } from '../../axiosAPIs/pipelineAPI';
|
import { getPipelineStatus } from '../../axiosAPIs/pipelineAPI';
|
||||||
|
import { PROFILER_FILTER_RANGE } from '../../constants/profiler.constant';
|
||||||
import { Pipeline, PipelineStatus } from '../../generated/entity/data/pipeline';
|
import { Pipeline, PipelineStatus } from '../../generated/entity/data/pipeline';
|
||||||
import jsonData from '../../jsons/en';
|
import jsonData from '../../jsons/en';
|
||||||
import { STATUS_OPTIONS } from '../../utils/PipelineDetailsUtils';
|
import { STATUS_OPTIONS } from '../../utils/PipelineDetailsUtils';
|
||||||
@ -73,7 +75,15 @@ const PipelineStatusList: FC<Prop> = ({
|
|||||||
|
|
||||||
const fetchPipelineStatus = async () => {
|
const fetchPipelineStatus = async () => {
|
||||||
try {
|
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);
|
setExecutions(response.data);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
showErrorToast(
|
showErrorToast(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user