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

Fix missing flash message when adding first Container Provider #5832

Merged
merged 2 commits into from
Jul 19, 2019

Conversation

ZitaNemeckova
Copy link
Contributor

@ZitaNemeckova ZitaNemeckova commented Jul 18, 2019

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1713504

Introduced by #5434

Go to Compute -> Containers-> Providers -> make sure you have no provider! -> add a new provider (see Bz for details) -> wait to be redirected back -> see there's no success/error message
Before:
Screenshot 2019-07-18 at 14 42 09

After:
Screenshot 2019-07-19 at 09 05 45

Go to Compute -> Containers-> Providers -> make sure you have no provider! -> Configuration -> Add a new Container Provider -> cancel -> see there's no "Canceled by user" message
Fixed for all providers.

Before:
Screenshot 2019-07-19 at 09 19 37

After:
Screenshot 2019-07-19 at 09 14 43

@miq-bot add_label hammer/no, bug

cc: @romanblanco

Copy link
Member

@romanblanco romanblanco left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@ZitaNemeckova
Copy link
Contributor Author

@miq-bot assign @mzazrivec

@mzazrivec
Copy link
Contributor

I'm a bit puzzled here. Why does the after screen still show the landing / empty state page? Shouldn't it show the grid / list / tile with that one provider that's just been added?

@skateman
Copy link
Member

@mzazrivec maybe the page is rendered before the provider is actually added? Anyway, it's a bug...

@mzazrivec
Copy link
Contributor

mzazrivec commented Jul 18, 2019

Perhaps this is the fix for the issue described?

diff --git a/app/views/ems_container/show_list.html.haml b/app/views/ems_container/show_list.html.haml
index f4b32d02e..9a43c190d 100644
--- a/app/views/ems_container/show_list.html.haml
+++ b/app/views/ems_container/show_list.html.haml
@@ -1,5 +1,5 @@
 #main_div
-  - if Container.any?
+  - if ManageIQ::Providers::ContainerManager.any?
     = render :partial => 'layouts/gtl'
   - else
     = render :partial => 'layouts/empty',

Since the Container object does not represent container provider, but the actual containers, which get pulled into ManageIQ DB after the refresh is done (from at least one provider).

@miq-bot
Copy link
Member

miq-bot commented Jul 19, 2019

Checked commits ZitaNemeckova/manageiq-ui-classic@046fa63~...b99388e with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0
0 files checked, 0 offenses detected
Everything looks fine. ⭐

@ZitaNemeckova
Copy link
Contributor Author

@mzazrivec Thanks :) Adding fixed as you suggested. Keeping my fix for cancel/error scenario.

@ZitaNemeckova ZitaNemeckova changed the title Add error message div to empty provider page Fix missing flash message when adding first Container Provider Jul 19, 2019
@mzazrivec
Copy link
Contributor

@romanblanco Are you OK with the current change?

@romanblanco
Copy link
Member

@mzazrivec OK 👍, thanks!

@mzazrivec mzazrivec added this to the Sprint 116 Ending Jul 22, 2019 milestone Jul 19, 2019
@mzazrivec mzazrivec merged commit 4a358f1 into ManageIQ:master Jul 19, 2019
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.

None yet

5 participants