From 6637d58096d3d54568f9006597993183ed3bb239 Mon Sep 17 00:00:00 2001 From: Henry Taeschner Date: Fri, 5 Jan 2024 13:54:24 +0100 Subject: [PATCH] fix: helm configuration, changed role names and set default port to 4200 --- angular.json | 4 ++-- helm/Chart.yaml | 2 +- helm/microfrontend.json | 8 ++++---- helm/permissions.csv | 2 +- helm/values.yaml | 22 +++++++++++++++------- src/app/shared/shared.module.ts | 2 +- 6 files changed, 24 insertions(+), 16 deletions(-) diff --git a/angular.json b/angular.json index 44f0b7c..f165add 100644 --- a/angular.json +++ b/angular.json @@ -77,8 +77,8 @@ "builder": "ngx-build-plus:dev-server", "options": { "browserTarget": "onecx-theme-ui:build", - "port": 5020, - "publicHost": "http://localhost:5020", + "port": 4200, + "publicHost": "http://localhost:4200", "extraWebpackConfig": "webpack.config.js", "proxyConfig": "proxy.conf.js" }, diff --git a/helm/Chart.yaml b/helm/Chart.yaml index 543c61d..d98de57 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: onecx-theme-ui version: 0.0.0 -description: Onecx theme UI. +description: OneCX Theme UI. home: https://github.com/onecx/onecx-theme-ui keywords: - theme diff --git a/helm/microfrontend.json b/helm/microfrontend.json index 27b3fa8..5fe7369 100644 --- a/helm/microfrontend.json +++ b/helm/microfrontend.json @@ -1,5 +1,5 @@ { - "id": "THEME_MFE", + "id": "THEME_UI", {{- if .Values.app.routing.hostName }} "remoteEntry": "https://{{ .Values.app.routing.hostName }}{{ .Values.app.routing.path }}remoteEntry.js", {{- else if .Values.global.hostName }} @@ -11,11 +11,11 @@ {{- else if .Values.global.hostName }} "remoteBaseUrl": "https://{{ .Values.global.hostName }}{{ .Values.app.routing.path }}", {{- end }} - "exposedModule": "./ThemeModule", - "displayName": "ThemeModule", + "exposedModule": "./ThemeMgmtModule", + "displayName": "ThemeMgmtModule", "moduleType": "ANGULAR", "wcTagName": "UPMF", "appVersion": "{{ .Chart.Version }}", - "note": "Theme mgmt module auto import via MF operator", + "note": "Theme Mgmt module auto import via MF operator", "contact": "onecx@1000kit.org" } diff --git a/helm/permissions.csv b/helm/permissions.csv index 385ca74..920d11d 100644 --- a/helm/permissions.csv +++ b/helm/permissions.csv @@ -1,4 +1,4 @@ -PERMISSION NAME;PERMISSION_KEY;portal-mgmt-admin;portal-mgmt-user; +PERMISSION NAME;PERMISSION_KEY;onecx-theme-admin;onecx-theme-user; Theme create;THEME#CREATE;x;; Theme delete;THEME#DELETE;x;; Theme edit;THEME#EDIT;x;; diff --git a/helm/values.yaml b/helm/values.yaml index 32b4cde..8b6806d 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -1,7 +1,7 @@ app: name: ui image: - repository: "onecx/onecx-theme-svc" + repository: 'onecx/onecx-theme-ui' routing: enabled: true operator: @@ -9,18 +9,26 @@ app: enabled: false keycloak: enabled: true - client: "{ \n \"clientId\": \"theme-mgmt-ui\",\n \"enabled\": true,\n \"description\": \"Keycloak client for theme-mgmt-ui\",\n \"redirectUris\": [\"*\"],\n \"webOrigins\": [\"*\"],\n \"publicClient\": true,\n \"protocol\": \"openid-connect\"\n}" + client: |- + { + "clientId": "theme-mgmt-ui", + "enabled": true, + "description": "Keycloak client for theme-mgmt-ui", + "redirectUris": ["*"], + "webOrigins": ["*"], + "publicClient": true, + "protocol": "openid-connect" + } roles: |- [ { - "name": "onecx-portal-admin", - "description": "OneCX portal platform admin" + "name": "onecx-theme-admin", + "description": "OneCX Theme admin" }, { - "name": "onecx-portal-user", - "description": "OneCX portal platform user" + "name": "onecx-theme-user", + "description": "OneCX Theme user" } ] # PIPE Config - diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts index 21338b8..f2846fb 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -48,7 +48,7 @@ export const basePathProvider = (mfeInfo: MfeInfo) => { console.log( 'Base path provider: ' + (mfeInfo ? mfeInfo.remoteBaseUrl + '' + environment.apiPrefix : '' + environment.apiPrefix) ) - return mfeInfo ? mfeInfo.remoteBaseUrl + '/' + environment.apiPrefix : '' + environment.apiPrefix + return mfeInfo ? mfeInfo.remoteBaseUrl + '' + environment.apiPrefix : '' + environment.apiPrefix } export function HttpLoaderFactory(http: HttpClient, mfeInfo: MfeInfo) {