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

ReportController - replace_right_cell - don't rebuild trees which don't exist #1665

Merged
merged 3 commits into from
Jul 10, 2017
Merged

ReportController - replace_right_cell - don't rebuild trees which don't exist #1665

merged 3 commits into from
Jul 10, 2017

Conversation

himdel
Copy link
Contributor

@himdel himdel commented Jul 10, 2017

Check if a tree exists before rebuilding it.

(The trees get rebuilt when a new report is generated, but we need to rebuild only the ones that the user can see, not all of them.)

Related to https://bugzilla.redhat.com/show_bug.cgi?id=1468336 (comment #4), and thus a follow-up to #1657 .

Steps to reproduce...

  1. log in as a user which can't see all the trees in CI > Reports
  2. pick a report - Generate
    (before, you'll see an infinite spinner, after, it should work :))

Ping @h-kataria :)

@himdel himdel changed the title ReportController - replace_right_cell - don't rebuild trees which don't ReportController - replace_right_cell - don't rebuild trees which don't exist Jul 10, 2017
tree_exists expects the whole tree name, including _tree
   * moved the common code to `before`
   * removed obsolete x_build_dyna_tree mention
   * don't overwrite @sb by calling contoller.instance_variable_set twice
   * pre-initialize all the trees - otherwise tree_exists? won't find them
   * also test `build_reports_tree`, especially in the one test that was supposed to check it gets re-rendered when explicitly called with `:replace_trees`
   * add a spec testing only existing trees get rendered
@h-kataria
Copy link
Contributor

LGTM

@h-kataria h-kataria added this to the Sprint 64 Ending Jul 10, 2017 milestone Jul 10, 2017
@h-kataria h-kataria merged commit 831a078 into ManageIQ:master Jul 10, 2017
simaishi pushed a commit that referenced this pull request Jul 10, 2017
ReportController - replace_right_cell - don't rebuild trees which don't exist
(cherry picked from commit 831a078)

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

Fine backport details:

$ git log -1
commit 38acf11810616dc1d1b7a5f333b3461c33f79de3
Author: Harpreet Kataria <hkataria@redhat.com>
Date:   Mon Jul 10 15:34:54 2017 -0400

    Merge pull request #1665 from himdel/bz1468336-rebuild-tree-exists
    
    ReportController - replace_right_cell - don't rebuild trees which don't exist
    (cherry picked from commit 831a078642a612fd0230d72a90fd2e4777a44d4d)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1468336

@himdel himdel deleted the bz1468336-rebuild-tree-exists branch July 11, 2017 09:49
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.

3 participants