Skip to content

Commit 8116077

Browse files
committed
Added new Button Class to Ensure Management Console Button Only Appears When it Should
1 parent 5b41825 commit 8116077

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
class ApplicationHelper::Button::VmManagementConsole < ApplicationHelper::Button::Basic
2+
needs :@record
3+
4+
def visible?
5+
@record.vendor == 'ibm_power_hmc'
6+
end
7+
end

app/helpers/application_helper/toolbar/x_vm_center.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ class ApplicationHelper::Toolbar::XVmCenter < ApplicationHelper::Toolbar::Basic
306306
N_('Management Console'),
307307
:keepSpinner => true,
308308
:url => "management_console",
309-
:klass => ApplicationHelper::Button::GenericFeatureButton,
309+
:klass => ApplicationHelper::Button::VmManagementConsole,
310310
:options => {:feature => :native_console}
311311
),
312312
]

0 commit comments

Comments
 (0)