Skip to content

Conversation

@GilbertCherrie
Copy link
Member

@GilbertCherrie GilbertCherrie commented Mar 13, 2024

These are the UI changes necessary for this PR: ManageIQ/manageiq-providers-embedded_terraform#3

Added the credentials and repository forms for embedded terraform. Also made some other minor changes.

Repository Form:
Screenshot 2024-03-15 at 12 55 57 PM
Screenshot 2024-03-15 at 1 32 37 PM

Credential Form:
Screenshot 2024-03-15 at 12 57 41 PM
Screenshot 2024-03-15 at 1 32 51 PM

@jeffibm
Copy link
Member

jeffibm commented Mar 14, 2024

Hey, are there any screenshots for this?

@GilbertCherrie
Copy link
Member Author

I added the screenshots of the add forms

@GilbertCherrie GilbertCherrie force-pushed the add_embedded_terraform_ui branch 3 times, most recently from d42202a to ce587aa Compare March 19, 2024 17:29
@Fryguy
Copy link
Member

Fryguy commented Mar 20, 2024

Can any of this live in the new plugin? I see some changes are modifying existing controllers, so not those, but what about the new components?

@agrare
Copy link
Member

agrare commented Mar 20, 2024

@GilbertCherrie I know we discussed on slack but can you put the reason why you think the js components should live in this repo?

@GilbertCherrie
Copy link
Member Author

@agrare By having the JS components in this repo it allows us to keep the same design pattern of defining the JS components and then calling them from the HAML files. This is technically possible to do all in the terraform repo but we would have to move over all the JS code required to load the JS components in the HAML files as well. Another option which we don't really use in the UI repo but exists in some of the provider repos is to call the JS files directly from the ruby button clicks.

@agrare agrare force-pushed the add_embedded_terraform_ui branch from ce587aa to f885e43 Compare March 28, 2024 19:21
@GilbertCherrie GilbertCherrie force-pushed the add_embedded_terraform_ui branch from 203da13 to 84d6100 Compare March 28, 2024 20:04
@GilbertCherrie GilbertCherrie force-pushed the add_embedded_terraform_ui branch from 84d6100 to 46048c1 Compare March 28, 2024 20:05
@miq-bot
Copy link
Member

miq-bot commented Mar 28, 2024

Checked commit GilbertCherrie@46048c1 with ruby 2.7.8, rubocop 1.56.3, haml-lint 0.51.0, and yamllint
3 files checked, 0 offenses detected
Everything looks fine. 🍰

@jeffibm
Copy link
Member

jeffibm commented Apr 25, 2024

Hey @GilbertCherrie , the UI code looks solid.

but, I checked-out the branches and I don't see a menu item for Embedded Terraforms.

I was looking for changes in the default_menu.rb. and its corresponding changes in manageiq repo.

Am I missing anything else?

@agrare
Copy link
Member

agrare commented Apr 25, 2024

Hey @jeffibm do you have the latest embedded_terraform plugin?

@jeffibm
Copy link
Member

jeffibm commented Apr 25, 2024

Hey @jeffibm do you have the latest embedded_terraform plugin?

Hi @agrare , all I did was pull manageiq and execute bin/update. I didn't see a reference for embedded_terraform in manageiq.

@agrare
Copy link
Member

agrare commented Apr 25, 2024

@jeffibm the embedded_terraform plugin isn't in the core Gemfile yet so you have to have a ensure_gem directive to add it

@GilbertCherrie
Copy link
Member Author

@jeffibm Yeah you have to overide the gem locally in the core repo like with running other providers/api repos locally:

ensure_gem "manageiq-providers-embedded_terraform", :path => "/Users/gilbertcherrie/manageiq-providers-embedded_terraform"

@jrafanie
Copy link
Member

@GilbertCherrie I'm not sure if it's this PR or ManageIQ/manageiq-providers-embedded_terraform#3 but when I refresh a repository, it's missing a template for the refresh button and ultimately does nothing...

image

[----] I, [2024-04-25T10:55:49.151479#32533:f078]  INFO -- : Started POST "/embedded_terraform_repository/button?pressed=embedded_configuration_script_source_refresh" for ::1 at 2024-04-25 10:55:49 -0400
[----] I, [2024-04-25T10:55:49.276765#32533:f078]  INFO -- : Processing by EmbeddedTerraformRepositoryController#button as JS
[----] I, [2024-04-25T10:55:49.276858#32533:f078]  INFO -- :   Parameters: {"miq_grid_checks"=>"34", "pressed"=>"embedded_configuration_script_source_refresh"}
[----] D, [2024-04-25T10:55:49.314151#32533:f078] DEBUG -- : PostgreSQLAdapter#log_after_checkout, connection_pool: size: 15, connections: 1, in use: 1, waiting_in_queue: 0
[----] D, [2024-04-25T10:55:49.316310#32533:f078] DEBUG -- :   User Load (1.0ms)  SELECT "users".* FROM "users" WHERE "users"."id" BETWEEN $1 AND $2 AND "users"."userid" = $3 LIMIT $4  [["id", 0], ["id", 999999999999], ["userid", "admin"], ["LIMIT", 1]]
[----] D, [2024-04-25T10:55:49.316635#32533:f078] DEBUG -- :   User Inst Including Associations (0.2ms - 1rows)
[----] D, [2024-04-25T10:55:49.318135#32533:f078] DEBUG -- :   MiqGroup Load (0.7ms)  SELECT "miq_groups".* FROM "miq_groups" WHERE "miq_groups"."id" = $1 LIMIT $2  [["id", 2], ["LIMIT", 1]]
[----] D, [2024-04-25T10:55:49.318282#32533:f078] DEBUG -- :   MiqGroup Inst Including Associations (0.0ms - 1rows)
[----] D, [2024-04-25T10:55:49.319605#32533:f078] DEBUG -- :   Tenant Load (0.9ms)  SELECT "tenants".* FROM "tenants" WHERE "tenants"."id" = $1 LIMIT $2  [["id", 1], ["LIMIT", 1]]
[----] D, [2024-04-25T10:55:49.319786#32533:f078] DEBUG -- :   Tenant Inst Including Associations (0.1ms - 1rows)
[----] D, [2024-04-25T10:55:49.323043#32533:f078] DEBUG -- :   MiqUserRole Load (1.5ms)  SELECT "miq_user_roles".* FROM "miq_user_roles" INNER JOIN "entitlements" ON "miq_user_roles"."id" = "entitlements"."miq_user_role_id" WHERE "entitlements"."miq_group_id" = $1 LIMIT $2  [["miq_group_id", 2], ["LIMIT", 1]]
[----] D, [2024-04-25T10:55:49.323339#32533:f078] DEBUG -- :   MiqUserRole Inst Including Associations (0.1ms - 1rows)
[----] D, [2024-04-25T10:55:49.325568#32533:f078] DEBUG -- :    (1.4ms)  SELECT "miq_product_features"."identifier" FROM "miq_product_features" INNER JOIN "miq_roles_features" ON "miq_product_features"."id" = "miq_roles_features"."miq_product_feature_id" WHERE "miq_roles_features"."miq_user_role_id" = $1  [["miq_user_role_id", 1]]
[----] I, [2024-04-25T10:55:49.326283#32533:f078]  INFO -- : No template found for EmbeddedTerraformRepositoryController#button, rendering head :no_content

I have to edit the repository name/desc to save it and have it refresh the repository since the button doesn't work.

I'm running with gem overrides for #9117 and a branch of the plugin with both ManageIQ/manageiq-providers-embedded_terraform#12 and ManageIQ/manageiq-providers-embedded_terraform#16 applied.

@GilbertCherrie
Copy link
Member Author

Looks like it was broken in the plugin code, @jrafanie I fixed the issue in this pr: ManageIQ/manageiq-providers-embedded_terraform#17

@jeffibm
Copy link
Member

jeffibm commented Apr 30, 2024

@jeffibm Yeah you have to overide the gem locally in the core repo like with running other providers/api repos locally:

ensure_gem "manageiq-providers-embedded_terraform", :path => "/Users/gilbertcherrie/manageiq-providers-embedded_terraform"

Hey @agrare , @GilbertCherrie , I can see the menu items and forms now..

@Fryguy Fryguy merged commit 6fdb1dc into ManageIQ:master May 2, 2024
@GilbertCherrie GilbertCherrie deleted the add_embedded_terraform_ui branch May 3, 2024 20:09
@asirvadAbrahamVarghese asirvadAbrahamVarghese mentioned this pull request Aug 4, 2025
84 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants