Skip to content
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

theme uri invalid with extra "/" #660

Closed
mengzhuo opened this issue Jul 20, 2022 · 1 comment · Fixed by #661
Closed

theme uri invalid with extra "/" #660

mengzhuo opened this issue Jul 20, 2022 · 1 comment · Fixed by #661
Labels
bug Something isn't working

Comments

@mengzhuo
Copy link
Contributor

mengzhuo commented Jul 20, 2022

Expected Behavior

Access /ui/flows get all extra resources.

Actual Behaviour

Can't get theme-light.js and theme-light.css, here is actual URI, Please note there is an extra "/" after ui/

<link rel="stylesheet" href="/ui//css/theme-light.00305fce.css" data-theme="theme-light">

const KESTRA_ASSETS = '<% print(JSON.stringify(webpack.assetsByChunkName)); %>'
if (localStorage.getItem("theme")) {
document.getElementsByTagName("html")[0].classList.add(localStorage.getItem("theme"));
}

kestra/ui/src/App.vue

Lines 96 to 110 in d9f0201

.forEach(r => {
let elem;
if (r.endsWith(".js")) {
elem = document.createElement("script");
elem.setAttribute("type", "text/javascript");
elem.setAttribute("src", basePath + "/" + r);
} else {
elem = document.createElement("link");
elem.setAttribute("rel", "stylesheet");
elem.setAttribute("href", basePath + "/" + r);
}
elem.setAttribute("data-theme", theme);
themes[theme].push(elem);

Might be the culprit.

Steps To Reproduce

  1. Install istio and using oauth2-proxy for authentication.

Environment Information

  • Kestra Version: 0.5.0-BETA

Example flow

No response

@mengzhuo mengzhuo added the bug Something isn't working label Jul 20, 2022
@tchiotludo
Copy link
Member

Thanks for the report
Maybe you can add create a PR with trim last / on basePath ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants