Skip to content

Commit 960ba3a

Browse files
authored
Merge pull request #9181 from GilbertCherrie/fix_ansible_tower_table
Fix ansible tower and embedded workflows lists
2 parents a9b704b + c3dbd5f commit 960ba3a

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

app/controllers/configuration_script_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ class ConfigurationScriptController < ApplicationController
1414
menu_section :at
1515
feature_for_actions controller_name, *ADV_SEARCH_ACTIONS
1616

17-
def self.table_name
18-
@table_name ||= "configuration_script"
17+
def self.model
18+
ManageIQ::Providers::ExternalAutomationManager::ConfigurationScript
1919
end
2020

2121
def button

app/helpers/application_helper.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,8 @@ def db_to_controller(db, action = "show")
399399
action = "show"
400400
when "ServiceResource", "ServiceTemplate"
401401
controller = "catalog"
402+
when "ManageIQ::Providers::ExternalAutomationManager::ConfigurationScript"
403+
controller = "configuration_script"
402404
when "ManageIQ::Providers::EmbeddedAnsible::AutomationManager::Playbook"
403405
controller = "ansible_playbook"
404406
when "ManageIQ::Providers::EmbeddedAnsible::AutomationManager::Credential"

app/helpers/application_helper/title.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ def title_from_layout(layout)
8585
_("Utilization")
8686
when /^miq_request/
8787
_("Requests")
88+
when "configuration_script"
89+
_("Templates")
8890
when "manageiq/providers/ansible_tower/automation_manager/playbook"
8991
_("Playbooks (Ansible Tower)")
9092
when "manageiq/providers/embedded_ansible/automation_manager/playbook"

app/javascript/oldjs/services/dialog_editor_http_service.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ ManageIQ.angular.app.service('DialogEditorHttp', ['$http', 'API', function($http
3434

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

0 commit comments

Comments
 (0)