Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed prompt for log collection by reorganizing button inheritance #1413

Merged
merged 1 commit into from
May 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/helpers/application_helper/button/collect_logs.rb
Original file line number Diff line number Diff line change
@@ -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?
Expand Down
Original file line number Diff line number Diff line change
@@ -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?
Expand Down
Original file line number Diff line number Diff line change
@@ -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?)
Expand Down
Original file line number Diff line number Diff line change
@@ -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?
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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, {}, {}, {}) }

Expand Down

This file was deleted.