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

Parameterize resource display_name functions based on provider #40

Merged
merged 1 commit into from
Dec 13, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def run_with_miq_job(options, userid = nil)
end

def self.display_name(number = 1)
n_('Job Template (AWX)', 'Job Templates (AWX)', number)
n_('Job Template (%{provider_description})', 'Job Templates (%{provider_description})', number) % {:provider_description => module_parent.description}
end

def self.stack_type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def supports_limit?
end

def self.display_name(number = 1)
n_('Workflow Template (AWX)', 'Workflow Templates (AWX)', number)
n_('Workflow Template (%{provider_description})', 'Workflow Templates (%{provider_description})', number) % {:provider_description => module_parent.description}
end

def self.provider_collection(manager)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class ManageIQ::Providers::Awx::AutomationManager::ConfiguredSystem <
include ProviderObjectMixin

def self.display_name(number = 1)
n_('Configured System (AWX)', 'Configured Systems (AWX)', number)
n_('Configured System (%{provider_description})', 'Configured Systems (%{provider_description})', number) % {:provider_description => module_parent.description}
end

def provider_object(connection = nil)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class ManageIQ::Providers::Awx::AutomationManager::Job <
virtual_has_many :job_plays

def self.display_name(number = 1)
n_('AWX Job', 'AWX Jobs', number)
n_('%{provider_description} Job', '%{provider_description} Jobs', number) % {:provider_description => module_parent.description}
end

class << self
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ class ManageIQ::Providers::Awx::AutomationManager::Playbook <
has_many :jobs, :class_name => 'OrchestrationStack', :foreign_key => :configuration_script_base_id

def self.display_name(number = 1)
n_('Playbook (AWX)', 'Playbooks (AWX)', number)
n_('Playbook (%{provider_description})', 'Playbooks (%{provider_description})', number) % {:provider_description => module_parent.description}
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class << self
alias jobs orchestration_stacks

def self.display_name(number = 1)
n_('AWX Workflow Job', 'AWX Workflow Jobs', number)
n_('%{provider_description} Workflow Job', '%{provider_description} Workflow Jobs', number) % {:provider_description => module_parent.description}
end

def raw_status
Expand Down
Loading