]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr/dashboard: Creating and editing Prometheus AlertManager silences is buggy
authorVolker Theile <vtheile@suse.com>
Mon, 9 May 2022 13:31:15 +0000 (15:31 +0200)
committerVolker Theile <vtheile@suse.com>
Mon, 9 May 2022 15:25:34 +0000 (17:25 +0200)
commit658486b566f0f9cac2fc0225c4cd78702f943d40
treec4a01fd3e973986c2d3957f5d9f3d6f4e433ee3c
parentd4f36d647cb20a24fd4483e586d9b7cfda7b1456
mgr/dashboard: Creating and editing Prometheus AlertManager silences is buggy

When creating a new monitoring silence the form is pre-filled with the wrong alert data. It is always used the alert data from the very first object in the list of the API response but not the specified alert identified by the 'fingerprint' property.

The same problem applies to editing silences. The selected silence is not edited, it's always the first one in the list returned API response but not that with the specified 'id' property.

The main problem of the origin implementation is that the Prometheus Alertmanager API endpoints /api/v1/[alerts/silences] do not support querying. To fix that, filtering is done in the frontend.

Fixes: https://tracker.ceph.com/issues/55578
Signed-off-by: Volker Theile <vtheile@suse.com>
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-form/silence-form.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-form/silence-form.component.ts