lyft / presto-gateway

A load balancer / proxy / gateway for prestodb
Apache License 2.0
358 stars 156 forks source link

Fix assets path to fix admin entity editing #192

Open Pluies opened 1 year ago

Pluies commented 1 year ago

Hey folks,

I was trying to get entity editing to work as per the README under Gateway Admin UI), but the page at https://<presto-gateway>/entity/ ended up broken. I realised that CSS / JS resources weren't loading because the template references assets via relative path, and the admin page is located at /entity. The relative path therefore ends up being /entity/assets/... which receives a 404.

The attached PR fixes this by setting an absolute path for /assets, rather than relative.

(Note: I assume that this is the correct thing to do, but I'm not 100% sure as the docs don't actually specify the URL for the admin page - maybe I'm just using the wrong path? Please let me know if that's the case :) )

akhurana001 commented 1 year ago

So /entity works fine for me and I can see css files loading fine without this change.

Can you share screenshots to help us understand/replicate what's broken ?