Skip to content

Commit

Permalink
change filter range separator in URL from - to , (#165)
Browse files Browse the repository at this point in the history
without this filters are broken
  • Loading branch information
Boris Dimitrov committed Oct 11, 2017
1 parent f2a6731 commit 779b9bf
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/assets/javascripts/components/ReportFilter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ class ReportFilter extends React.Component {
? ReportFilter.getFilter('nt_rpm_threshold') : default_nt_rpm_threshold;

const nt_zscore_start =
(nt_zscore_threshold.split('-').length > 0) ? parseInt(nt_zscore_threshold.split('-')[0], 10) : 0;
(nt_zscore_threshold.split(',').length > 0) ? parseInt(nt_zscore_threshold.split(',')[0], 10) : 0;
const nt_zscore_end =
(nt_zscore_threshold.split('-').length > 1) ? parseInt(nt_zscore_threshold.split('-')[1], 10) :
(nt_zscore_threshold.split(',').length > 1) ? parseInt(nt_zscore_threshold.split(',')[1], 10) :
this.props.highest_tax_counts.highest_nt_zscore;

const nt_rpm_start =
(nt_rpm_threshold.split('-').length > 0) ? parseInt(nt_rpm_threshold.split('-')[0], 10) : 0;
(nt_rpm_threshold.split(',').length > 0) ? parseInt(nt_rpm_threshold.split(',')[0], 10) : 0;
const nt_rpm_end =
(nt_rpm_threshold.split('-').length > 1) ? parseInt(nt_rpm_threshold.split('-')[1], 10) :
(nt_rpm_threshold.split(',').length > 1) ? parseInt(nt_rpm_threshold.split(',')[1], 10) :
this.props.highest_tax_counts.highest_nt_rpm;


Expand All @@ -37,8 +37,8 @@ class ReportFilter extends React.Component {
const currentSort = PipelineSampleReport.currentSort();
const sort_by = currentSort.sort_query ? `&${currentSort.sort_query}` : '';
window.location =
`${current_url}?nt_zscore_threshold=${this.state.nt_zscore_start}-${this.state.nt_zscore_end}&nt_rpm_threshold=${
this.state.nt_rpm_start}-${this.state.nt_rpm_end}&view_level=${this.state.view_level}${sort_by}`;
`${current_url}?nt_zscore_threshold=${this.state.nt_zscore_start},${this.state.nt_zscore_end}&nt_rpm_threshold=${
this.state.nt_rpm_start},${this.state.nt_rpm_end}&view_level=${this.state.view_level}${sort_by}`;
}

static getFilter(name) {
Expand Down

0 comments on commit 779b9bf

Please sign in to comment.