From b0e80ab02371f1bf6a69e9a78760c0514a690058 Mon Sep 17 00:00:00 2001 From: Patrik Korytar Date: Tue, 9 Jun 2026 16:39:38 +0200 Subject: [PATCH 1/4] Remove PNC API mocks client --- src/services/pncApiMocksClient.ts | 33 ------------------------------- src/services/webConfigService.ts | 14 ------------- 2 files changed, 47 deletions(-) delete mode 100644 src/services/pncApiMocksClient.ts diff --git a/src/services/pncApiMocksClient.ts b/src/services/pncApiMocksClient.ts deleted file mode 100644 index eead9b54..00000000 --- a/src/services/pncApiMocksClient.ts +++ /dev/null @@ -1,33 +0,0 @@ -import axios, { AxiosInstance } from 'axios'; - -import * as webConfigService from './webConfigService'; - -/** - * Mocked backend client. Use for WIP features. - */ -class PncApiMocksClient { - private httpClient: AxiosInstance; - - constructor() { - this.httpClient = this.createHttpClient(); - } - - /** - * Creates Axios instance. - * - * @returns Axios instance - */ - private createHttpClient = (): AxiosInstance => - axios.create({ - baseURL: import.meta.env.VITE_PNC_API_MOCKS_URL || webConfigService.getPncApiMocksUrl(), - }); - - // PUBLIC - - /** - * @returns Axios instance - */ - public getHttpClient = (): AxiosInstance => this.httpClient; -} - -export const pncApiMocksClient = new PncApiMocksClient(); diff --git a/src/services/webConfigService.ts b/src/services/webConfigService.ts index 0e1f6aaf..d5712a5f 100644 --- a/src/services/webConfigService.ts +++ b/src/services/webConfigService.ts @@ -122,20 +122,6 @@ export const getUILoggerUrl = (): string => { return uiLoggerUrl; }; -/** - * Return PNC API mocks endpoint URL - */ -export const getPncApiMocksUrl = (): string => { - // TODO: extract URL from config once available - const pncApiMocksUrl = import.meta.env.VITE_PNC_API_MOCKS_URL; - - if (!pncApiMocksUrl) { - throw new Error(`PNC API MOCKS URL does not contain any data: #${pncApiMocksUrl}#`); - } - - return pncApiMocksUrl; -}; - /** * Return Kafka endpoint URL */ From e3831988c6176e314a4fbdaf607449a66415253c Mon Sep 17 00:00:00 2001 From: Patrik Korytar Date: Tue, 9 Jun 2026 16:43:05 +0200 Subject: [PATCH 2/4] Remove link to Old UI --- src/AppLayout.tsx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/AppLayout.tsx b/src/AppLayout.tsx index b0bb289e..8e5951d8 100644 --- a/src/AppLayout.tsx +++ b/src/AppLayout.tsx @@ -109,11 +109,6 @@ export const AppLayout = () => { Administration - {import.meta.env.VITE_PNC_OLD_UI_WEB && ( - - Old UI Version - - )} ); From aa3201e6186becfd9f7bbb84a3f535f1ff787a1b Mon Sep 17 00:00:00 2001 From: Patrik Korytar Date: Tue, 9 Jun 2026 16:45:07 +0200 Subject: [PATCH 3/4] Remove VITE_WEB_UI_URL env var usage --- src/index.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index 3536bdf0..fc471ee1 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -34,10 +34,7 @@ const App = () => { if ( // https://example.com !pncUrl.startsWith(window.location.origin) && - !( - import.meta.env.VITE_WEB_UI_URL === window.location.origin || - import.meta.env.VITE_WEB_SECONDARY_UI_URL === window.location.origin - ) && + window.location.origin !== import.meta.env.VITE_WEB_SECONDARY_UI_URL && // example.com window.location.hostname !== 'localhost' ) { From 3cccfc432010df2a212266740a90c90b6b57c162 Mon Sep 17 00:00:00 2001 From: Patrik Korytar Date: Tue, 9 Jun 2026 16:55:22 +0200 Subject: [PATCH 4/4] Remove Gerrit env var usage --- src/utils/urlParseHelper.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/utils/urlParseHelper.ts b/src/utils/urlParseHelper.ts index 79bb7795..0f386e7e 100644 --- a/src/utils/urlParseHelper.ts +++ b/src/utils/urlParseHelper.ts @@ -3,8 +3,7 @@ interface IScmRepositoryUrl { } const preDefinedScmsPrefix: { [key: string]: string } = { - [import.meta.env.VITE_GERRIT_URL_BASE || 'code']: 'Gerrit', - [import.meta.env.VITE_GERRIT_STAGE_URL_BASE || 'code']: 'Gerrit', + ['code']: 'Gerrit', gitlab: 'GitLab', github: 'GitHub', };