This directory contains the web UI for ORT Server.
The UI is a React application and uses Vite as the build tool and pnpm as the package manager.
The UI expects ORT Server to be running locally. In addition, the following Gradle task must be executed to generate the OpenAPI specification locally:
./gradlew :core:generateOpenApiSpec
Here are the instructions to start the UI in local development mode:
- Go to the
ui
folder. - Run
pnpm install
followed bypnpm dev
. - Ctrl-click the shown
http://localhost:5173/
link. - Log in via Keycloak (use "admin" / "admin" as username / password).
As a precondition for generating the query client the OpenAPI specification must be generated as documented in Development.
The query client is generated automatically as part of pnpm build
.
To generate it manually, for example for testing local changes to the API, run pnpm generate:api
.
The Docker image for the UI is built as part of the buildAllImages
Gradle task.
To build it manually, run the following steps from the root of the repository:
- Build the OpenAPI specification:
./gradlew :core:generateOpenApiSpec
- Build the Docker image:
docker build -t ort-server-ui -f ui/docker/UI.Dockerfile ui
To run the Docker image, use the following command:
docker run --rm -p 8082:80 ort-server-ui
The Docker image can be configured by the following environment variables:
Variable | Default | Description |
---|---|---|
UI_API_URL |
http://localhost:8080 |
The URL of the ORT Server API. |
UI_URL |
http://localhost:8082 |
The URL of the UI. |
UI_BASEPATH |
/ |
The base path of the UI. |
UI_AUTHORITY |
http://localhost:8081/realms/master |
The URL of the Keycloak realm. |
UI_CLIENT_ID |
ort-server-ui |
The client ID of the UI in Keycloak. |
UI_CLIENT_ID_SERVER |
ort-server |
The client ID of the API in Keycloak. |