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

Add Oxidized API URL protocol #7978

Merged
merged 4 commits into from Jan 5, 2018

Conversation

Projects
None yet
3 participants
@Zmegolaz
Member

Zmegolaz commented Dec 29, 2017

file_get_contents() need the protocol ("http://" or similar) when fetching remote files, add it to the oxidized API URL config if the user forgot it.

From: https://www.reddit.com/r/LibreNMS/comments/7mrufq/i_am_a_moron_oxidized_config/

I'm not sure this is the best place to add this check, if you have any suggestion, please let me know.

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

@laf

This comment has been minimized.

Member

laf commented Dec 30, 2017

Maybe just doing https://developer.mozilla.org/en-US/docs/Learn/HTML/Forms/Form_validation for now?

Ideally longer term we'd define the config values that should exist in the db so we can validate they exist. We could also then validate the input.

@Zmegolaz

This comment has been minimized.

Member

Zmegolaz commented Jan 3, 2018

Something like this?

@laf

This comment has been minimized.

Member

laf commented Jan 4, 2018

Close, config still gets updated.

This patch fixes that: https://p.libren.ms/view/raw/b0206dc8

@scrutinizer-notifier

This comment has been minimized.

scrutinizer-notifier commented Jan 5, 2018

The inspection completed: No new issues

@laf laf added the WebUI label Jan 5, 2018

@laf laf merged commit d7b4a30 into librenms:master Jan 5, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details
@laf

This comment has been minimized.

Member

laf commented Jan 5, 2018

Brilliant, thanks for that :) We should go back through at some point and do the same for some of the other inputs.

@Zmegolaz Zmegolaz deleted the Zmegolaz:oxidized-http branch Jan 5, 2018

@Zmegolaz Zmegolaz referenced this pull request Jan 5, 2018

Merged

Webui: Fix form validation for required. #8036

1 of 1 task complete
@lock

This comment has been minimized.

lock bot commented May 16, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed.

@lock lock bot locked as resolved and limited conversation to collaborators May 16, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.