fix: Changing device type now is persistant #5529

Merged
merged 2 commits into from Jan 22, 2017

Projects

None yet

5 participants

@laf
Member
laf commented Jan 20, 2017

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.

  • Have you signed the Contributors agreement - please do NOT submit a pull request unless you have (signing the agreement in the same pull request is fine). Your commit message for signing the agreement must appear as per the docs.
  • Have you followed our code guidelines?

A bit of a quick hash for now. Changing device types is broken at the moment as load_os detects it's different from the what it's supposed to be and changes it back as soon as the page loads.

@laf laf fix: Changing device type now is persistant
3fba403
@laf laf added the Bug label Jan 20, 2017
@spinza
Contributor
spinza commented Jan 22, 2017 edited

Tested on my testing install. Was able to change the device type of a device I was not able to change before checking this out.

includes/functions.php
@@ -636,7 +636,7 @@ function createHost($host, $community, $snmpver, $port = 161, $transport = 'udp'
if (host_exists($host, $snmphost) === false) {
$device_id = dbInsert($device, 'devices');
if ($device_id) {
- oxidized_reload_nodes();
+ oxidized_reload_§nodes();
@murrant
murrant Jan 22, 2017 Contributor

Looks like an accidental change here.

@laf laf Update functions.php
71480b2
@scrutinizer-notifier

The inspection completed: No new issues

@laf laf merged commit 32da1bc into librenms:master Jan 22, 2017

2 checks passed

Auto-Deploy Build finished.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment