diff --git a/frontend/src/result-list.js b/frontend/src/result-list.js index 6bdf7d09..540f8930 100644 --- a/frontend/src/result-list.js +++ b/frontend/src/result-list.js @@ -45,11 +45,13 @@ export class ResultList extends React.Component { static propTypes = { location: PropTypes.object, navigate: PropTypes.func, - eventEmitter: PropTypes.object + eventEmitter: PropTypes.object, + params: PropTypes.object, } constructor(props) { super(props); + // TODO just use props.params when converting to funcational component const params = new URLSearchParams(props.location.search); let page = 1, pageSize = 20, filters = {}; if (params.toString() !== '') { @@ -299,7 +301,7 @@ export class ResultList extends React.Component { }; applyReport = () => { - this.props.navigate('/reports?' + buildParams(this.state.filters).join('&')) + this.props.navigate('/project/' + this.props.params.project_id + '/reports?' + buildParams(this.state.filters).join('&')) }; updateFilters(name, operator, value, callback) { diff --git a/frontend/src/run-list.js b/frontend/src/run-list.js index 4e4fbc0f..b3f7508d 100644 --- a/frontend/src/run-list.js +++ b/frontend/src/run-list.js @@ -90,7 +90,8 @@ export class RunList extends React.Component { static propTypes = { location: PropTypes.object, navigate: PropTypes.func, - eventEmitter: PropTypes.object + eventEmitter: PropTypes.object, + params: PropTypes.object, } constructor(props) { @@ -143,6 +144,10 @@ export class RunList extends React.Component { }); } + applyReport = () => { + this.props.navigate('/project/' + this.props.params.project_id + '/reports?' + buildParams(this.state.filters).join('&')) + }; + onFieldToggle = () => { this.setState({isFieldOpen: !this.state.isFieldOpen}); }; @@ -292,7 +297,7 @@ export class RunList extends React.Component { let params = buildParams(this.state.filters); params.push('page=' + this.state.page); params.push('pageSize=' + this.state.pageSize); - this.props.navigate('/runs?' + params.join('&')) + this.props.navigate('?' + params.join('&')) } setPage = (_event, pageNumber) => { @@ -575,6 +580,7 @@ export class RunList extends React.Component { onApplyFilter={this.applyFilter} onRemoveFilter={this.removeFilter} onClearFilters={this.clearFilters} + onApplyReport={this.applyReport} onSetPage={this.setPage} onSetPageSize={this.setPageSize} hideFilters={["project_id"]} diff --git a/scripts/ibutsu-pod.sh b/scripts/ibutsu-pod.sh index fb315c23..73a85dab 100755 --- a/scripts/ibutsu-pod.sh +++ b/scripts/ibutsu-pod.sh @@ -123,7 +123,7 @@ podman run -dt \ $POSTGRES_EXTRA_ARGS \ --name ibutsu-postgres \ --rm \ - postgres:15 + postgres:12 echo "done." echo -n "Adding redis to the pod: " podman run -dt \