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

Dead render partial #7609

Merged
merged 10 commits into from
Jan 28, 2021
Merged

Dead render partial #7609

merged 10 commits into from
Jan 28, 2021

Conversation

himdel
Copy link
Contributor

@himdel himdel commented Jan 28, 2021

I noticed a couple of templates doing render :partial => on a partial that doesn't exist - #7607

So.. trying to find these systematically, got to...

$ cd app/views/
$ ag render..partial | sed s/,.*// | cut -d\' -f2 | cut -d\" -f2 | sort -u | sed 's/^\///' | grep -v \# | grep -v : | sed 's/^\(.*\/\)\?/\1_/' | while read foo; do ls **/"$foo".* 2>/dev/null || echo ERROR "$foo"; done | grep ERR

ERROR miq_request/_prov_host_dialog
ERROR _alert_assign
ERROR dashboard/_widgets_menu
ERROR _edit
ERROR layouts/_drift
ERROR _profile_list
ERROR shared/_explorer
ERROR shared/views/ems_common/angular/_form
ERROR _ui_2
ERROR vm_common/_provision

So...

vm_common/provision - I'm not seeing evidence of the file ever existing
ui_2 - removed in #7189 (6601370)
shared/explorer - removed in #1986 (f26af33)
_profile_list - removed in #7348 (fe329b1)
layouts/drift - ManageIQ/manageiq#7321 (be99fb3)
dashboard/_widgets_menu - removed in #5997 (59df33f)
alert_assign - I'm not seeing evidence the file ever existed
prov_host_dialog - removed in #4169 (acb4316)
_edit: fixed rates_tabs to reference the form partial, which is referenced by the edit template
(and #7607 for shared/views/ems_common/angular/_form )

And added (removal of) _rates_tabs - removed in #7039 (c083fc0)

I'm not seeing evidence the file ever existed
there is no app/views/*/_edit.*,
there is a charegeback_rate/edit template, which loads the form partial .. so fixing to reference form
references shared/explorer, removed in #1986 (f26af33)

and not rendered by anything in service explorer, including the partials returned by set_right_cell_vars
I'm not seeing evidence of the file ever existing
@@ -2,7 +2,7 @@
- if x_node == "root"
= render :partial => "rates_list"
- elsif @edit && @edit[:new] && ((params[:pressed] && params[:pressed] != "chargeback_rates_delete") || params[:button] == "reset")
= render :partial => "edit"
= render :partial => "form"
Copy link
Contributor

@h-kataria h-kataria Jan 28, 2021

Choose a reason for hiding this comment

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

@himdel this view can be deleted, it is not being used

Copy link
Contributor Author

@himdel himdel Jan 28, 2021

Choose a reason for hiding this comment

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

Ah, perfect, I'll remove it.

Do you mean rates_tabs or the rates form as well?

EDIT: Oh, the form is still rendered through the edit action/template. So just rates tabs :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated :)

@miq-bot
Copy link
Member

miq-bot commented Jan 28, 2021

Checked commits https://github.com/himdel/manageiq-ui-classic/compare/aa5fbffce8febfb055947ed1e9d493d6eb2735f3~...ab50019ad7de7ac8d4c517599dd10843c5f641e7 with ruby 2.6.3, rubocop 0.82.0, haml-lint 0.35.0, and yamllint
8 files checked, 1 offense detected

**

  • 💣 💥 🔥 🚒 - Linter/Haml - Linter::Haml STDERR:
warning: parser/current is loading parser/ruby26, which recognizes
warning: 2.6.6-compliant syntax, but you are running 2.6.3.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.

@h-kataria h-kataria merged commit 0e63a0b into ManageIQ:master Jan 28, 2021
@himdel himdel deleted the dead-render-partial branch February 1, 2021 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants