It seems watchdog settings are never visible

Created on 26 November 2024, 3 months ago

Problem/Motivation

The "Watchdog settings" in the Nagios settings are never visible (or at least I don't know how to display them).

I'm refering to this part in the Nagios settings form (/admin/config/system/nagios):

It guess this part should be displayed when "watchdog" checkbox is in "nagios" fieldset:

Why is not displayed? Because when that far of the form is defined the following states are added:

       '#states' => [
          'visible' => [
            '#edit-nagios #edit-nagios-func-watchdog' => ['checked' => TRUE],
            '#edit-nagios-enable-nagios' => ['checked' => TRUE],
          ],
        ],

The first line ('#edit-nagios #edit-nagios-func-watchdog') refers to the mentioned checkbox. However, the second line (#edit-nagios-enable-nagios) seems to refer nothing (I don't see it in the page source code).

That second line was introduced in commit c21780d. The commit message was:

Settings page UX: Hide watchdog settings if nagios checkbox is clear

The per-module checkboxes controll if the hook_nagios() implementation runs.
If nagios_nagios() is not called, the watchdog check also won't
run.

It seems to me to this first state already does that.

Steps to reproduce

Go to /admin/config/system/nagios, it seems there's no way to display the configuration for the watchdog.

Proposed resolution

Remove the line:

  '#edit-nagios-enable-nagios' => ['checked' => TRUE],

Remaining tasks

None.

User interface changes

A missing user interface that should be displayed will be back again.

API changes

None.

Data model changes

None.

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇪🇸Spain tunic Madrid

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024