-
Notifications
You must be signed in to change notification settings - Fork 356
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1480819: Fix labels for Scale Infrastructure Provider form
fixes https://bugzilla.redhat.com/show_bug.cgi?id=1480819 This commit changes the labels on the Scale Infrastructure Provider form from the user-unfriendly parameter names (i.e. "ControllerCount") to more descriptive labels (i.e. "Number of Controller Hosts").
- Loading branch information
Showing
2 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,23 @@ | ||
module EmsInfraHelper | ||
include_concern 'TextualSummary' | ||
|
||
def scaling_field_label(param_name) | ||
field_name = param_name.dup | ||
case field_name | ||
when 'BlockStorageCount' | ||
_('Number of Block Storage Hosts') | ||
when 'ObjectStorageCount' | ||
_('Number of Object Storage Hosts') | ||
when 'CephStorageCount' | ||
_('Number of Ceph Storage Hosts') | ||
when 'ComputeCount' | ||
_('Number of Compute Hosts') | ||
when 'ControllerCount' | ||
_('Number of Controller Hosts') | ||
else | ||
field_name.sub!("Count", "") | ||
field_name.sub!("::count", "") | ||
_("Number of %{host_type} Hosts") % {:host_type => field_name.underscore.humanize.titleize} | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters