]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/dashboard: Creating and editing Prometheus AlertManager silences is buggy 46277/head
authorVolker Theile <vtheile@suse.com>
Mon, 9 May 2022 13:31:15 +0000 (15:31 +0200)
committerVolker Theile <vtheile@suse.com>
Thu, 19 May 2022 07:31:07 +0000 (09:31 +0200)
commit282150d44b2f60bbb1dd7d7c9ae09fad6fb00c4d
treea66548fa6ba51b077e453cc5981f18347330c772
parent75cca95f9e783cbdfc32aa45321e9eb92ee22640
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>
(cherry picked from commit 658486b566f0f9cac2fc0225c4cd78702f943d40)
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