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 TOP_TABLES_BY_WASTED_SPACE_COUNT from UiConstants #1757

Merged
merged 2 commits into from
Jul 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/helpers/ops_helper/textual_summary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def textual_vmdb_tables_most_wasted_space
:title => _("Tables with Most Wasted Space"),
Copy link
Member

Choose a reason for hiding this comment

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

@europ move the constant definition on the beginning of this method, instead of leaving a random number in the code

Copy link
Member

@martinpovolny martinpovolny Jul 26, 2017

Choose a reason for hiding this comment

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

@romanblanco , I see your point. But this constant is really in just one place and we removed more constants like that. Maybe we could replace more of the "5" that serve similar purpose with a single constant in a follow up PR?

:headers => [_("Name"), _("Wasted")],
:col_order => %w(name value),
:value => vmdb_table_top_rows(:wasted_bytes, TOP_TABLES_BY_WASTED_SPACE_COUNT)
:value => vmdb_table_top_rows(:wasted_bytes, 5)
}
end

Expand Down
2 changes: 0 additions & 2 deletions app/helpers/ui_constants.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ module UiConstants
TIMELINES_FOLDER = File.join(Rails.root, "product/timelines")
TOOLBARS_FOLDER = File.join(Rails.root, "product/toolbars")

TOP_TABLES_BY_WASTED_SPACE_COUNT = 5

# PDF page sizes
PDF_PAGE_SIZES = {
"a0" => N_("A0 - 841mm x 1189mm"),
Expand Down