Added bad ifName and ifAlias regex matching #3439

Merged
merged 4 commits into from Apr 30, 2016

Projects

None yet

4 participants

@pblasquez
Contributor

Allow user to ignore interfaces based on regex matching of ifName and ifAlias values. Fixes #3422.

pblasquez added some commits Apr 28, 2016
@pblasquez pblasquez Merge remote-tracking branch 'refs/remotes/librenms/master' 0e33d20
@pblasquez pblasquez Added bad ifName and ifAlias regex matching
Allow user to ignore interfaces based on regex matching of ifName and
ifAlias values
ba48567
@laf laf commented on an outdated diff Apr 29, 2016
includes/functions.php
@@ -873,6 +873,8 @@ function is_port_valid($port, $device) {
else {
$valid = 1;
$if = strtolower($port['ifDescr']);
+ $ifname = strtolower($port['ifName']);
@laf
laf Apr 29, 2016 Member

Can you fix the space formatting here. 4 spaces for indentation.

your other PRs had the same but I only noticed at the end :(

@pblasquez
Contributor

Ugh, sorry, using a new editor. Fixing now.

Do you want me to put in a PR to fix all of those?

pblasquez added some commits Apr 30, 2016
@pblasquez pblasquez Merge remote-tracking branch 'refs/remotes/librenms/master' into bad_…
…ifname
14c3741
@pblasquez pblasquez Fix indentation
170672c
@laf
Member
laf commented Apr 30, 2016

Thanks - only when you get chance.

@laf laf merged commit 1323b4f into librenms:master Apr 30, 2016

3 checks passed

Auto-Deploy Build finished. No test results found.
Details
Scrutinizer 3 new issues
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@paulgear
Member

Just a note for next time: if you find yourself cutting & pasting existing code and then just changing the variable names, it probably needs to be factored out into a separate function.

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