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

Refactoring code in public/src/admin/dashboard.js #500

Open
wants to merge 29 commits into
base: f24
Choose a base branch
from

Conversation

vsolskyyy
Copy link

Resolved #418

@coveralls
Copy link

coveralls commented Sep 4, 2024

Pull Request Test Coverage Report for Build 10731404739

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 82.681%

Totals Coverage Status
Change from base Build 10607818019: 0.01%
Covered Lines: 22324
Relevant Lines: 25582

💛 - Coveralls

Copy link

sonarcloud bot commented Sep 6, 2024

@vsolskyyy
Copy link
Author

vsolskyyy commented Sep 6, 2024

Resolves #418

Link to issue: https://sonarcloud.io/project/issues?issueStatuses=OPEN%2CCONFIRMED&id=CMU-313_NodeBB&open=AZFmi_6XybYwxy-_uEU-

Refactored code in public/src/admin/dashboard.js to not have functions nested more than 4 levels deep. I created a helper function, "updateTranslator" to be called after "updateGraphTraffic" is called on line 353. This is instead of the function that was originally made on line 348. Inside my helper function, I inserted a console.log with my name to ensure that my name would show up on my console. I started my server, and went on the local host. I logged into admin, then on the dashboard page, I clicked on any of the "Last 30 days" "Last 7 days" or "Last 24 hours" in order to trigger my console log and see my name on my console.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor this code to not nest functions more than 4 levels deep public/src/admin/dashboard.js
2 participants