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

Set @tree_selected_model when explorer or tree_select is called in OPS #2851

Merged
merged 2 commits into from
Nov 29, 2017

Conversation

ZitaNemeckova
Copy link
Contributor

Steps to Reproduce:

  1. Create new tenant
  2. Create a group and set it to have with new tenant (from step 1) and EvmRole-tenant_administrator role
  3. Create new user and set it to have only the new group (from step 2)
  4. Logout and login as the created user (from step 3)
  5. Navigate to user -> Configuration

Before:
Log:

F, [2017-11-28T13:42:47.420122 #53404] FATAL -- : Error caught: [ActionView::Template::Error] undefined method `>=' for nil:NilClass
ManageIQ/manageiq-ui-classic/app/helpers/application_helper/toolbar_builder.rb:366:in `button_class_name'
ManageIQ/manageiq-ui-classic/app/helpers/application_helper/toolbar_builder.rb:389:in `get_custom_buttons'
ManageIQ/manageiq-ui-classic/app/helpers/application_helper/toolbar_builder.rb:299:in `custom_button_selects'
ManageIQ/manageiq-ui-classic/app/helpers/application_helper/toolbar_builder.rb:341:in `build_custom_toolbar_class'
ManageIQ/manageiq-ui-classic/app/helpers/application_helper/toolbar_builder.rb:331:in `custom_toolbar_class'
ManageIQ/manageiq-ui-classic/app/helpers/application_helper/toolbar_builder.rb:70:in `toolbar_class'
ManageIQ/manageiq-ui-classic/app/helpers/application_helper/toolbar_builder.rb:18:in `build_toolbar'
ManageIQ/manageiq-ui-classic/app/helpers/application_helper/toolbar_builder.rb:6:in `call'
ManageIQ/manageiq-ui-classic/app/helpers/application_helper.rb:528:in `build_toolbar'

Screen:
screen shot 2017-11-28 at 1 42 51 pm

After:
screen shot 2017-11-28 at 1 42 03 pm

@miq-bot add_label gaprindashvili/yes, bug, settings, blocker

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

@tree_selected_model is needed to determine custom buttons if controller's model is not set or may dynamically change
tree_selected_model returns models based on x_node
must be called from tree_selct and explorer
@ZitaNemeckova ZitaNemeckova force-pushed the fix_tree_selected_model_ops branch from 335aaf0 to 24c784d Compare November 28, 2017 15:22
@miq-bot
Copy link
Member

miq-bot commented Nov 28, 2017

Checked commits ZitaNemeckova/manageiq-ui-classic@bf22098~...24c784d with ruby 2.3.3, rubocop 0.47.1, haml-lint 0.20.0, and yamllint 1.10.0
3 files checked, 0 offenses detected
Everything looks fine. ⭐

@ZitaNemeckova
Copy link
Contributor Author

@mzazrivec please have a look, thanks :)

@mzazrivec mzazrivec self-assigned this Nov 29, 2017
@mzazrivec mzazrivec added this to the Sprint 75 Ending Dec 11, 2017 milestone Nov 29, 2017
@mzazrivec mzazrivec merged commit 4998d4d into ManageIQ:master Nov 29, 2017
simaishi pushed a commit that referenced this pull request Nov 29, 2017
Set @tree_selected_model when explorer or tree_select is called in OPS
(cherry picked from commit 4998d4d)

https://bugzilla.redhat.com/show_bug.cgi?id=1518747
@simaishi
Copy link
Contributor

Gaprindashvili backport details:

$ git log -1
commit 756603b550d42a9947a19b76fb32275abc8d127b
Author: Milan Zázrivec <[email protected]>
Date:   Wed Nov 29 10:45:40 2017 +0100

    Merge pull request #2851 from ZitaNemeckova/fix_tree_selected_model_ops
    
    Set @tree_selected_model when explorer or tree_select is called in OPS
    (cherry picked from commit 4998d4d0cc85d8cdc4bfe7091e2d72787a7e1591)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1518747

@ZitaNemeckova ZitaNemeckova deleted the fix_tree_selected_model_ops branch January 8, 2018 20:37
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.

4 participants