Skip to content

Commit

Permalink
Dev -> Prod (#44)
Browse files Browse the repository at this point in the history
Merge 0.14 to prod
  • Loading branch information
cybermaggedon authored Nov 7, 2024
1 parent 63622f8 commit 95b1068
Show file tree
Hide file tree
Showing 52 changed files with 856 additions and 290 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ ui:
npm run build
rm -rf config-ui/config_ui/ui/
cp -r dist/ config-ui/config_ui/ui/
cp public/tg.svg config-ui/config_ui/ui/
cp public/*.png config-ui/config_ui/ui/
cp public/*.svg config-ui/config_ui/ui/

template-data:
rm -rf config-ui/config_ui/templates
Expand Down
22 changes: 20 additions & 2 deletions config-ui/config_ui/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,24 @@ def open(self, path):
except:
raise web.HTTPNotFound()

def open_binary(self, path):

if ".." in path:
raise web.HTTPNotFound()

if len(path) > 0:
if path[0] == "/":
path = path[1:]

if path == "": path = "index.html"

try:
p = self.ui.joinpath(path)
t = p.read_bytes()
return t
except:
raise web.HTTPNotFound()

async def everything(self, request):

try:
Expand All @@ -57,9 +75,9 @@ async def everything(self, request):
)

if request.path.endswith(".png"):
t = self.open(request.path)
t = self.open_binary(request.path)
return web.Response(
text=t, content_type="image/png"
body=t, content_type="image/png"
)

if request.path.endswith(".svg"):
Expand Down
254 changes: 254 additions & 0 deletions public/cassandra.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/docker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/google-cloud.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions public/milvus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/minikube.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/neo4j.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/podman.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 95b1068

Please sign in to comment.