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

[#2027] Fix date range bug #2034

Merged
merged 2 commits into from
Sep 24, 2023
Merged
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
4 changes: 3 additions & 1 deletion frontend/src/components/c-summary-charts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,9 @@

// skip if accidentally clicked on ramp chart
if (this.drags.length === 2 && this.drags[1] - this.drags[0]) {
const tdiff = (new Date(this.filterUntilDate)).valueOf() - (new Date(this.filterSinceDate)).valueOf();
// additional day was added to include the date represented by filterUntilDate
const tdiff = (new Date(this.filterUntilDate)).valueOf() - (new Date(this.filterSinceDate)).valueOf()
+ window.DAY_IN_MS;
const idxs = this.drags.map((x) => (x * tdiff) / 100);
const tsince = window.getDateStr(new Date(this.filterSinceDate).getTime() + idxs[0]);
const tuntil = window.getDateStr(new Date(this.filterSinceDate).getTime() + idxs[1]);
Expand Down Expand Up @@ -633,7 +635,7 @@
getBaseTarget(target: HTMLElement | null): HTMLElement | null {
if (!target) {
// Should never reach here - function assumes that target is a child of the div with class 'summary-chart__ramp'
console.error('Error: The getBaseTarget function in c-summary-charts.vue has been called on an element that is '

Check warning on line 638 in frontend/src/components/c-summary-charts.vue

View workflow job for this annotation

GitHub Actions / Cypress frontend tests

Unexpected console statement

Check warning on line 638 in frontend/src/components/c-summary-charts.vue

View workflow job for this annotation

GitHub Actions / ubuntu-20.04 JDK 8

Unexpected console statement

Check warning on line 638 in frontend/src/components/c-summary-charts.vue

View workflow job for this annotation

GitHub Actions / ubuntu-20.04 JDK 8

Unexpected console statement

Check warning on line 638 in frontend/src/components/c-summary-charts.vue

View workflow job for this annotation

GitHub Actions / ubuntu-22.04 JDK 8

Unexpected console statement

Check warning on line 638 in frontend/src/components/c-summary-charts.vue

View workflow job for this annotation

GitHub Actions / macos-11 JDK 8

Unexpected console statement

Check warning on line 638 in frontend/src/components/c-summary-charts.vue

View workflow job for this annotation

GitHub Actions / macos-12 JDK 8

Unexpected console statement

Check warning on line 638 in frontend/src/components/c-summary-charts.vue

View workflow job for this annotation

GitHub Actions / windows-2019 JDK 8

Unexpected console statement

Check warning on line 638 in frontend/src/components/c-summary-charts.vue

View workflow job for this annotation

GitHub Actions / windows-2022 JDK 8

Unexpected console statement
+ 'not a child of the div with class summary-chart__ramp. This might affect the drag view functionality.');
return null;
}
Expand Down