Skip to content

Commit

Permalink
Remove /webapp prefix from new UI (#44227)
Browse files Browse the repository at this point in the history
  • Loading branch information
jedcunningham authored Nov 21, 2024
1 parent a924284 commit 82e0157
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion airflow/api_fastapi/core_api/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def init_views(app: FastAPI) -> None:
name="webapp_static_folder",
)

@app.get("/webapp/{rest_of_path:path}", response_class=HTMLResponse, include_in_schema=False)
@app.get("/{rest_of_path:path}", response_class=HTMLResponse, include_in_schema=False)
def webapp(request: Request, rest_of_path: str):
return templates.TemplateResponse("/index.html", {"request": request}, media_type="text/html")

Expand Down
2 changes: 1 addition & 1 deletion airflow/ui/src/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@ export const router = createBrowserRouter(
},
],
{
basename: "/webapp",
basename: "/",
},
);
4 changes: 1 addition & 3 deletions airflow/ui/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ export default defineConfig({
{
name: "transform-url-src",
transformIndexHtml: (html) =>
html
.replace(`src="/assets/`, `src="/static/assets/`)
.replace(`href="/`, `href="/webapp/`),
html.replace(`src="/assets/`, `src="/static/assets/`),
},
],
resolve: { alias: { openapi: "/openapi-gen", src: "/src" } },
Expand Down
2 changes: 1 addition & 1 deletion airflow/www/templates/airflow/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
{% if auth_manager.is_logged_in() %}
{% call show_message(category='info', dismissible=true) %}
<span>We have a new UI for Airflow 3.0</span>
<a href="http://localhost:29091/webapp">Check it out now!</a>
<a href="http://localhost:29091/">Check it out now!</a>
{% endcall %}
{% endif %}
{% endblock %}
Expand Down

0 comments on commit 82e0157

Please sign in to comment.