-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alerts - fix bug when severity null #4614
Conversation
the code going through all the alerts can handle severity being undefined but that never happens, since it comes from the server as null :) this leads to an ugly error in the console when opnening Monitor > Alerts > Overview (and nothing showing up) fixed - any falsy value is wrong and will be rewritten to `info` now
The bug on master:
|
And this is the alert causing the failure: {
acknowledged: null,
assignee_id: null,
description: "ec2-cloudwatch-max-cpu",
ems_id: "38",
evaluated_on: "2018-02-18T01:16:35Z",
event_ems_ref: null,
href: "http://localhost:3000/api/alerts/18",
id: "18",
miq_alert_id: "30",
resolved: null,
resource: {id: "1945", vendor: "amazon", format: null, version: null, name: "demo-ssh-bastion",…},
resource_id: "1945",
resource_type: "VmOrTemplate",
result: false,
severity: null,
url: null,
} |
Checked commit https://github.com/himdel/manageiq-ui-classic/commit/c0629f829aae853532fda105272d49b4c1cd3476 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
@himdel is this |
Actually, no, it seems it's not needed there.. The code was there from the start - #507 |
Monitor > Alerts > Overview
the code going through all the alerts can handle severity being undefined
but that never happens, since it comes from the server as null :)
this leads to an ugly error in the console when opnening Monitor > Alerts > Overview (and nothing showing up)
fixed - any falsy value is wrong and will be rewritten to
info
now