Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/geti-inspect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ jobs:

- name: Build OpenAPI type definitions
working-directory: "app/ui"
run: npm run build:api
run: npm run build:api:types

- name: Prettier
working-directory: "app/ui"
Expand Down Expand Up @@ -221,7 +221,7 @@ jobs:

- name: Build OpenAPI type definitions
working-directory: "app/ui"
run: npm run build:api
run: npm run build:api:types

- name: UI Unit tests
working-directory: "app/ui"
Expand Down Expand Up @@ -274,7 +274,7 @@ jobs:

- name: Build OpenAPI type definitions
working-directory: "app/ui"
run: npm run build:api
run: npm run build:api:types

- name: Run Playwright tests
working-directory: "app/ui"
Expand Down
6 changes: 3 additions & 3 deletions app/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
},
"scripts": {
"build": "rsbuild build",
"build:api": "npx openapi-typescript ./src/api/openapi-spec.json -o ./src/api/openapi-spec.d.ts --root-types && prettier --write src/api/openapi-spec.d.ts",
"build:api:download": "curl -o ./src/api/openapi-spec.json http://localhost:7860/api/openapi.json && prettier --write src/api/openapi-spec.json",
"update-spec": "npm run build:api:download && npm run build:api",
"build:api:types": "npx openapi-typescript ./src/api/openapi-spec.json -o ./src/api/openapi-spec.d.ts --root-types && prettier --write src/api/openapi-spec.d.ts",
"build:api:download": "curl -o ./src/api/openapi-spec.json http://localhost:8000/api/openapi.json && prettier --write src/api/openapi-spec.json",
"build:api": "npm run build:api:download && npm run build:api:types",
"clone-geti-ui-packages": "npx degit git@github.com:open-edge-platform/geti.git/web_ui/packages/config packages/config --force && npx degit git@github.com:open-edge-platform/geti.git/web_ui/packages/ui packages/ui --force",
"cyclic-deps-check": "npx madge --circular src/**/*.ts*",
"start": "rsbuild dev",
Expand Down
6 changes: 3 additions & 3 deletions app/ui/rsbuild.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ export default defineConfig({
define: {
...publicVars,
'import.meta.env.PUBLIC_API_BASE_URL':
publicVars['import.meta.env.PUBLIC_API_BASE_URL'] ?? '"http://localhost:7860"',
publicVars['import.meta.env.PUBLIC_API_BASE_URL'] ?? '"http://localhost:8000"',
'process.env.PUBLIC_API_BASE_URL':
publicVars['process.env.PUBLIC_API_BASE_URL'] ?? '"http://localhost:7860"',
publicVars['process.env.PUBLIC_API_BASE_URL'] ?? '"http://localhost:8000"',
// Needed to prevent an issue with spectrum's picker
// eslint-disable-next-line max-len
// https://github.com/adobe/react-spectrum/blob/6173beb4dad153aef74fc81575fd97f8afcf6cb3/packages/%40react-spectrum/overlays/src/OpenTransition.tsx#L40
Expand All @@ -45,7 +45,7 @@ export default defineConfig({
server: {
proxy: {
'/api': {
target: 'http://localhost:7860',
target: 'http://localhost:8000',
changeOrigin: true,
ws: true,
//pathRewrite: { '^/api': '' }, // strip the /api prefix
Expand Down
3 changes: 1 addition & 2 deletions app/ui/src/api/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ const handlers = await fromOpenApi(JSON.stringify(spec).replace(/}:/g, '}//:'));

const getOpenApiHttp = (): OpenApiHttpHandlers<paths> => {
const http = createOpenApiHttp<paths>({
baseUrl: 'http://localhost:7860',
//baseUrl: process.env.PUBLIC_API_BASE_URL ?? 'http://localhost:7860',
baseUrl: process.env.PUBLIC_API_BASE_URL ?? 'http://localhost:8000',
});

return {
Expand Down
2 changes: 1 addition & 1 deletion app/ui/src/setup-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { afterAll, afterEach, beforeAll } from 'vitest';

import { server } from './msw-node-setup';

process.env.PUBLIC_API_BASE_URL = 'http://localhost:7860';
process.env.PUBLIC_API_BASE_URL = 'http://localhost:8000';

beforeAll(() => {
server.listen({ onUnhandledRequest: 'bypass' });
Expand Down
Loading