Skip to content

Conversation

@dirien
Copy link
Contributor

@dirien dirien commented Mar 5, 2022

Fixes: #550

Hi,

this PR enables potential users to provide their own Welcome page.

With the flag --web-template-path=<path>, you can specify the path to your custom welcome page.

The structure of the folder should be like this:

web/
  index.html
  xyz.html
  static/
      main.css
      main.js

I use c.HTML to serve the custom welcome page, this means we have full access to the go-template engine

The rules are: Every file with html ending will be picked up. This is useful if you want to create templates and include them in the main index.html file (see my example). But only the index.html will be served!

Static files (css, js or pics) should be saved into the static folder. I check the code, if the static folder if present to serve this.

Currently, their is no support for variables in the template.

If everybody like this, I will extend the enable the helm chart too.

Example:
image

Looking for your feedback!

Copy link
Contributor

@cbuto cbuto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! 🎉

Looks good for the most part, I did note one issue around auth that we'll have to figure out.

@dirien dirien requested a review from cbuto March 7, 2022 23:57
Copy link
Contributor

@cbuto cbuto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for fixing the auth! I think this should be good to go once some basic unit tests are updated/added to cover this new feature. Thanks!!

@dirien dirien force-pushed the welcome_page branch 2 times, most recently from e1fc6a0 to 93d4633 Compare March 8, 2022 23:37
@dirien
Copy link
Contributor Author

dirien commented Mar 8, 2022

Hi @cbuto,

add the tests and removed the folder with the example html files. The Readme has the new feature explained.

Looking for your feedback :)

Copy link
Contributor

@cbuto cbuto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good! thanks for adding the tests!

maybe we can get one more review @nerdeveloper @scbizu?

@cbuto cbuto requested review from a team, nerdeveloper and scbizu and removed request for nerdeveloper and scbizu March 9, 2022 15:07
@cbuto cbuto added this to the v0.15.0 milestone Mar 9, 2022
Copy link
Contributor

@scbizu scbizu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally LGTM , adds some small code suggestions.

@scbizu
Copy link
Contributor

scbizu commented Mar 11, 2022

@cbuto I am coming ~

@dirien Thanks for your creative PR ~

@dirien
Copy link
Contributor Author

dirien commented Mar 11, 2022

HI @scbizu, thanks for the input.

I changed the parts! Looking forward for your fedback!

Copy link
Contributor

@scbizu scbizu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dirien Need some more small changes here XD

@dirien
Copy link
Contributor Author

dirien commented Mar 13, 2022

@scbizu done. moved the error check above the range.

@dirien dirien requested a review from scbizu March 13, 2022 10:02
Copy link
Contributor

@scbizu scbizu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dirien add some error log is better ?

Signed-off-by: Engin Diri <engin.diri@mail.schwarz>
@dirien dirien requested a review from scbizu March 14, 2022 06:40
@scbizu scbizu merged commit 1de4aa3 into helm:main Mar 15, 2022
@scbizu
Copy link
Contributor

scbizu commented Mar 15, 2022

LGTM , merged .

@dirien dirien deleted the welcome_page branch March 15, 2022 05:53
@dirien
Copy link
Contributor Author

dirien commented Mar 15, 2022

Thanks a lot @scbizu and @cbuto

@cbuto
Copy link
Contributor

cbuto commented Mar 15, 2022

Thanks for working on this @dirien! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How to customize welcome page

3 participants