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

Propagate parent model into GTLs on InfraNetwork switches 🖵 🐞 #5902

Merged
merged 2 commits into from
Jul 30, 2019

Conversation

skateman
Copy link
Member

@skateman skateman commented Jul 30, 2019

The GTL on the Compute > Infrastructure -> Networking displays the same switches all the time, doesn't matter which node you are selecting. The problem is that the selected_ids param is no longer propagated into the GTLs. Even if I would try to propagate it, an empty array would fall back to the current behavior (possibly because of a compact on the params somewhere).

The Right Way™ is to send the parent record into the options passed further to the GTL and it will automagically call the switches method on it. Of course this requires to have the switches method on every model we're touching and it's missing from the EmsCluster.

Also found out that the Lan nodes under switches should not be clickable, we lost this functionality here.

@miq-bot add_label pending core, bug, compute/infrastructure, explorers, hammer/yes, ivanchuk/yes
@miq-bot add_reviewer @h-kataria

Depends on: ManageIQ/manageiq#19076
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1726280

@skateman
Copy link
Member Author

@h-kataria there's still a glitch with this, I'm not sure if we would like to display the switches that don't belong to any host. The TreeBuilder apparently ignores them and I'd go with it as a reference and hide them using the already existing shareable named scope. If we'd like to display them, we might need some extra model changes.

Let's discuss this on gitter when you're available ...

@miq-bot miq-bot added the wip label Jul 30, 2019
@skateman skateman changed the title [WIP] Propagate parent model into GTLs on InfraNetwork switches 🖵 🐞 Propagate parent model into GTLs on InfraNetwork switches 🖵 🐞 Jul 30, 2019
@miq-bot miq-bot removed the wip label Jul 30, 2019
@skateman
Copy link
Member Author

@miq-bot rm_label pending core

@skateman skateman force-pushed the switches-controller branch from dedf71c to 4ba6f1b Compare July 30, 2019 16:50
@miq-bot
Copy link
Member

miq-bot commented Jul 30, 2019

Checked commits skateman/manageiq-ui-classic@a9f371a~...4ba6f1b with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0
2 files checked, 0 offenses detected
Everything looks fine. 🏆

@h-kataria h-kataria self-assigned this Jul 30, 2019
@h-kataria h-kataria added this to the Sprint 117 Ending Aug 5, 2019 milestone Jul 30, 2019
@h-kataria h-kataria merged commit c613075 into ManageIQ:master Jul 30, 2019
@skateman skateman deleted the switches-controller branch July 30, 2019 20:34
simaishi pushed a commit that referenced this pull request Jul 30, 2019
Propagate parent model into GTLs on InfraNetwork switches 🖵 🐞

(cherry picked from commit c613075)

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

Ivanchuk backport details:

$ git log -1
commit 6cd24042412810204ad497c7cd3ba10dfe5ec17c
Author: Harpreet Kataria <[email protected]>
Date:   Tue Jul 30 16:31:48 2019 -0400

    Merge pull request #5902 from skateman/switches-controller
    
    Propagate parent model into GTLs on InfraNetwork switches 🖵 🐞
    
    (cherry picked from commit c6130750863bc1d6ed88710fdd7ffb27e944370e)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1726280

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.

5 participants