Permalink
Browse files

Merge pull request #1413 from skateman/log-collection-fix

Fixed prompt for log collection by reorganizing button inheritance
(cherry picked from commit 5288862)

https://bugzilla.redhat.com/show_bug.cgi?id=1460033
  • Loading branch information...
mzazrivec authored and simaishi committed May 24, 2017
1 parent 924c9f7 commit 03595170593ff63aa83fb148edae5618e5fcdfb7
@@ -1,4 +1,5 @@
class ApplicationHelper::Button::CollectLogs < ApplicationHelper::Button::DiagnosticsLogs
class ApplicationHelper::Button::CollectLogs < ApplicationHelper::Button::LogDepotEdit
include ApplicationHelper::Button::Mixins::ButtonPromptMixin
needs :@record
def disabled?
@@ -1,4 +1,4 @@
class ApplicationHelper::Button::DiagnosticsLogs < ApplicationHelper::Button::Logs
class ApplicationHelper::Button::LogDepotEdit < ApplicationHelper::Button::Basic
include ApplicationHelper::Button::Mixins::ActiveContextMixin
def visible?
@@ -1,4 +1,4 @@
class ApplicationHelper::Button::Logs < ApplicationHelper::Button::Basic
module ApplicationHelper::Button::Mixins::ButtonPromptMixin
def calculate_properties
super
self[:prompt] = @record.try(:log_file_depot).try(:requires_support_case?)
@@ -1,4 +1,5 @@
class ApplicationHelper::Button::ZoneCollectLogs < ApplicationHelper::Button::ZoneLogDepotEdit
class ApplicationHelper::Button::ZoneCollectLogs < ApplicationHelper::Button::LogDepotEdit
include ApplicationHelper::Button::Mixins::ButtonPromptMixin
needs :@record
def disabled?

This file was deleted.

Oops, something went wrong.
@@ -84,7 +84,7 @@ class ApplicationHelper::Toolbar::DiagnosticsServerCenter < ApplicationHelper::T
'pficon pficon-edit fa-lg',
N_('Edit the Log Depot settings for the selected Server'),
N_('Edit'),
:klass => ApplicationHelper::Button::DiagnosticsLogs),
:klass => ApplicationHelper::Button::LogDepotEdit),
select(
:restart_vmdb_choice,
'fa fa-cog fa-lg',
@@ -126,6 +126,6 @@ class ApplicationHelper::Toolbar::DiagnosticsZoneCenter < ApplicationHelper::Too
'pficon pficon-edit fa-lg',
N_('Edit the Log Depot settings for the selected Zone'),
N_('Edit'),
:klass => ApplicationHelper::Button::ZoneLogDepotEdit),
:klass => ApplicationHelper::Button::LogDepotEdit),
])
end
@@ -1,4 +1,4 @@
describe ApplicationHelper::Button::DiagnosticsLogs do
describe ApplicationHelper::Button::LogDepotEdit do
let(:view_context) { setup_view_context_with_sandbox(:active_tree => tree, :active_tab => tab) }
let(:button) { described_class.new(view_context, {}, {}, {}) }

This file was deleted.

Oops, something went wrong.

0 comments on commit 0359517

Please sign in to comment.