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 title of the page to be updated when searching text in Datastores and other pages #3385

Merged

Conversation

hstastna
Copy link

@hstastna hstastna commented Feb 8, 2018

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

Fix title of the page to be updated according to search text in Compute > Infrastructure > Datastores page and in another pages.

Details (for Datastores):
The title of the page was not updated when searching text in Datastores, because it was not implemented in storage controller. In other pages, for example VMs, it is implemented in get_node_info method (like this: https://github.com/ManageIQ/manageiq-ui-classic/blob/master/app/controllers/vm_common.rb#L1155). The title which was changed according to search text in Datastores page, is stored in @title variable, updated in application controller (here: https://github.com/ManageIQ/manageiq-ui-classic/blob/master/app/controllers/application_controller.rb#L1199), but this variable is used for title in other pages, not in Datastores (and also it was set to just "Datastores", and we need "All Datastores"). For Datastores we see the title in the page, which is stored in @right_cell_text, so I added the line for updating @right_cell_text according to what is in @search_text to storage controller, to get_node_info method (as it is in other controllers, where it works).

Another note:
I've added the line for updating @right_cell_text to controllers BEFORE the name of a filter is added to the title here https://github.com/ManageIQ/manageiq-ui-classic/pull/3385/files#diff-deaa0e49bde4dd95612b5e0b14568aa6R343 (if some filter is applied). The reason is "clear":
datastores_good
vs this:
datastores_not_good

Done: fixing the title in
-- Compute > Infrastructure > Datastores
-- Services > My Services
-- Configuration > Management
-- Control > Explorer
-- Automation > Ansible Tower > Explorer
-- spec tests for all of the changes in all of the controllers


Before searching text in Datastores:
datastores

Before fixing title in Datastores:
datastores_before1
datastores_before2

After fixing title in Datastores:
datastores_after1

@hstastna
Copy link
Author

hstastna commented Feb 8, 2018

@miq-bot add_label bug

@hstastna hstastna force-pushed the Title_search_text_Datastores_other_pages branch 9 times, most recently from 8e97bd1 to 942d5e0 Compare February 9, 2018 15:59
@hstastna hstastna changed the title [WIP] Fix title of the page to be updated when searching text in Datastores and other pages Fix title of the page to be updated when searching text in Datastores and other pages Feb 9, 2018
@hstastna hstastna force-pushed the Title_search_text_Datastores_other_pages branch from c9b9adb to bf05407 Compare February 9, 2018 18:20
@miq-bot miq-bot removed the wip label Feb 9, 2018
@@ -356,6 +356,24 @@
end
end

describe '#get_node_info' do
let(:search) { nil }
Copy link
Member

Choose a reason for hiding this comment

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

YAGNI

@@ -718,6 +718,24 @@
end
end

describe '#get_node_info' do
let(:search) { nil }
Copy link
Member

Choose a reason for hiding this comment

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

YAGNI

Hilda Stastna added 6 commits February 12, 2018 12:59
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1540613

Fix title of the page to be updated according to search text in Compute >
> Infrastructure > Datastores page.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1540613

Fix title of the page to be updated according to search text
in Services > My Services page.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1540613

Fix title of the page to be updated according to search text
in Configuration > Management page.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1540613

Fix title of the page to be updated according to search text in Control > Explorer page.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1540613

Fix title of the page to be updated according to search text in Automation > Ansible Tower > Explorer screen.
@hstastna hstastna force-pushed the Title_search_text_Datastores_other_pages branch from bf05407 to 6e47e7d Compare February 12, 2018 12:10
@hstastna hstastna force-pushed the Title_search_text_Datastores_other_pages branch from 6e47e7d to 70a363d Compare February 12, 2018 12:21
@hstastna hstastna force-pushed the Title_search_text_Datastores_other_pages branch from 70a363d to ec932f1 Compare February 12, 2018 12:26
@hstastna
Copy link
Author

@skateman Thanks for your review of my specs, now it should be ok ;)

@miq-bot
Copy link
Member

miq-bot commented Feb 12, 2018

Checked commits hstastna/manageiq-ui-classic@c7488df~...ec932f1 with ruby 2.3.3, rubocop 0.52.0, haml-lint 0.20.0, and yamllint 1.10.0
10 files checked, 0 offenses detected
Everything looks fine. 🍰

Copy link
Member

@skateman skateman left a comment

Choose a reason for hiding this comment

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

The Seal of Approval

@mzazrivec mzazrivec self-assigned this Feb 12, 2018
@mzazrivec mzazrivec added this to the Sprint 79 Ending Feb 12, 2018 milestone Feb 12, 2018
@mzazrivec mzazrivec merged commit 749c538 into ManageIQ:master Feb 12, 2018
simaishi pushed a commit that referenced this pull request Mar 8, 2018
…ther_pages

Fix title of the page to be updated when searching text in Datastores and other pages
(cherry picked from commit 749c538)

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

simaishi commented Mar 8, 2018

Gaprindashvili backport details:

$ git log -1
commit 5dc24a3327a67b3846ee656a3c03e02a49c0a50b
Author: Milan Zázrivec <mzazrivec@redhat.com>
Date:   Mon Feb 12 16:24:30 2018 +0100

    Merge pull request #3385 from hstastna/Title_search_text_Datastores_other_pages
    
    Fix title of the page to be updated when searching text in Datastores and other pages
    (cherry picked from commit 749c5389e89170e5064b960aa073058ece84cb37)
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1552900

@hstastna
Copy link
Author

hstastna commented Apr 6, 2018

@miq-bot add_label test

@miq-bot miq-bot added the test label Apr 6, 2018
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