-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update theme path in ocis-wopi, ocis-hello examples, drone config and default flagset docs #2437
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
But that means our default in oCIS is also invalid!? -> https://owncloud.dev/extensions/web/configuration/
|
Most definitely yes. Also not sure if it takes precedence over whatever is written in the config file (which from my POV would be expected behavior) |
522b68c
to
c456fcd
Compare
@wkloucek rebased, found another broken example of the theme path in the drone config (fails silently with a sane fallback but 1 less console error), fixed the flagset default. Could you re-review and merge if happy? |
web/pkg/flagset/flagset.go
Outdated
@@ -170,7 +170,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { | |||
}, | |||
&cli.StringFlag{ | |||
Name: "web-config-theme", | |||
Value: flags.OverrideDefaultString(cfg.Web.Config.Theme, "owncloud"), | |||
Value: flags.OverrideDefaultString(cfg.Web.Config.Theme, "https://localhost:9200/themes/owncloud/theme.json"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we at least need to use OCIS_URL in that case as a fallback URL. Are relative paths also supported?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which actually gets quite ugly because OCIS_URL ist just expected to have the protocol+host part (eg. https://localhost:9200)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's your suggestion? The default is "check in the config file for web" which goes looking at whatever path is provided and if that one fails it loads the default theme we ship inside web
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just so I'm on the same page, the semantics of $WEB_UI_CONFIG_THEME
, as I gather from the above discussion, is an endpoint where web downloads the theme? If that is the case we have to rename it to $WEB_UI_CONFIG_THEME_URL
, since web expects a URL (in the strict definition of URL, which means no relative paths, since it is not a resource...)
Or else it looks to me that we have 2 config values to build the path that @wkloucek described above:
"https://localhost:9200/themes/owncloud/theme.json"
is the combination of:
{$WEB_UI_CONFIG_SERVER || $OCIS_URL}/themes/{$WEB_UI_CONFIG_THEME}/theme.json
And both of them have the default set so the end result is a URL that @wkloucek described above. But these changes probably go beyond the scope of this ticket since it is docs-only 😸
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just pushed a possible solution as a commit to this PR. @pascalwengerter please have a look if this is ok to you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't properly approve since it's my own PR but apart from a small nitpick this looks good to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@wkloucek CI is very unhappy, could you check locally if the code is correctly formatted and unit tests pass? |
just a old starlark... Will rebase |
Co-authored-by: Pascal Wengerter <pwengerter@owncloud.com>
7a5786d
to
987261f
Compare
Kudos, SonarCloud Quality Gate passed! |
Description
Current (outdated) config relies on fallback