Skip to content

Commit

Permalink
feat: configure theme product
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryT-CG committed Jan 24, 2024
1 parent e239574 commit d527f1f
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ COPY dist/onecx-theme-ui/ $DIR_HTML

# Application environments default values
ENV BFF_URL http://onecx-theme-bff:8080/
ENV APP_BASE_HREF /theme/
ENV APP_BASE_HREF /

RUN chmod 775 -R $DIR_HTML/assets
USER 1001
10 changes: 5 additions & 5 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ app:
repository: 'onecx/onecx-theme-ui'
routing:
enabled: true
path: /ui/mfe/theme/
path: /mfe/theme/

operator:
# Microfrontend
microfrontend:
enabled: true
spec:
exposedModule: "./ThemeMgmtModule"
description: "Theme Mgmt module"
note: "Theme Mgmt UI module auto import via MF operator"
exposedModule: "./OneCXThemeModule"
description: "OneCX Theme Module"
note: "OneCX Theme UI module auto import via MF operator"
# Permission
permission:
enabled: true
Expand All @@ -33,7 +33,7 @@ app:
enabled: true
client: |-
{
"clientId": "theme-mgmt-ui",
"clientId": "onecx-theme-ui",
"enabled": true,
"description": "Keycloak client for theme-mgmt-ui",
"redirectUris": ["*"],
Expand Down
4 changes: 2 additions & 2 deletions src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ describe('AppComponent', () => {
expect(app).toBeTruthy()
})

it(`should have as title 'theme-mgmt'`, () => {
it(`should have as title 'onecx-theme-ui'`, () => {
const fixture = TestBed.createComponent(AppComponent)
const app = fixture.componentInstance
expect(app.title).toEqual('theme-mgmt')
expect(app.title).toEqual('onecx-theme-ui')
})
})
2 changes: 1 addition & 1 deletion src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ import { Component } from '@angular/core'
templateUrl: './app.component.html'
})
export class AppComponent {
title = 'theme-mgmt'
title = 'onecx-theme-ui'
}
2 changes: 1 addition & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function initializer(translate: TranslateService): () => Observable<any> {
@NgModule({
bootstrap: [AppComponent],
declarations: [AppComponent],
imports: [BrowserModule, KeycloakAuthModule, BrowserAnimationsModule, PortalCoreModule.forRoot('theme-mgmt-ui')],
imports: [BrowserModule, KeycloakAuthModule, BrowserAnimationsModule, PortalCoreModule.forRoot('onecx-theme-ui')],
providers: [
DialogService,
{ provide: APP_CONFIG, useValue: environment },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ const routes: Routes = [
providers: [],
schemas: []
})
export class ThemeMgmtModule {
export class OneCXThemeModule {
constructor(@Inject(MFE_INFO) mfeInfo?: MfeInfo) {
console.info('Theme Mgmt Module constructor', mfeInfo)
console.info('OneCX Theme Module constructor', mfeInfo)
}
}
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<title>ThemeMgmt</title>
<title>OneCX Theme</title>
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="#" id="favicon" />
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"inlineSources": true,
"target": "ES2022"
},
"files": ["src/main.ts", "src/polyfills.ts", "src/app/theme-mgmt-remote.module.ts"],
"files": ["src/main.ts", "src/polyfills.ts", "src/app/onecx-theme-remote.module.ts"],
"include": ["src/**/*.ts", "src/**/*.d.ts"],
"exclude": [
"src/test.ts",
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const config = withModuleFederationPlugin({
name: 'onecx-theme-ui',
filename: 'remoteEntry.js',
exposes: {
'./ThemeMgmtModule': 'src/app/theme-mgmt-remote.module.ts'
'./OneCXThemeModule': 'src/app/onecx-theme-remote.module.ts'
},
shared: share({
'@angular/core': { singleton: true, strictVersion: true, requiredVersion: 'auto' },
Expand Down

0 comments on commit d527f1f

Please sign in to comment.