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

GTL missing parent fix #2804

Merged
merged 4 commits into from
Nov 23, 2017
Merged

GTL missing parent fix #2804

merged 4 commits into from
Nov 23, 2017

Conversation

martinpovolny
Copy link
Member

@martinpovolny martinpovolny commented Nov 22, 2017

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

Pass @parent to the rendering routine. The variable is missing since #2727

Remove @use_action (see details in the commit message).

The @use_action is set

  • for the whole Host controller
    (HostController.get_session_data)

  • in init_show_variables in ExplorerShow
    that is called from:

    • hosts -- not tested (don't have data)
    • users
    • groups
    • patches -- not tested (don't have data)
    • guest_application ("packages")

I have added some specs. And have manually tested:

host --> {users,groups,guest_application,host_services}
vm --> {guest_application,linux_initprocesses}

Have not tested "hosts" and "patches" -- don't have the data, but the pattern is the same.

I have noticed that host-->groups,guest_application has broken breadcrumb: "Services". But that is unrelated to this PR.

Ping @himdel, this needs a detailed reading, please help.
Ping @karelhala : I know you said that removing the @use_action "should be ok", but please, take a look.
Ping @alexander-demichev : this should unlock your fixing of the issue we discussed.

Testers welcome.

@martinpovolny martinpovolny changed the title [WIP] GTL parent fix [WIP] GTL missing parent fix Nov 22, 2017
@martinpovolny martinpovolny force-pushed the gtl_parent_fix branch 2 times, most recently from 7bb4146 to 7e67776 Compare November 22, 2017 19:08
Adding a missing variable omitted in
ManageIQ#2727
@use_action was to handle exceptional behavior of nested list (mostly)
under Hosts before the @report_data_additional_options was introduced.

@use_action was set:
 * for all lists in HostController (via
   HostController.get_session_data and then

 * for (hosts,users,groups,patches,
   guest_application) in ExplorerShow.init_show_variables.

ExplorerShow in included throught the ApplicationController everyhere.
Some nested lists are used e.g. in VmInfraContoller (guest_application,
linux_initprocesses).

The whole line:
:active_tree  => (x_active_tree unless params[:display] || @use_action)
in GtlHelper.render_gtl_outer is another candidate for removal.
@miq-bot
Copy link
Member

miq-bot commented Nov 23, 2017

Some comments on commits martinpovolny/manageiq-ui-classic@da45f4e~...a185e62

spec/controllers/host_controller_spec.rb

  • ⚠️ - 184 - Detected expect_any_instance_of. This RSpec method is highly discouraged, please only use when absolutely necessary.
  • ⚠️ - 197 - Detected expect_any_instance_of. This RSpec method is highly discouraged, please only use when absolutely necessary.

@miq-bot
Copy link
Member

miq-bot commented Nov 23, 2017

Checked commits martinpovolny/manageiq-ui-classic@da45f4e~...a185e62 with ruby 2.3.3, rubocop 0.47.1, haml-lint 0.20.0, and yamllint 1.10.0
6 files checked, 0 offenses detected
Everything looks fine. 🍪

@himdel
Copy link
Contributor

himdel commented Nov 23, 2017

LGTM, also tested with patches :)

@martinpovolny martinpovolny removed the wip label Nov 23, 2017
@martinpovolny martinpovolny changed the title [WIP] GTL missing parent fix GTL missing parent fix Nov 23, 2017
@himdel himdel added this to the Sprint 74 Ending Nov 27, 2017 milestone Nov 23, 2017
@himdel himdel merged commit c38ae77 into ManageIQ:master Nov 23, 2017
simaishi pushed a commit that referenced this pull request Nov 27, 2017
@simaishi
Copy link
Contributor

Gaprindashvili backport details:

$ git log -1
commit fa74e19e0b30e320e7789e329d589dc91e39a500
Author: Martin Hradil <himdel@seznam.cz>
Date:   Thu Nov 23 12:50:59 2017 +0000

    Merge pull request #2804 from martinpovolny/gtl_parent_fix
    
    GTL missing parent fix
    (cherry picked from commit c38ae7715b488999b933b8d12905150d36264b58)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1517914

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