foreman icon indicating copy to clipboard operation
foreman copied to clipboard

feature: Additional template inlcudes/if logic

Open bmagistro opened this issue 2 years ago • 4 comments

This work is based on the RFC discussion found https://community.theforeman.org/t/rfc-additional-template-includes-if-logic/29225 . It is probable that there are additional items that need updating that I am just not aware of/thinking about, but I believe this is a ~95+% solution.

This change introduces additional template includes and easier overrides for snippets. As designed today, if I wanted to override a snippet, I also need to override the template it is used in so that the name can be changed. With this change set there can now be an array of templates/snippets to try allowing you to only override the template/snippet you need to make adjustments to. This should make updating easier as you can just inherit the newer base template and not need to spend time diffing and pulling changes back into your copy.

bmagistro avatar Aug 04 '22 14:08 bmagistro

Can one of the admins verify this patch?

theforeman-bot avatar Aug 04 '22 14:08 theforeman-bot

Can one of the admins verify this patch?

theforeman-bot avatar Aug 04 '22 14:08 theforeman-bot

Can one of the admins verify this patch?

theforeman-bot avatar Aug 04 '22 14:08 theforeman-bot

Most of these are minor coding suggestions, but the nested array [[ instead of [ in the actual templates confuses me. Am I missing something?

No, I am equally (probably more) confused by it but do remember thinking this is strange, I shouldn't need to do this here. At the same time I never found another option. I know only enough in ruby to not break things too much.

Will look at the other suggestions and update accordingly.

bmagistro avatar Aug 08 '22 19:08 bmagistro

Rebased to resolve merge conflicts

bmagistro avatar Nov 10 '22 15:11 bmagistro

@bmagistro, this pull request is currently not mergeable. Please rebase against the develop branch and push again.

If you have a remote called 'upstream' that points to this repository, you can do this by running:

    $ git pull --rebase upstream develop

This message was auto-generated by Foreman's prprocessor

theforeman-bot avatar Dec 06 '22 13:12 theforeman-bot

rebased to address merge conflicts

bmagistro avatar Dec 06 '22 16:12 bmagistro

Could you create a Redmine issue for this? This is also something that needs tests.

I had been holding off on the redmine till I had a better sense of if this would be accepted/was interest. The RFC seemed to have minimal comments/traffic so I opened this to try and get more feedback/input. Will get a ticket created and commit messages updated.

bmagistro avatar Dec 08 '22 03:12 bmagistro

Thank you for your contribution, @bmagistro! This PR has been inactive for 3 months, closing for now. Feel free to reopen when you return to it. This is an automated process.

theforeman-bot avatar Apr 12 '23 01:04 theforeman-bot