Cacti / plugin_thold

Thold Plugin for Cacti
GNU General Public License v2.0
68 stars 63 forks source link

Fix #627 save threshold level enabled setting #628

Closed unka65 closed 12 months ago

unka65 commented 12 months ago

This is related to my issue #627. On my server on the threshold edit page, the threshold level enabled status (thold_per_enabled) would not save. I did not find where it was coded to be saved. I noticed in function save_thold() that for templated thresholds, only the template propagation setting (template_enabled) was saved. In case it helps, these are my changes that worked for me.

For the Thold edit, this adds to save the threshold level enabled setting thold_per_enabled for templated and non-templated thresholds. The disabled/off value of "" matches the management actions Disable. In debugging it, I added additional details in the debug output.

Also while working with it, I noticed on the Thold tab list of thresholds that thresholds for disabled devices were included. The link to the threshold edit returned a permission denied error. The device was not in the device filter prompt list. This changes to exclude disabled devices on the Thold tab list. If the other is usable and this one is not logical, let me know and I will remove it.

TheWitness commented 12 months ago

Good debug work. I'll check things out in my morning.