ManageIQ / manageiq-providers-embedded_terraform

ManageIQ plugin for the Embedded Terraform provider.
Apache License 2.0
0 stars 10 forks source link

Add EmbeddedTerraform UI #3

Closed agrare closed 4 months ago

agrare commented 6 months ago

Depends on:

Depend TODO

Menu: image

Credentials Show List: image

Credentials Show: image

Credentials Show -> Repositories Show List: image

Repositories Show List: image

Repositories Show: image

Repositories Show -> Templates Show List: image

Templates Show List: image

Templates Show: image

agrare commented 6 months ago

Here is what I have in manageiq-ui-classic for this to work

diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index b79781784d..f88505a2b4 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -403,6 +403,12 @@ module ApplicationHelper
       controller = "ansible_playbook"
     when "ManageIQ::Providers::EmbeddedAnsible::AutomationManager::Credential"
       controller = "ansible_credential"
+    when "ManageIQ::Providers::EmbeddedTerraform::AutomationManager::Credential"
+      controller = "embedded_terraform_credential"
+    when "ManageIQ::Providers::EmbeddedTerraform::AutomationManager::ConfigurationScriptSource"
+      controller = "embedded_terraform_repository"
+    when "ManageIQ::Providers::EmbeddedTerraform::AutomationManager::ConfigurationScriptPayload"
+      controller = "embedded_terraform_workflow"
     when "ManageIQ::Providers::Workflows::AutomationManager::Workflow"
       controller = "workflow"
     when "ManageIQ::Providers::Workflows::AutomationManager::ConfigurationScriptSource"
diff --git a/app/helpers/application_helper/title.rb b/app/helpers/application_helper/title.rb
index e8f4b2b5fa..6d97fdec17 100644
--- a/app/helpers/application_helper/title.rb
+++ b/app/helpers/application_helper/title.rb
@@ -89,13 +89,11 @@ module ApplicationHelper
         _("Playbooks (Ansible Tower)")
       when "manageiq/providers/embedded_ansible/automation_manager/playbook"
         _("Playbooks")
-      when "manageiq/providers/embedded_ansible/automation_manager/credential", "manageiq/providers/workflows/automation_manager/credential"
+      when "manageiq/providers/embedded_ansible/automation_manager/credential", "manageiq/providers/workflows/automation_manager/credential", "manageiq/providers/embedded_terraform/automation_manager/credential"
         _("Credentials")
-      when "manageiq/providers/embedded_ansible/automation_manager/configuration_script_source"
+      when "manageiq/providers/embedded_ansible/automation_manager/configuration_script_source", "manageiq/providers/workflows/automation_manager/configuration_script_source", "manageiq/providers/embedded_terraform/automation_manager/configuration_script_source"
         _("Repositories")
-      when "manageiq/providers/workflows/automation_manager/configuration_script_source"
-        _("Repositories")
-      when "manageiq/providers/workflows/automation_manager/workflow"
+      when "manageiq/providers/workflows/automation_manager/workflow", "manageiq/providers/embedded_terraform/automation_manager/configuration_script_payload"
         _("Workflows")

       else
GilbertCherrie commented 6 months ago

This pr depends on UI PR: https://github.com/ManageIQ/manageiq-ui-classic/pull/9117 and core PR: https://github.com/ManageIQ/manageiq/pull/22943

jrafanie commented 5 months ago

Note, https://github.com/ManageIQ/manageiq-providers-embedded_terraform/pull/9 has been merged, renaming ConfigurationScriptPayload to Template

agrare commented 5 months ago

Okay it was pretty involved to rename this but I think I got everything done and tested

agrare commented 5 months ago

I'm going to take this out of WIP, I've tested creating SCM credentials, creating a repository, and viewing imported templates on the UI and everything appears functional.

agrare commented 4 months ago

@jrafanie I think this is ready to merge we just wont have https://github.com/ManageIQ/manageiq-ui-classic/pull/9117 until we add this plugin to the core Gemfile

jrafanie commented 4 months ago

@jrafanie I think this is ready to merge we just wont have ManageIQ/manageiq-ui-classic#9117 until we add this plugin to the core Gemfile

yes, I tried it out yesterday and it was working so let's get this in. It's in the new provider anyway so you would need to have added the provider in the first place to encounter any problems this PR may introduce.

jrafanie commented 4 months ago

@jeffibm feel free to review/comment on this after it's merged, we can always fix any problems you see. Thanks!