-
Notifications
You must be signed in to change notification settings - Fork 360
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
Search fixes for VmInfra #2842
Search fixes for VmInfra #2842
Conversation
8e02f62
to
a41ad70
Compare
770a5a1
to
384270f
Compare
384270f
to
b173a13
Compare
b173a13
to
3a45115
Compare
Since this PR has |
@diplay is getting passed through the session already. But the 'null' value never get's through due to: def set_session_data .. session["#{prefix}_display".to_sym] = @display unless @display.nil? I dare not change that as it might break just anything. Yet for the GTL I need also the nil value for @display. Specificaly @display is used to check if @search_test shall be applied as a filter to data in the GTL grid. This a very broken way of doing things but fixing that is no a task for Gaprindashvili. So I am just adding code to pass @display through the grid and restore it in /report_data.
3a45115
to
e217a0e
Compare
Note:When I click [x] in Hosts I get:
and there's no I am not fixing that here. |
Code looks good, but I still can't figure out when (Also not quite seeing a relation between that line, and the removal of (Yet to test..) |
I am not sure about the other things but I agree with removal of |
) | ||
results = assert_report_data_response | ||
expect(results['data']['rows'].length).to eq(1) | ||
expect(results['data']['rows'][0]['long_id']).to eq(h1.id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will need to eq(h1.id.to_s)
- #2902
(depending on which one is merged first :))
) | ||
results = assert_report_data_response | ||
expect(results['data']['rows'].length).to eq(1) | ||
expect(results['data']['rows'][0]['long_id']).to eq(vm1.id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will need to eq(h1.id.to_s)
- #2902
(depending on which one is merged first :))
Perfect, do you know why it's no longer needed then? :) |
|
yes, I haven't seen it before (when I was fixing it some time ago). Simply, |
@martinpovolny I'm trying to find out how it happens that AFAIK
So.. there's some context in some other PR? |
@himdel if you set the content type to JSON in a POST request and send it with the following body: {
"explorer": true,
"exploder": "true"
} Then the params = { 'explorer' => true, 'exploder' => 'true' } |
Oh ok, so I just didn't know we ever do a JSON POST 👍. Asuming this comes from the GTL component? Great, now only to test it :) |
yes |
@martinpovolny I have tested that this PR fixes Search also in Configuration Management Configured Systems page. It also works together with my PR #2424. I will continue with testing on some more pages. |
@hstastna: if this PR fixes another BZ then please, mark it as DUP. Thank you! |
@martinpovolny as @karelhala mentioned above, this also fixes an issue with catalog grid view change, but it's not quite a duplicate. |
We should merge this one ASAP.
|
Some comments on commits martinpovolny/manageiq-ui-classic@60a16a1~...d9835ed spec/controllers/host_controller_spec.rb
spec/controllers/vm_infra_controller_spec.rb
|
Checked commits martinpovolny/manageiq-ui-classic@60a16a1~...d9835ed with ruby 2.3.3, rubocop 0.47.1, haml-lint 0.20.0, and yamllint 1.10.0 app/controllers/application_controller.rb
|
Note: is also happening in Control > Explorer |
Code looks good, not seeing any breakage around miq policy either.. merged :). |
Search fixes for VmInfra (cherry picked from commit e4e87c6) https://bugzilla.redhat.com/show_bug.cgi?id=1520667 https://bugzilla.redhat.com/show_bug.cgi?id=1520553
Gaprindashvili backport details:
|
Fixing:
https://bugzilla.redhat.com/show_bug.cgi?id=1517392
I believe that earlier the
@explorer
branch worked for vm_infra. #2556 the added@layout
test but that works just in some cases (as shown in https://bugzilla.redhat.com/show_bug.cgi?id=1517392).So I am removing that.
Also the test for
'miq_policy' == @layout
seems duplicate to testing@explorer
because underControl/Explorer/Policies accordion
where this holds true@explorer
is also set.But the root clause here is the improperly set
@explorer
variable -- added a.to_s
to the check. I am not sure whyparams[:explorer]
is a bool so that is the safest.I am removing a strangeness with
unless @display
being only tested only if::Settings.server.case_sensitive_name_search
that seems to be a bug.I am moving the
session[:menu_click]
condition to the front because if chart pop-up menu click we want the filtering disabled and no matter with branch of the condition passes.I need more eyes and I need a list of screens where search is expected to work.
I can still break the search if I keep the search on and dive deep enough following the relations. But that is not to be fixed here. That might need changes not suitable for Gaprindashvili at this point.
Added specs for VmInfra search and Host search. More can be added following the pattern but I need to move forward.
Ping @mzazrivec, @himdel, @hstastna . Please, review.
If we would be able to make a list of places where search should work, it woud be nice.
Ping @dclarizio, @h-kataria : please, chime in if you have inputs on this.
TODO
WIP: fixing the search breaks nested list under VM such as VM --> {processes,files}. Working on that by passing@display
throught the GTL.Related problem
Seems to me that: Clear Search box text #1893 breaks "clear search button" functionality in Hosts. Actually It can be worker around by filling in an empty string instead of using the (broken) button. So no need to fix that here.Actually the PR did not break it. It just fixed only the non-explorer ones.