From e36173c60d1f810b3b92223434c2ecd72aaf1ca6 Mon Sep 17 00:00:00 2001 From: snowron Date: Thu, 14 Sep 2023 12:07:19 +0300 Subject: [PATCH 1/2] fix: fallback route cannot navigate to react page Signed-off-by: snowron Signed-off-by: Danny Chiao --- sdk/python/feast/ui_server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/python/feast/ui_server.py b/sdk/python/feast/ui_server.py index 9950eea070..cc553a9711 100644 --- a/sdk/python/feast/ui_server.py +++ b/sdk/python/feast/ui_server.py @@ -77,7 +77,7 @@ def read_registry(): # For all other paths (such as paths that would otherwise be handled by react router), pass to React @app.api_route("/p/{path_name:path}", methods=["GET"]) def catch_all(): - filename = ui_dir + "index.html" + filename = str(ui_dir) + "/index.html" with open(filename) as f: content = f.read() From 0e7103753a714328b6e28d06762676aa8f15accf Mon Sep 17 00:00:00 2001 From: snowron Date: Tue, 26 Sep 2023 09:55:10 +0300 Subject: [PATCH 2/2] refactor fix Signed-off-by: snowron --- sdk/python/feast/ui_server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/python/feast/ui_server.py b/sdk/python/feast/ui_server.py index cc553a9711..8a39293f91 100644 --- a/sdk/python/feast/ui_server.py +++ b/sdk/python/feast/ui_server.py @@ -77,7 +77,7 @@ def read_registry(): # For all other paths (such as paths that would otherwise be handled by react router), pass to React @app.api_route("/p/{path_name:path}", methods=["GET"]) def catch_all(): - filename = str(ui_dir) + "/index.html" + filename = ui_dir.joinpath("index.html") with open(filename) as f: content = f.read()