Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

TP: unregisters resize event handler when navigating away from dashboard#4233

Merged
ocket8888 merged 1 commit into
apache:masterfrom
mitchell852:fixes-plot-console-errors
Jan 7, 2020
Merged

TP: unregisters resize event handler when navigating away from dashboard#4233
ocket8888 merged 1 commit into
apache:masterfrom
mitchell852:fixes-plot-console-errors

Conversation

@mitchell852

@mitchell852 mitchell852 commented Dec 24, 2019

Copy link
Copy Markdown
Member

What does this PR (Pull Request) do?

This PR fixes an issue where the resize event handler attached to the window for the purpose of resizing dashboard charts is never removed. This causes errors in the browser console as the resize event continues to attempt to replot a chart that doesn't exist when you are not on the dashboard page.

No tests, docs or changelog entry.

Which Traffic Control components are affected by this PR?

  • Traffic Portal

What is the best way to verify this PR?

  • Open the browser console
  • Login to TP and navigate to the dashboard
  • Resize the window and ensure the charts all resize
  • Navigate away from the dashboard
  • Resize the window and ensure no console errors appear in the browser console.

If this is a bug fix, what versions of Traffic Control are affected?

  • master (bbcf027)
  • 3.1.0
  • 4.0.0 (RC1)

The following criteria are ALL met by this PR

  • This PR includes tests OR I have explained why tests are unnecessary
  • This PR includes documentation OR I have explained why documentation is unnecessary
  • This PR includes an update to CHANGELOG.md OR such an update is not necessary
  • This PR includes any and all required license headers
  • This PR ensures that database migration sequence is correct OR this PR does not include a database migration
  • This PR DOES NOT FIX A SERIOUS SECURITY VULNERABILITY (see the Apache Software Foundation's security guidelines for details)

@mitchell852 mitchell852 added bug something isn't working as intended Traffic Portal v1 related to Traffic Portal version 1 labels Dec 24, 2019
@asf-ci

asf-ci commented Dec 24, 2019

Copy link
Copy Markdown
Contributor

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/4974/

@mitchell852 mitchell852 added low impact affects only a small portion of a CDN, and cannot itself break one and removed low impact affects only a small portion of a CDN, and cannot itself break one labels Dec 24, 2019
@mitchell852 mitchell852 added the regression bug a bug in existing functionality introduced by a new version label Jan 2, 2020

@mhoppa mhoppa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works as expected! great fix 👏

@ocket8888
ocket8888 merged commit f91bf53 into apache:master Jan 7, 2020
mitchell852 added a commit to mitchell852/trafficcontrol that referenced this pull request Jan 8, 2020
rawlinp pushed a commit that referenced this pull request Jan 8, 2020
@mitchell852 mitchell852 removed the bug something isn't working as intended label Aug 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

regression bug a bug in existing functionality introduced by a new version Traffic Portal v1 related to Traffic Portal version 1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TP: Table column headers are not resizing properly on window resize

4 participants