-
Notifications
You must be signed in to change notification settings - Fork 356
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
Made "Advanced" tab visible for all Server nodes. #3925
Made "Advanced" tab visible for all Server nodes. #3925
Conversation
Allow edit of advanced config setting for all servers. Made changes so this code can be used to edit Zone/Region config settings in future. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1536524
6c8e49d
to
39f0e57
Compare
@h-kataria happy to see this PR. /cc @Fryguy |
Once the backend PR changes, please update the screenshots. As you can see, this is showing Config::Options objects and not pure yaml. |
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.
Needs backend merged first
@Fryguy updated screenshot. |
@lgalis please test/review. |
Looks good. Tested in the UI that the Advanced settings can be edited and saved for each server. The types of validation errors detected by the config validator for the current server are also detected and displayed for all other servers. |
|
||
context 'get advanced config settings' do | ||
it 'for selected server' do | ||
_guid, miq_server, _zone = EvmSpecHelper.local_guid_miq_server_zone |
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.
To ensure that this code works for any server and not just my_server, this code should
- create a server via Factory.create(:miq_server)
- not use stub_settings. stub_settings cheats by hacking the ::Settings constant and also makes it looks like every server returns that value. Since you are testing settings itself, you shouldn't use it here, because it's bypassing the code you want to verify. Instead create a server object and actually save settings into it, like was done with the parent PR.
|
||
controller.send(:settings_update_save) | ||
controller.send(:fetch_advanced_settings, miq_server) | ||
expect(VMDB::Config.save_file(data, miq_server)).to be true |
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.
The controller itself should be calling this, so why are you calling it in the test directly?
367e130
to
e15cd4a
Compare
@Fryguy addressed feedback. |
LGTM but tests are failing. |
e15cd4a
to
8e27e8b
Compare
Checked commits h-kataria/manageiq-ui-classic@39f0e57~...8e27e8b with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
@mzazrivec please merge |
Allow edit of advanced config setting for all servers. Made changes so this code can be used to edit Zone/Region config settings in future.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1536524
Dependent on core PR ManageIQ/manageiq#17406
before no Advanced tab on Remote server level:
![before](https://user-images.githubusercontent.com/3450808/39886041-4a5c438a-545c-11e8-9177-7bbb53030882.png)
after:
![after](https://user-images.githubusercontent.com/3450808/40188987-3e734dd0-59c9-11e8-85bb-f6b05f92976c.png)