Skip to content

Commit

Permalink
Merge pull request #9181 from GilbertCherrie/fix_ansible_tower_table
Browse files Browse the repository at this point in the history
Fix ansible tower and embedded workflows lists

(cherry picked from commit 960ba3a)
  • Loading branch information
jeffbonson authored and Fryguy committed May 24, 2024
1 parent dc52819 commit 1eee103
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/controllers/configuration_script_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ class ConfigurationScriptController < ApplicationController
menu_section :at
feature_for_actions controller_name, *ADV_SEARCH_ACTIONS

def self.table_name
@table_name ||= "configuration_script"
def self.model
ManageIQ::Providers::ExternalAutomationManager::ConfigurationScript
end

def button
Expand Down
2 changes: 2 additions & 0 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,8 @@ def db_to_controller(db, action = "show")
action = "show"
when "ServiceResource", "ServiceTemplate"
controller = "catalog"
when "ManageIQ::Providers::ExternalAutomationManager::ConfigurationScript"
controller = "configuration_script"
when "ManageIQ::Providers::EmbeddedAnsible::AutomationManager::Playbook"
controller = "ansible_playbook"
when "ManageIQ::Providers::EmbeddedAnsible::AutomationManager::Credential"
Expand Down
2 changes: 2 additions & 0 deletions app/helpers/application_helper/title.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ def title_from_layout(layout)
_("Utilization")
when /^miq_request/
_("Requests")
when "configuration_script"
_("Templates")
when "manageiq/providers/ansible_tower/automation_manager/playbook"
_("Playbooks (Ansible Tower)")
when "manageiq/providers/embedded_ansible/automation_manager/playbook"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ManageIQ.angular.app.service('DialogEditorHttp', ['$http', 'API', function($http

/** Function to load all available workflows when 'Embedded Workflow' is selected for dynamic field. */
this.loadAvailableWorkflows = () => {
const url = '/api/configuration_script_payloads/?expand=resources&attributes=configuration_script_source.name';
const url = '/api/configuration_script_payloads/?expand=resources&attributes=configuration_script_source.name&collection_class=ManageIQ::Providers::Workflows::AutomationManager::Workflow';
return API.get(url);
};

Expand Down

0 comments on commit 1eee103

Please sign in to comment.