Skip to content

Commit

Permalink
Add console base path
Browse files Browse the repository at this point in the history
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
  • Loading branch information
torchiaf committed May 19, 2024
1 parent 4d51617 commit 29b485d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
13 changes: 12 additions & 1 deletion helm-charts/code-editor/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ spec:
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: strip-prefix-console
spec:
stripPrefix:
prefixes:
- "/code-editor/console"
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: headers-manage
spec:
Expand Down Expand Up @@ -104,9 +113,11 @@ spec:
- websecure
{{- end }}
routes:
- match: Host(`{{ $.Values.domain }}`)
- match: Host(`{{ $.Values.domain }}`) && PathPrefix(`/code-editor/console`)
kind: Rule
services:
- name: {{ .Release.Name }}-console
port: 8083
middlewares:
- name: strip-prefix-console
{{- end }}
11 changes: 9 additions & 2 deletions src/console/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"baseHref": "/code-editor/console/",
"outputPath": "dist/console",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
{ "glob": "**/*", "input": "src/assets", "output": "code-editor/console/assets" }
],
"styles": [
"./node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css",
Expand All @@ -37,6 +38,11 @@
},
"configurations": {
"production": {
"baseHref": "/code-editor/console/",
"assets": [
"src/favicon.ico",
{ "glob": "**/*", "input": "src/assets", "output": "code-editor/console/assets" }
],
"budgets": [
{
"type": "initial",
Expand All @@ -63,7 +69,8 @@
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
"namedChunks": true,
"baseHref": "/"
},
"local": {
"buildOptimizer": false,
Expand Down
2 changes: 1 addition & 1 deletion src/console/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import { ProfileDialogComponent } from './components/dialogs/profile-dialog/prof

// Required during AOT compilation
export function httpTranslateLoaderFactory(http: HttpClient) {
return new TranslateHttpLoader(http);
return new TranslateHttpLoader(http, './code-editor/console/assets/i18n/');
}

@NgModule({
Expand Down

0 comments on commit 29b485d

Please sign in to comment.