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

Fix filters in config mgmt Configured systems #776

Merged
merged 3 commits into from
Jun 6, 2017

Conversation

hstastna
Copy link

@hstastna hstastna commented Mar 23, 2017

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

Fix saving a new filter in expression editor
in Configuration -> Management -> Configured systems
and enable displaying flash message about successful saving.

Fix disappearing tree view after saving a filter.
Enable displaying name of a filter under Global/My Filters
in tree view.

Fix applying selected filter from Global/My Filters
in accordion when clicking on the name of a filter.

Fix disappearing of tree view when deleting loaded
filter in expression editor.

Before:
mgmt_before2
mgmt_before3
mgmt_before1

After:
mgmt_after4
mgmt_after1
mgmt_after2
mgmt_after3

@hstastna
Copy link
Author

@miq-bot add_label bug, ui

@miq-bot
Copy link
Member

miq-bot commented Mar 23, 2017

@hstastna Cannot apply the following label because they are not recognized: ui

@miq-bot miq-bot added the bug label Mar 23, 2017
@hstastna hstastna force-pushed the Config_mgmt_configured_systems branch from c1cf869 to d214039 Compare March 27, 2017 11:56
builder = TreeBuilder.class_for_type(tree_type)
tree = builder.new(x_active_tree, tree_type, @sb)
end
if "configuration_manager_cs_filter_tree" == x_active_tree.to_s
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this has been there before, but I'd much rather see:

if x_active_tree.to_s == "configuration_manager_cs_filter_tree"

@@ -450,7 +450,7 @@ def adv_search_button
if ["delete", "saveit"].include?(params[:button])
if @edit[:in_explorer] || x_active_tree == :storage_tree
tree_name = x_active_tree.to_s
if "configuration_manager_cs_filter_tree_tree" == tree_name
if "configuration_manager_cs_filter_tree" == tree_name
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

@mzazrivec mzazrivec self-assigned this Mar 29, 2017
@hstastna hstastna force-pushed the Config_mgmt_configured_systems branch from d214039 to 331b07d Compare March 29, 2017 15:38
@mzazrivec
Copy link
Contributor

For some reason, when I click on the created filter, I get this error:

Error caught: [ActiveRecord::RecordNotFound] Couldn't find MiqSearch with 'id'=10r133
.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/activerecord-5.0.2/lib/active_record/core.rb:173:in `find'
manageiq-ui-classic/app/controllers/application_controller/filter.rb:227:in `load_selected_search'
manageiq-ui-classic/app/controllers/application_controller/filter.rb:192:in `listnav_search_selected'
manageiq-ui-classic/app/controllers/provider_foreman_controller.rb:172:in `load_or_clear_adv_search'
manageiq-ui-classic/app/controllers/mixins/manager_controller_mixin.rb:167:in `tree_select'

@hstastna hstastna force-pushed the Config_mgmt_configured_systems branch from 331b07d to 345bc68 Compare April 3, 2017 12:27
@hstastna hstastna changed the title Fix filters in in config mgmt Configured systems Fix filters in config mgmt Configured systems Apr 3, 2017
@hstastna hstastna force-pushed the Config_mgmt_configured_systems branch from 345bc68 to 4aeafdb Compare April 4, 2017 11:08
@hstastna hstastna force-pushed the Config_mgmt_configured_systems branch from 4aeafdb to 8750f10 Compare April 11, 2017 14:59
@hstastna
Copy link
Author

@mzazrivec I have rebased and repushed this PR and before that I have tested my changes again and using different databases and for me it all works perfectly all the time. Do you still get the error?

@miq-bot
Copy link
Member

miq-bot commented May 2, 2017

This pull request is not mergeable. Please rebase and repush.

@hstastna hstastna force-pushed the Config_mgmt_configured_systems branch 3 times, most recently from e606162 to bc4a4bc Compare May 2, 2017 13:17
@hstastna hstastna force-pushed the Config_mgmt_configured_systems branch 2 times, most recently from 908afb0 to a8f850f Compare May 11, 2017 12:55
@mzazrivec
Copy link
Contributor

I see the problem I reported above still present:

  1. I create a filter expression, save it and close the expression editor
  2. The newly created filter appears in the tree on the left
  3. I click on the newly created filter -> error

Hilda Stastna added 3 commits May 31, 2017 14:00
fixing https://bugzilla.redhat.com/show_bug.cgi?id=1429519

Fix saving a new filter in expression editor
in Configuration -> Management -> Configured systems
and enable displaying flash message about successful saving.
Fix disappearing tree view after saving a filter.
Enable displaying name of a filter under Global/My Filters
in tree view.
fixing https://bugzilla.redhat.com/show_bug.cgi?id=1429519

Fix applying selected filter from Global/My Filters
in accordion when clicking on the name of a filter
in Configuration -> Management -> Configured systems.
Fix disappearing of tree view when deleting loaded
filter in expression editor.
fixing https://bugzilla.redhat.com/show_bug.cgi?id=1429519

Fix error which occured after selecting a filter from Global/My Filters
in accordion when clicking on the name of a filter in Configuration ->
Management -> Configured systems because of wrong id format which had
to be uncompressed before using in listnav_search_selected method.
@hstastna hstastna force-pushed the Config_mgmt_configured_systems branch from a8f850f to 3ae3b9c Compare May 31, 2017 12:54
@hstastna
Copy link
Author

@mzazrivec I added another commit to this PR to fix the error you have mentioned. Now it works well.

@miq-bot
Copy link
Member

miq-bot commented May 31, 2017

Checked commits hstastna/manageiq-ui-classic@531ac1a~...3ae3b9c with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
3 files checked, 0 offenses detected
Everything looks fine. 👍

@mzazrivec mzazrivec added this to the Sprint 63 Ending Jun 19, 2017 milestone Jun 6, 2017
@mzazrivec mzazrivec merged commit 96631ab into ManageIQ:master Jun 6, 2017
simaishi pushed a commit that referenced this pull request Jun 12, 2017
@simaishi
Copy link
Contributor

Fine backport details:

$ git log -1
commit 7e481fa3a596d216f88947b306d2286493dba555
Author: Milan Zázrivec <[email protected]>
Date:   Tue Jun 6 11:07:52 2017 +0200

    Merge pull request #776 from hstastna/Config_mgmt_configured_systems
    
    Fix filters in config mgmt Configured systems
    (cherry picked from commit 96631ab11960f795f35a1028f20ab0e276ae1b67)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1460792

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