-
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
Allow the suspension of cloud, infra and physical infra providers #4269
Allow the suspension of cloud, infra and physical infra providers #4269
Conversation
@skateman 'slemrmartin' is an invalid reviewer, ignoring... |
d71fb2a
to
fbd5e21
Compare
This pull request is not mergeable. Please rebase and repush. |
@skateman Changes in core after this implementation:
EDIT: use |
@slemrmartin what about |
|
d10f34a
to
6665066
Compare
@slemrmartin can you please test this if it does what you want? 😉 |
@miq-bot rm_label pending core |
@@ -146,7 +146,8 @@ def textual_security_groups | |||
end | |||
|
|||
def textual_zone | |||
{:label => _("Managed by Zone"), :icon => "pficon pficon-zone", :value => @record.zone.name} | |||
zone = @record.zone.visible? ? @record.zone : @record.backup_zone |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
This method is not called backup_zone anymore...I think it's zone_before_pause
-
I feel like this section is wrong. This is showing the EMS as being in a zone that it's not really in, which can be confusing to end users as well as us trying to diagnose customer issues. IMO, we should just keep the original code and show that it's in the Maintenance Zone or wherever. Or, clarify it better with something like the following...
zone = @record.zone_before_pause? ? "#{@record.zone.name} (originally in #{@record.zone_before_pause.name})" : @record.zone.name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same in the copy-paste areas below.
Most of this looks good to me, however I don't agree with some of the decisions on when to honor Zone#visible. See ManageIQ/manageiq#17489 (comment) for my entire opinion on the presentation of these. |
cce5ae7
to
4978042
Compare
There is some problem I encountered only once - default zone had |
@@ -71,7 +71,12 @@ def textual_port | |||
end | |||
|
|||
def textual_zone | |||
{:label => _("Managed by Zone"), :icon => "pficon pficon-zone", :value => @record.zone.name} | |||
zone = if @record.zone.visible? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if @record.zone.visible?
elsif @record.zone == Zone.maintenance_zone
end
is better, the same for other helpers below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, what other cases can happen? Because this seems to me as fixing possible backend issues on the frontend 😞
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your code doesn't cause error, but invisible zone won't have zone_before_pause
relation set every time.
Current condition could confuse other developers that if zone.visible
is false, then zone_before_pause
is always there.
4978042
to
d056dfa
Compare
Ok, then just:
|
Oh. Ok, you did that. So how well is this one tested? Did you test this in the UI, @slemrmartin ? |
@martinpovolny already done |
@martinpovolny not the last version, I'll do it asap |
@slemrmartin any update on this? |
Sorry I worked on another PR, I'll look after weekend |
Generally it's working (tested on Amazon)
@skateman great job, only small changes needed:
More comments in issue |
b02fad8
to
baaae77
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Additional functionalities will be done in next PR (described in related Issue)
baaae77
to
b761e77
Compare
b761e77
to
34d26d9
Compare
Checked commits skateman/manageiq-ui-classic@7665ca6~...34d26d9 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 **
app/helpers/application_helper/toolbar/ems_cloud_center.rb
app/helpers/application_helper/toolbar/ems_clouds_center.rb
app/helpers/application_helper/toolbar/ems_infra_center.rb
app/helpers/application_helper/toolbar/ems_infras_center.rb
app/helpers/application_helper/toolbar/ems_physical_infra_center.rb
app/helpers/application_helper/toolbar/ems_physical_infras_center.rb
|
@martinpovolny coverage should be okay now 😉 |
This is a followup on #4012 as @romanblanco is not available. Except of adding the necessary toolbar buttons, there are a few screens which display zones, these have been adjusted to not display the
__maintenance__
zone.Parent issue: ManageIQ/manageiq#17489
Depends on: ManageIQ/manageiq#17452
RFE BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1455145
@miq-bot add_label pending core
@miq-bot add_reviewer @slemrmartin