Skip to content

Commit

Permalink
Fix performance drop-down button in container view
Browse files Browse the repository at this point in the history
  • Loading branch information
yaacov committed Nov 13, 2017
1 parent 1302ca4 commit f1631b6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 8 additions & 0 deletions app/helpers/application_helper/button/container_perf.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
class ApplicationHelper::Button::ContainerPerf < ApplicationHelper::Button::Basic
needs(:@record)

def disabled?
@error_message = _('No Capacity & Utilization data has been collected for this Container') unless @record.has_perf_data?
@error_message.present?
end
end
8 changes: 6 additions & 2 deletions app/helpers/application_helper/toolbar/container_center.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,20 @@ class ApplicationHelper::Toolbar::ContainerCenter < ApplicationHelper::Toolbar::
'ff ff-timeline fa-lg',
N_('Show Timelines for this Container'),
N_('Timelines'),
:url => "/show",
:url_parms => "?display=timeline",
:options => {:entity => 'Container'},
:klass => ApplicationHelper::Button::ContainerTimeline),
:klass => ApplicationHelper::Button::ContainerTimeline
),
button(
:container_perf,
'ff ff-monitoring fa-lg',
N_('Show Capacity & Utilization data for this Container'),
N_('Utilization'),
:url => "/show",
:url_parms => "?display=performance",
:klass => ApplicationHelper::Button::VmPerf),
:klass => ApplicationHelper::Button::ContainerPerf
),
]
),
])
Expand Down

0 comments on commit f1631b6

Please sign in to comment.