-
Notifications
You must be signed in to change notification settings - Fork 358
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2722 from yaacov/uniform-behaviour-timeline-utili…
…zation-button Uniform the behaviour of timeline and utilization button (cherry picked from commit d1f626f) https://bugzilla.redhat.com/show_bug.cgi?id=1513602
- Loading branch information
Showing
7 changed files
with
37 additions
and
15 deletions.
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,8 +1,17 @@ | ||
class ApplicationHelper::Button::ContainerPerf < ApplicationHelper::Button::Basic | ||
needs(:@record) | ||
|
||
def initialize(view_context, view_binding, instance_data, props) | ||
super | ||
@entity = props[:options][:entity] || N_('Entity') | ||
end | ||
|
||
def disabled? | ||
@error_message = _('No Capacity & Utilization data has been collected for this Container') unless @record.has_perf_data? | ||
unless @record.has_perf_data? | ||
@error_message = _('No Capacity & Utilization data has been collected for this %{entity}') % | ||
{:entity => _(@entity)} | ||
end | ||
|
||
@error_message.present? | ||
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
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
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
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
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
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