Skip to content
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

Add severity to Alerts #2280

Merged
merged 5 commits into from
Oct 10, 2017
Merged

Conversation

ZitaNemeckova
Copy link
Contributor

@ZitaNemeckova ZitaNemeckova commented Oct 3, 2017

Control -> Explorer -> Alerts
https://www.pivotaltracker.com/story/show/151340254

Depends on ManageIQ/manageiq#16040 (Merged)

TODO:

  • Severity shows in list view with i18n
  • Severity shows in detail page with i18n
  • Add/Edit Severity dropbox after Active checkbox
  • Severity is required

After:
screen shot 2017-10-03 at 4 13 19 pm

screen shot 2017-10-04 at 11 02 00 am

screen shot 2017-10-04 at 2 29 31 pm

Fix for select picker is out of scope of this PR.

@miq-bot add_label wip, pending core

@miq-bot miq-bot changed the title Add severity to Alerts [WIP] Add severity to Alerts Oct 3, 2017
@miq-bot miq-bot added the wip label Oct 3, 2017
@ZitaNemeckova ZitaNemeckova force-pushed the add_alert_severity branch 9 times, most recently from 001d8a3 to 5d07211 Compare October 4, 2017 14:25
@ZitaNemeckova
Copy link
Contributor Author

@miq-bot add_label pending core

@ZitaNemeckova
Copy link
Contributor Author

@miq-bot remove_label wip

@ZitaNemeckova
Copy link
Contributor Author

@miq-bot remove_label wip

@miq-bot miq-bot changed the title [WIP] Add severity to Alerts Add severity to Alerts Oct 5, 2017
@miq-bot miq-bot removed the wip label Oct 5, 2017
@ZitaNemeckova
Copy link
Contributor Author

All core dependencies are merged :)
@miq-bot remove_label pending core

@ZitaNemeckova
Copy link
Contributor Author

@h-kataria please review. Thanks :)

@@ -1168,7 +1168,8 @@ def view_to_hash(view)
when "result"
new_row[:cells] << {:span => result_span_class(row[col]), :text => row[col].titleize}
when "severity"
new_row[:cells] << {:span => severity_span_class(row[col]), :text => row[col].titleize}
value = row[col].nil? ? ' ' : row[col]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

row[col] || ' ' maybe?

@@ -1220,6 +1221,14 @@ def severity_span_class(value)
end
end

def severity_title(value)
if self.class == MiqPolicyController
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instance_of? or === probably

@@ -1,6 +1,7 @@
describe "miq_policy/_alert_details.html.haml" do
before do
@alert = FactoryGirl.create(:miq_alert)
SEVERITIES = {"info" => _('Info'), "warning" => _('Warning'), "error" => _('Error')}.freeze
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this constant here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without it I'm getting this error:

 ActionView::Template::Error:
       uninitialized constant ActionView::TestCase::TestController::SEVERITIES

@miq-bot
Copy link
Member

miq-bot commented Oct 10, 2017

Checked commits ZitaNemeckova/manageiq-ui-classic@d276118~...5a01dea with ruby 2.3.3, rubocop 0.47.1, and haml-lint 0.20.0
4 files checked, 0 offenses detected
Everything looks fine. 🏆

@ZitaNemeckova ZitaNemeckova reopened this Oct 10, 2017
@martinpovolny martinpovolny added this to the Sprint 71 Ending Oct 16, 2017 milestone Oct 10, 2017
@martinpovolny martinpovolny merged commit f777e6e into ManageIQ:master Oct 10, 2017
@simaishi
Copy link
Contributor

@ZitaNemeckova ZitaNemeckova deleted the add_alert_severity branch March 11, 2019 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants