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

Remove legacy settings code #8965

Merged

Conversation

GilbertCherrie
Copy link
Member

Remove legacy settings code.

Code related to theme was removed as this is related to a feature that no longer exists.

Code related to time profiles was removed as this is code is no longer needed after the time profile form was converted to React in this PR: #7761.

Code related to view_selected and configuration_view helper files was removed as this code is no longer needed after the visual settings form was converted to react in this PR: #7495.

@GilbertCherrie GilbertCherrie force-pushed the remove_legacy_settings_code branch from d74459b to 26d720f Compare November 16, 2023 20:31
@miq-bot
Copy link
Member

miq-bot commented Nov 16, 2023

Checked commit GilbertCherrie@26d720f with ruby 2.6.10, rubocop 1.28.2, haml-lint 0.35.0, and yamllint
4 files checked, 0 offenses detected
Everything looks fine. 🍰

@edit[:new][:display][:locale] = params[:display_locale] if params[:display_locale]
@edit[:new][:display][:compare] = params[:display][:compare] if !params[:display].nil? && !params[:display][:compare].nil?
@edit[:new][:display][:drift] = params[:display][:drift] if !params[:display].nil? && !params[:display][:drift].nil?
when "ui_3" # Visual Settings tab
Copy link
Member

Choose a reason for hiding this comment

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

I believe ui_3 is still present, right? I think the comment here is actually wrong. Same with the comment for ui_4 below.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah ui_3 is still present. The only place I saw this function be called is on this line:
get_form_vars if @tabform != "ui_3"

Not sure if I understood this right or not but will get_form_vars only be called if @tabform is not equal to ui_3? This would mean that the ui_3 block in this function is never entered. Also, the code in these blocks doesn't seem related to the forms on the ui_3 and ui_4 tabs. The code seems to be referring to a [:display][:compare] value which comes from the ui_1 tab. Not sure if this was just a copy paste error or not.

Copy link
Member

Choose a reason for hiding this comment

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

oh ok - I thought get_form_vars would have been called elsewhere, but if not, then this is fine.

@Fryguy
Copy link
Member

Fryguy commented Nov 16, 2023

Can you verify the My Settings pages still work with different users? This is the exact page I was on with my recent changes to fix non-admin users.

Copy link
Member

@DavidResende0 DavidResende0 left a comment

Choose a reason for hiding this comment

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

@Fryguy I think I'm running into an issue regarding user permissions however this is happening in master as well so it's unrelated to this pr. Basically, I'm getting an auth error when clicking on time profiles even though it looks like I have the permission (Main My Settings Page still works).
image
image

Also @GilbertCherrie, @Fryguy do either of you know what the Default Views permission is for?

@GilbertCherrie
Copy link
Member Author

@DavidResende0 Fixed that issue in this pr: #8969. Also I believe Default Views is for a deprecated feature and removed in this pr: ManageIQ/manageiq#22797

@DavidResende0 DavidResende0 merged commit 6a258bc into ManageIQ:master Nov 29, 2023
8 checks passed
@GilbertCherrie GilbertCherrie deleted the remove_legacy_settings_code branch November 29, 2023 19:41
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