<@U01LG01R536> <@U01QEJ9PP53> Has there been any p...
# prefect-ui
s
@znicholasbrown @Kevin Kho Has there been any progress on this issue? My team would very much like to upgrade our UI instance and this is a big blocker at the moment. https://github.com/PrefectHQ/ui/issues/861
n
Hi @Sam Cook - that issue should be resolved (looks like it didnโ€™t get closed though)z have you tried on the latest version of Core?
s
Oh, sweet! Let me update my test bed and see how that's looking
๐Ÿ‘ 1
I updated to the latest version and I still see the issue. The root page is served under the correct root path, but follow on pages still do not respect the set root path.
n
Interesting, I was under the impression the updated nginx image would fix this
s
I cracked open the index html, and there's a lot of references like
<link rel="stylesheet" href="/fonts/fonts.css">
I'm guessing the hard links are causing direct access to the root. Maybe simply changing to something like
<link rel="stylesheet" href="./fonts/fonts.css">
might fix it. I can try to update in the pod, but I'm guessing that pops up a lot in the embedded JS files as well
n
Yeah it would cause those sources are coming from a few different places, including webpack and our own scripts
s
The last workable version I used I just hardcoded my prefix for the webpack build and built a bespoke image, but since the FA-PRO inclusion I can't build locally anymore
n
yeah that tracks, i'm gonna try to solve this today so we can close that ticket
๐Ÿ™Œ 1
s
Thanks so much! 10/10 customer service. I should leave a Yelp review lol
๐Ÿ˜† 1
k
I know youโ€™re joking but if ever you have an Azure account, we take reviews in the Azure Marketplace lol
๐Ÿ‘€ 1
n
On further investigation, I don't think this will be possible to fix on our end - the reason is that relative urls (which is the only way we can do this without requiring a full rebuild of the application on every server start) break application chunk loading because we use native browser
history.pushState
spec to prevent full page reloads when the application routes. An workaround to this would be to use a custom nginx config in your container with a proxy pass to route requests to the correct locatione
s
For security reasons I can't put a default route to the server level pointing to the Prefect UI, so that's not going to work out since I can't route to the container without a prefix. Is it at all feasible for me to build a ui image with the prefix route set? The only thing stopping me now is premium FA assets
n
Hm yes and no. You can build the UI image just fine by replacing the couple of references of
fontawesome-pro
with
fontawesome-free
without any license... however that will break instances in the UI where we use special icons. I'm looking into how we might remove that download need altogether to let you pre-build everything if needed
while of course not needing to change every icon we use ๐Ÿ˜›
s
I wonder if there's a way I can take the existing built image and do a rebuild using the existing fa-pro as a cache? Maybe a minimal two stage build where I just pull the fa files to the second stage
n
oof that sounds messy to maintain tbh
s
oh, horrendously
n
i think i've actually found a way to include everything we need in the project by default, so we don't need to pull the FA icons in at all, they'll already be there
which would let you do whatever you'd like with the project
s
oh, that would be amazing
n
ok it looks like at least that's a change that we'll be able to push through, i've got a demo of this working locally
๐Ÿ™Œ 1
Btw this has been merged and should be released this week
s
Thanks for this! I just got my local build working, only had to do a little fiddling to get everything working. Boy is that not a quick build process.
n
That's why we removed it from the normal startup ๐Ÿ˜ž
l
Hi all, has this been fixed and pushed ? Also struggling to use UI behind a proxy. Thanks
s
@Luca Schneider There's no official fix for putting the UI behind a proxy, but my build is on Dockerhub and you can use it. The path prefix is hardcoded to
/prefectui/
, though. https://hub.docker.com/repository/docker/majikman111/prefect-ui-proxy
๐Ÿ‘ 1