Skip to content

Commit

Permalink
fix: fetched incorrect scheduled task runs page (#384)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshOY authored Jan 18, 2021
1 parent a3fa57f commit c543a4a
Showing 1 changed file with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { RootDispatch } from '@/rematch/store';
import { fetchDeployedTaskDetail, fetchTaskRunsOfDeployedTask } from '@/services/task-deployments/deployed-tasks';
import {
fetchDeployedTaskDetail,
fetchTaskRunsOfDeployedTask,
} from '@/services/task-deployments/deployed-tasks';
import { TaskRunListFilter } from '@/rematch/models/operationCenter/deployedTaskDetail/model-state';
import moment from 'moment';

Expand All @@ -19,17 +22,20 @@ export const effects = (dispatch: RootDispatch) => ({
const respData = await fetchTaskRunsOfDeployedTask({
id: payload.id,
pageSize: payload.pageSize || 25,
pageNumber: payload.pageNum || 1,
// @ts-ignore
pageNum: payload.pageNum || 1,
status: payload.status || undefined,
startTime: payload.startTime ? moment(payload.startTime).toISOString() : undefined,
endTime: payload.endTime ? moment(payload.endTime).toISOString() : undefined,
startTime: payload.startTime
? moment(payload.startTime).toISOString()
: undefined,
endTime: payload.endTime
? moment(payload.endTime).toISOString()
: undefined,
});
if (respData && respData.records) {
dispatch.deployedTaskDetail.setTaskRunsCount(respData.totalCount);
dispatch.deployedTaskDetail.setTaskRuns(respData.records);
}
} catch (e) {

}
} catch (e) {}
},
});

0 comments on commit c543a4a

Please sign in to comment.