[ML] Removing alerting_rules from general job list items (#131936)

This commit is contained in:
James Gowdy 2022-05-11 07:22:17 +01:00 committed by GitHub
parent 10915c90d4
commit b5737981aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -99,6 +99,14 @@ export function extractJobDetails(job, basePath, refreshJobList) {
return ['', <EditAlertRule initialAlert={v} onSave={refreshJobList} />];
}),
};
if (job.alerting_rules) {
// remove the alerting_rules list from the general section
// so not to show it twice.
const i = general.items.findIndex((item) => item[0] === 'alerting_rules');
if (i >= 0) {
general.items.splice(i, 1);
}
}
const detectors = {
id: 'detectors',