Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix task history page size on refresh #1974

Merged
merged 4 commits into from
Jul 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion SingularityUI/app/actions/ui/requestDetail.es6
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { FetchRequest } from '../api/requests';
import {
FetchActiveTasksForRequest,
FetchTaskHistoryForRequest,
FetchDeploysForRequest,
FetchRequestHistory,
} from '../api/history';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const mapStateToProps = (state, ownProps) => {
}};

const mapDispatchToProps = (dispatch, ownProps) => ({
fetchTaskHistoryForRequest: () => dispatch(FetchTaskHistoryForRequest.trigger(ownProps.requestId, 5, 1))
fetchTaskHistoryForRequest: () => dispatch(FetchTaskHistoryForRequest.trigger(ownProps.requestId, ownProps.taskHistoryPage, ownProps.taskHistoryPageSize))
});

export default connect(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class RequestDetailPage extends Component {
<div>
<RequestHeader requestId={requestId} showBreadcrumbs={this.props.showBreadcrumbs} deleted={this.props.deleted} />
{deleted || <RequestExpiringActions requestId={requestId} />}
{deleted || <ActiveTasksTable requestId={requestId} />}
{deleted || <ActiveTasksTable requestId={requestId} taskHistoryPage={Number(taskHistoryPage) || 1} taskHistoryPageSize={Number(taskHistoryPageSize) || 10} />}
{deleted || <PendingTasksTable requestId={requestId} />}
{deleted || (
<TaskHistoryTable
Expand All @@ -61,7 +61,6 @@ class RequestDetailPage extends Component {
initialPageSize={Number(taskHistoryPageSize) || 10}
onPageChange={num => router.replace({ ...location, query: {...location.query, taskHistoryPage: num }})}
initialPageNumber={Number(taskHistoryPage) || 1}
refresh={this.props.fetchTaskHistoryForRequest}
/>
)}
{deleted || <RequestUtilization requestId={requestId} />}
Expand Down