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

Fix missing to-parameter in dashboard graph widget link #10600

Merged
merged 1 commit into from Sep 12, 2019

Conversation

@feuerrot
Copy link
Contributor

commented Sep 12, 2019

DO NOT DELETE THIS TEXT

Please note

Please read this information carefully. You can run ./scripts/pre-commit.php to check your code before submitting.

Testers

If you would like to test this pull request then please run: ./scripts/github-apply <pr_id>, i.e ./scripts/github-apply 5926
After you are done testing, you can remove the changes with ./scripts/github-remove. If there are schema changes, you can ask on discord how to revert.

Description

If you add a generic-graph widget to a dashboard the image links to a bigger version of the graph (under https://librenms/graphs/). This link doesn't include a /to=${timestamp}/ parameter in the URL.
Updating the time range in the graph view uses submitCustomRange() from librenms.js to replace the from and to parameters in the URL using regular expressions. If there is no to parameter in the URL, it won't be added - so unless you click on one of the predefined time ranges first or add it yourself you can't change the to parameter.

It might be a better idea to rewrite the submitCustomRange() function, but as I don't know enough about javascript, I just added the to parameter in the generic-graph widget code.

@CLAassistant

This comment has been minimized.

Copy link

commented Sep 12, 2019

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

left a comment

LGTM

@PipoCanaja PipoCanaja merged commit 81e57c8 into librenms:master Sep 12, 2019
6 checks passed
6 checks passed
Inspection Summary
Details
Node: analysis
Details
Travis CI - Pull Request Build Passed
Details
WIP Ready for review
Details
codeclimate All good!
Details
license/cla Contributor License Agreement is signed.
Details
@murrant

This comment has been minimized.

Copy link
Member

commented Sep 30, 2019

This pull request has been mentioned on LibreNMS Community. There might be relevant details there:

https://community.librenms.org/t/v1-56-release-changelog-september-2019/9671/1

@feuerrot feuerrot referenced this pull request Oct 18, 2019
1 of 1 task complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.