Skip to content

Commit

Permalink
Merge pull request #1930 from europ/remove-ui-constants-29
Browse files Browse the repository at this point in the history
Remove REALTIME_CHOICES from UiConstants
  • Loading branch information
martinpovolny authored Aug 17, 2017
2 parents 6c543ea + e3105a1 commit 151e5bc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
9 changes: 0 additions & 9 deletions app/helpers/ui_constants.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,6 @@ module UiConstants
# 180 => "6 Months"
}

# Choices for C&U last hour real time minutes back pulldown
REALTIME_CHOICES = {
10.minutes => N_("10 Minutes"),
15.minutes => N_("15 Minutes"),
30.minutes => N_("30 Minutes"),
45.minutes => N_("45 Minutes"),
1.hour => N_("1 Hour")
}

# Choices for Target options show pulldown
TARGET_TYPE_CHOICES = {
"EmsCluster" => N_("Clusters"),
Expand Down
9 changes: 9 additions & 0 deletions app/helpers/view_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ module ViewHelper
"US-Folio" => N_("US Folio - 8.5in x 13.0in")
}.freeze

# Choices for C&U last hour real time minutes back pulldown
REALTIME_CHOICES = {
10.minutes => N_("10 Minutes"),
15.minutes => N_("15 Minutes"),
30.minutes => N_("30 Minutes"),
45.minutes => N_("45 Minutes"),
1.hour => N_("1 Hour")
}.freeze

class << self
def concat_tag(*args, &block)
concat content_tag(*args, &block)
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/_perf_options.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
= _("Show")
%dd
= select_tag("perf_minutes",
options_for_select(REALTIME_CHOICES.map { |k, v| [_(v), k] }.sort_by(&:last),
options_for_select(ViewHelper::REALTIME_CHOICES.map { |k, v| [_(v), k] }.sort_by(&:last),
@perf_options[:rt_minutes]),
"data-miq_sparkle_on" => true,
:class => "selectpicker")
Expand Down

0 comments on commit 151e5bc

Please sign in to comment.