-
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
Fix performance drop-down button in container view #2653
Fix performance drop-down button in container view #2653
Conversation
@miq-bot add_label bug, compute/containers @simon3z @moolitayer @zeari @himdel @mzazrivec please review @zakiva - thanks for the help :-) |
@himdel @AparnaKarve PTAL |
:url_parms => "?display=performance", | ||
:klass => ApplicationHelper::Button::VmPerf), | ||
:url => "/show", | ||
:url_parms => "?display=performance" |
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.
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.
@yaacov we want this button to be disabled if there is no data like in vms
We can not use the vms button ApplicationHelper::Button::VmPerf
because it show the message:
"No C&U data has been collected for this VM" and container is not VM.
we want this button to be disabled if there is no data
In all other container objects, we show the button, and only after we get into the page we get the "no data message", this is the behaviour for container -> pods [1] and contianer -> nodes [2] . Container should have the same behaviour.
[1] https://github.com/ManageIQ/manageiq-ui-classic/blob/master/app/helpers/application_helper/toolbar/container_group_center.rb#L21
[2] https://github.com/ManageIQ/manageiq-ui-classic/blob/master/app/helpers/application_helper/toolbar/container_node_center.rb#L21
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 all this meant to fix is the message, can you just update the message?
Either copy VmPerf
to ContainerPerf
and update the message, or add a field to the definition which you can read in disabled?
.
(But keep the message whole, even though you need 2 copies that way :).)
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 all this meant to fix is the message,
No, the main task of this PR is to:
a. prevent the graying out of the "Utilization" button in the drop down.
b. make this button work :-) and send us to the Utilization page.
c. the "VM" message is not mentioned in the BZ, but we should fix it as well.
This behaviour (not graying out) is consistent with the behaviour of this button in the providers, nodes and pods pages, and also with the behaviour of the "Timeline" button in providers.
We opened a new BZ about making all the buttons consistent [1] but this is not a priority.
yeah that would require a different button. Anyway I looked at |
This bug [1] is about enabling this button, like all the other buttons. Fixing the behaviour of all the buttons to match the behaviour of vms is a good issue. We should discuss that, the BZ looks like a good place for that discussion. |
p.s. |
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.
After discussion, it seems disabling the button ATM would be detrimental for automation.
We will open a new issue/bug to change the behavior accordingly in all pages (hide/disable when needed)
@himdel please review. p.s. |
OK, so.. having a second class just for your container perf button is perfectly allright, if the logic and the message are indeed different.. feel free to do that. But removing the disable logic altogether is wrong. |
91948c4
to
35d319b
Compare
35d319b
to
f1631b6
Compare
Checked commit yaacov@f1631b6 with ruby 2.3.3, rubocop 0.47.1, and haml-lint 0.20.0 |
@himdel updated to description, and added screen shots. |
Tested in UI... before: POST /container/button/10000000000908?pressed=container_perf now: GET /container/show/10000000000908?display=performance |
@miq-bot add_label gaprindashvili/yes BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1509674 target: 5.9.0 |
Fix performance drop-down button in container view (cherry picked from commit 983bd1d) https://bugzilla.redhat.com/show_bug.cgi?id=1513597
Gaprindashvili backport details:
|
Description
compute -> containers -> containers -> [ chose one container ] -> monitoring -> utilization
The utilization button is not working.
a. fix the button.
b. fix the message form "VM" to "Container" when no data.
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1509674
Screenshot
Before:
After: