diff --git a/app/controllers/ansible_credential_controller.rb b/app/controllers/ansible_credential_controller.rb index 855dd62f383..367bbf6e232 100644 --- a/app/controllers/ansible_credential_controller.rb +++ b/app/controllers/ansible_credential_controller.rb @@ -42,9 +42,9 @@ def button javascript_redirect(:action => 'edit', :id => params[:miq_grid_checks]) when 'embedded_configuration_script_source_edit' # edit repository from nested list javascript_redirect(:controller => "ansible_repository", :action => 'edit', :id => params[:miq_grid_checks]) - when 'ansible_credential_tag' # tag credentials + when 'embedded_automation_manager_credential_tag' # tag credentials tag(self.class.model) - when "ansible_repository_tag" # tag repositories from nested list + when "embedded_configuration_script_source_tag" # tag repositories from nested list tag(ManageIQ::Providers::EmbeddedAnsible::AutomationManager::ConfigurationScriptSource) end end @@ -118,7 +118,7 @@ def show_list end def tag_edit_form_field_changed - assert_privileges('ansible_credential_tag') + assert_privileges('embedded_automation_manager_credential_tag') super end diff --git a/app/controllers/ansible_repository_controller.rb b/app/controllers/ansible_repository_controller.rb index 7911ded28c9..27a380b7ebc 100644 --- a/app/controllers/ansible_repository_controller.rb +++ b/app/controllers/ansible_repository_controller.rb @@ -57,7 +57,7 @@ def button show render_update("main_div", "show", false) end - when "ansible_repository_tag" # tag repositories + when "embedded_configuration_script_source_tag" # tag repositories tag(self.class.model) when "embedded_configuration_script_payload_tag" # tag playbooks from nested list tag(ManageIQ::Providers::EmbeddedAnsible::AutomationManager::Playbook) @@ -144,7 +144,7 @@ def show_list end def tag_edit_form_field_changed - assert_privileges('ansible_repository_tag') + assert_privileges('embedded_configuration_script_source_tag') super end diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 97abea2d509..510b8620c4c 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1890,13 +1890,10 @@ def controller_for_common_methods "generic_object" when "ansible_playbook", "workflow", "embedded_terraform_template" "embedded_configuration_script_payload" - when "workflow_repository", "embedded_terraform_repository" - "ansible_repository" - # TODO: Update manageiq/db/fixtures/miq_product_features.yml by replacing ansible_credential_tag with embedded_automation_manager_credential_tag - # when "workflow_credential", "ansible_credential" - # "embedded_automation_manager_credential" - when "workflow_credential", "embedded_terraform_credential" - "ansible_credential" + when "workflow_repository", "ansible_repository", "embedded_terraform_repository" + "embedded_configuration_script_source" + when "workflow_credential", "ansible_credential", "embedded_terraform_credential" + "embedded_automation_manager_credential" else controller_name end diff --git a/app/controllers/workflow_credential_controller.rb b/app/controllers/workflow_credential_controller.rb index 03569c906ea..a5ba1a202d9 100644 --- a/app/controllers/workflow_credential_controller.rb +++ b/app/controllers/workflow_credential_controller.rb @@ -44,9 +44,9 @@ def button javascript_redirect(:action => 'edit', :id => params[:miq_grid_checks]) when 'embedded_configuration_script_source_edit' # edit repository from nested list javascript_redirect(:controller => 'workflow_repository', :action => 'edit', :id => params[:miq_grid_checks]) - when 'ansible_credential_tag' # tag credentials + when 'embedded_automation_manager_credential_tag' # tag credentials tag(self.class.model) - when "ansible_repository_tag" # tag repositories from nested list + when "embedded_configuration_script_source_tag" # tag repositories from nested list tag(ManageIQ::Providers::Workflows::AutomationManager::ConfigurationScriptSource) end end @@ -120,7 +120,7 @@ def show_list end def tag_edit_form_field_changed - assert_privileges('ansible_credential_tag') + assert_privileges('embedded_automation_manager_credential_tag') $log.warn(caller.pretty_inspect) diff --git a/app/controllers/workflow_repository_controller.rb b/app/controllers/workflow_repository_controller.rb index 2c31e677587..907bcb3f71d 100644 --- a/app/controllers/workflow_repository_controller.rb +++ b/app/controllers/workflow_repository_controller.rb @@ -62,7 +62,7 @@ def button show render_update("main_div", "show", false) end - when "ansible_repository_tag" # tag repositories + when "embedded_configuration_script_source_tag" # tag repositories tag(self.class.model) when "embedded_configuration_script_payload_tag" # tag workflows from nested list tag(ManageIQ::Providers::Workflows::AutomationManager::Workflow) diff --git a/app/helpers/application_helper/toolbar/ansible_credential_center.rb b/app/helpers/application_helper/toolbar/ansible_credential_center.rb index 8ad6db92fe4..f694365c675 100644 --- a/app/helpers/application_helper/toolbar/ansible_credential_center.rb +++ b/app/helpers/application_helper/toolbar/ansible_credential_center.rb @@ -38,7 +38,7 @@ class ApplicationHelper::Toolbar::AnsibleCredentialCenter < ApplicationHelper::T t, :items => [ button( - :ansible_credential_tag, + :embedded_automation_manager_credential_tag, 'pficon pficon-edit fa-lg', N_('Edit Tags for this Ansible Credential'), N_('Edit Tags'), diff --git a/app/helpers/application_helper/toolbar/ansible_credentials_center.rb b/app/helpers/application_helper/toolbar/ansible_credentials_center.rb index 5a595c25d41..994ad004d00 100644 --- a/app/helpers/application_helper/toolbar/ansible_credentials_center.rb +++ b/app/helpers/application_helper/toolbar/ansible_credentials_center.rb @@ -55,7 +55,7 @@ class ApplicationHelper::Toolbar::AnsibleCredentialsCenter < ApplicationHelper:: :onwhen => "1+", :items => [ button( - :ansible_credential_tag, + :embedded_automation_manager_credential_tag, 'pficon pficon-edit fa-lg', N_('Edit Tags for the selected Ansible Credentials'), N_('Edit Tags'), diff --git a/app/helpers/application_helper/toolbar/ansible_repositories_center.rb b/app/helpers/application_helper/toolbar/ansible_repositories_center.rb index 048828f2ffe..9258fe796ef 100644 --- a/app/helpers/application_helper/toolbar/ansible_repositories_center.rb +++ b/app/helpers/application_helper/toolbar/ansible_repositories_center.rb @@ -76,7 +76,7 @@ class ApplicationHelper::Toolbar::AnsibleRepositoriesCenter < ApplicationHelper: :onwhen => "1+", :items => [ button( - :ansible_repository_tag, + :embedded_configuration_script_source_tag, 'pficon pficon-edit fa-lg', N_('Edit Tags for the selected Ansible Repositories'), N_('Edit Tags'), diff --git a/app/helpers/application_helper/toolbar/ansible_repository_center.rb b/app/helpers/application_helper/toolbar/ansible_repository_center.rb index 3b85df195c3..5bf534b530d 100644 --- a/app/helpers/application_helper/toolbar/ansible_repository_center.rb +++ b/app/helpers/application_helper/toolbar/ansible_repository_center.rb @@ -58,7 +58,7 @@ class ApplicationHelper::Toolbar::AnsibleRepositoryCenter < ApplicationHelper::T t, :items => [ button( - :ansible_repository_tag, + :embedded_configuration_script_source_tag, 'pficon pficon-edit fa-lg', N_('Edit Tags for this Ansible Repository'), N_('Edit Tags'), diff --git a/app/helpers/application_helper/toolbar/workflow_credential_center.rb b/app/helpers/application_helper/toolbar/workflow_credential_center.rb index 97b390fcf7e..39162588b3e 100644 --- a/app/helpers/application_helper/toolbar/workflow_credential_center.rb +++ b/app/helpers/application_helper/toolbar/workflow_credential_center.rb @@ -40,7 +40,7 @@ class ApplicationHelper::Toolbar::WorkflowCredentialCenter < ApplicationHelper:: t, :items => [ button( - :ansible_credential_tag, + :embedded_automation_manager_credential_tag, 'pficon pficon-edit fa-lg', N_('Edit Tags for this Workflow Credential'), N_('Edit Tags') diff --git a/app/helpers/application_helper/toolbar/workflow_credentials_center.rb b/app/helpers/application_helper/toolbar/workflow_credentials_center.rb index 814c7edbfcd..250a2de7e08 100644 --- a/app/helpers/application_helper/toolbar/workflow_credentials_center.rb +++ b/app/helpers/application_helper/toolbar/workflow_credentials_center.rb @@ -58,7 +58,7 @@ class ApplicationHelper::Toolbar::WorkflowCredentialsCenter < ApplicationHelper: :onwhen => "1+", :items => [ button( - :ansible_credential_tag, + :embedded_automation_manager_credential_tag, 'pficon pficon-edit fa-lg', N_('Edit Tags for the selected Workflow Credentials'), N_('Edit Tags'), diff --git a/app/helpers/application_helper/toolbar/workflow_repositories_center.rb b/app/helpers/application_helper/toolbar/workflow_repositories_center.rb index d984e3d95b6..6fd37cfc316 100644 --- a/app/helpers/application_helper/toolbar/workflow_repositories_center.rb +++ b/app/helpers/application_helper/toolbar/workflow_repositories_center.rb @@ -85,7 +85,7 @@ class ApplicationHelper::Toolbar::WorkflowRepositoriesCenter < ApplicationHelper :items => [ button( - :ansible_repository_tag, + :embedded_configuration_script_source_tag, 'pficon pficon-edit fa-lg', N_('Edit Tags for the selected Workflow Repositories'), N_('Edit Tags'), diff --git a/app/helpers/application_helper/toolbar/workflow_repository_center.rb b/app/helpers/application_helper/toolbar/workflow_repository_center.rb index 810db051546..24e63d6d380 100644 --- a/app/helpers/application_helper/toolbar/workflow_repository_center.rb +++ b/app/helpers/application_helper/toolbar/workflow_repository_center.rb @@ -62,7 +62,7 @@ class ApplicationHelper::Toolbar::WorkflowRepositoryCenter < ApplicationHelper:: :items => [ button( - :ansible_repository_tag, + :embedded_configuration_script_source_tag, 'pficon pficon-edit fa-lg', N_('Edit Tags for this Workflow Repository'), N_('Edit Tags') diff --git a/app/presenters/menu/default_menu.rb b/app/presenters/menu/default_menu.rb index 5a4afb916db..14ae59968d1 100644 --- a/app/presenters/menu/default_menu.rb +++ b/app/presenters/menu/default_menu.rb @@ -201,9 +201,9 @@ def automation_manager_menu_section def ansible_menu_section Menu::Section.new(:ansible, N_("Embedded Ansible"), nil, [ - Menu::Item.new('ansible_playbooks', N_('Playbooks'), 'embedded_configuration_script_payload', {:feature => 'embedded_configuration_script_payload', :any => true}, '/ansible_playbook/show_list'), - Menu::Item.new('ansible_repositories', N_('Repositories'), 'embedded_configuration_script_source', {:feature => 'embedded_configuration_script_source', :any => true}, '/ansible_repository/show_list'), - Menu::Item.new('ansible_credentials', N_('Credentials'), 'embedded_automation_manager_credentials', {:feature => 'embedded_automation_manager_credentials', :any => true}, '/ansible_credential/show_list'), + Menu::Item.new('ansible_playbooks', N_('Playbooks'), 'embedded_configuration_script_payload', {:feature => 'embedded_configuration_script_payload_view', :any => true}, '/ansible_playbook/show_list'), + Menu::Item.new('ansible_repositories', N_('Repositories'), 'embedded_configuration_script_source', {:feature => 'embedded_configuration_script_source_view', :any => true}, '/ansible_repository/show_list'), + Menu::Item.new('ansible_credentials', N_('Credentials'), 'embedded_automation_manager_credentials', {:feature => 'embedded_automation_manager_credentials_view', :any => true}, '/ansible_credential/show_list'), ]) end diff --git a/spec/controllers/ansible_credential_controller_spec.rb b/spec/controllers/ansible_credential_controller_spec.rb index df72fc6d730..e1732743cce 100644 --- a/spec/controllers/ansible_credential_controller_spec.rb +++ b/spec/controllers/ansible_credential_controller_spec.rb @@ -55,7 +55,7 @@ end context 'tagging one or more ansible credentials' do - let(:params) { {:pressed => "ansible_credential_tag"} } + let(:params) { {:pressed => "embedded_automation_manager_credential_tag"} } it 'calls tag method' do expect(controller).to receive(:tag).with(controller.class.model) @@ -64,7 +64,7 @@ end context 'tagging one or more ansible repositories from nested list' do - let(:params) { {:pressed => "ansible_repository_tag"} } + let(:params) { {:pressed => "embedded_configuration_script_source_tag"} } before do controller.instance_variable_set(:@display, "repositories") diff --git a/spec/controllers/ansible_repository_controller_spec.rb b/spec/controllers/ansible_repository_controller_spec.rb index 10a75cefb7f..38bf8142b12 100644 --- a/spec/controllers/ansible_repository_controller_spec.rb +++ b/spec/controllers/ansible_repository_controller_spec.rb @@ -95,7 +95,7 @@ end context 'tagging one or more repositories' do - let(:params) { {:pressed => "ansible_repository_tag"} } + let(:params) { {:pressed => "embedded_configuration_script_source_tag"} } it 'calls tag method' do expect(controller).to receive(:tag).with(controller.class.model) diff --git a/spec/controllers/workflow_credential_controller_spec.rb b/spec/controllers/workflow_credential_controller_spec.rb index 25bc9990b06..b728b2ea4b3 100644 --- a/spec/controllers/workflow_credential_controller_spec.rb +++ b/spec/controllers/workflow_credential_controller_spec.rb @@ -58,7 +58,7 @@ end context 'tagging one or more workflow credentials' do - let(:params) { {:pressed => "ansible_credential_tag"} } + let(:params) { {:pressed => "embedded_automation_manager_credential_tag"} } it 'calls tag method' do expect(controller).to receive(:tag).with(controller.class.model) @@ -67,7 +67,7 @@ end context 'tagging one or more workflow repositories from nested list' do - let(:params) { {:pressed => "ansible_repository_tag"} } + let(:params) { {:pressed => "embedded_configuration_script_source_tag"} } before do controller.instance_variable_set(:@display, "repositories") diff --git a/spec/controllers/workflow_repository_controller_spec.rb b/spec/controllers/workflow_repository_controller_spec.rb index be26282c198..37501698b6f 100644 --- a/spec/controllers/workflow_repository_controller_spec.rb +++ b/spec/controllers/workflow_repository_controller_spec.rb @@ -96,7 +96,7 @@ end context 'tagging one or more repositories' do - let(:params) { {:pressed => "ansible_repository_tag"} } + let(:params) { {:pressed => "embedded_configuration_script_source_tag"} } it 'calls tag method' do expect(controller).to receive(:tag).with(controller.class.model)