Skip to content

Commit

Permalink
feat: migration
Browse files Browse the repository at this point in the history
  • Loading branch information
andrejpetras committed Dec 20, 2023
1 parent 3235e6c commit 59f3c05
Show file tree
Hide file tree
Showing 201 changed files with 51,538 additions and 1 deletion.
13 changes: 13 additions & 0 deletions .github/changelog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
sections:
- title: Major changes
labels:
- "release/super-feature"
- title: Complete changelog
labels:
- "bug"
- "enhancement"
- "dependencies"
template: |
{{ range $section := .Sections }}{{ if $section.Items }}### {{ $section.GetTitle }}{{ range $item := $section.Items }}
* [#{{ $item.GetID }}]({{ $item.GetURL }}) - {{ $item.GetTitle }}{{ end }}{{ end }}
{{ end }}
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
labels:
- dependencies
15 changes: 15 additions & 0 deletions .github/workflows/build-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Build Feature Branch

on:
workflow_dispatch:
push:
branches:
- '**'
- '!main'
- '!fix/[0-9]+.[0-9]+.x'

jobs:
branch:
uses: onecx/ci-angular/.github/workflows/build-branch.yml@v1
secrets: inherit

9 changes: 9 additions & 0 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Build Pull Request

on:
pull_request:

jobs:
pr:
uses: onecx/ci-angular/.github/workflows/build-pr.yml@v1
secrets: inherit
9 changes: 9 additions & 0 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Build Release
on:
push:
tags:
- '**'
jobs:
release:
uses: onecx/ci-angular/.github/workflows/build-release.yml@v1
secrets: inherit
21 changes: 21 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Build

on:
workflow_dispatch:
push:
branches:
- 'main'
- 'fix/[0-9]+.[0-9]+.x'
paths-ignore:
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
- '*.md'
- '*.adoc'
- '*.txt'
- '.all-contributorsrc'

jobs:
build:
uses: onecx/ci-angular/.github/workflows/build.yml@v1
secrets: inherit
8 changes: 8 additions & 0 deletions .github/workflows/create-fix-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: Create Fix Branch
on:
workflow_dispatch:
jobs:
fix:
uses: onecx/ci-common/.github/workflows/create-fix-branch.yml@v1
secrets: inherit

7 changes: 7 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: Create Release Version
on:
workflow_dispatch:
jobs:
release:
uses: onecx/ci-common/.github/workflows/create-release.yml@v1
secrets: inherit
17 changes: 17 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Update documentation
on:
push:
branches: [ main ]
paths:
- 'docs/**'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Trigger website update
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.CI_PAT }}
repository: onecx/docs
event-type: dispatch-build-website
12 changes: 12 additions & 0 deletions .github/workflows/sonar-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Sonar Pull Request

on:
workflow_run:
workflows: ["Build Pull Request"]
types:
- completed

jobs:
pr:
uses: onecx/ci-angular/.github/workflows/angular-pr-sonar.yml@v1
secrets: inherit
48 changes: 48 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out

# dependencies
/node_modules

# profiling files
chrome-profiler-events*.json
speed-measure-plugin*.json

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# misc
node_modules
/.angular/cache
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# System Files
.DS_Store
Thumbs.db
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Changelog
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM oci://ghcr.io/onecx/docker-spa-base:v1

# Copy applicaiton build
COPY nginx/locations.conf $DIR_LOCATION/locations.conf
# Copy applicaiton build
COPY dist/theme-mgmt-ui/ $DIR_HTML

#Optional extend list of application environments
#ENV CONFIG_ENV_LIST BFF_URL,APP_BASE_HREF
# Application environments default values
ENV BFF_URL http://onecx-theme-bff:8080/
ENV APP_BASE_HREF /theme-mgmt/

RUN chmod 775 -R $DIR_HTML/assets
USER 1001
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# onecx-theme-ui
OneCx Theme UI

126 changes: 126 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"theme-mgmt-ui": {
"projectType": "application",
"schematics": {},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "ngx-build-plus:browser",
"options": {
"preserveSymlinks": true,
"outputPath": "dist/theme-mgmt-ui",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": true,
"assets": [
"src/favicon.ico",
"src/assets",
{
"glob": "**/*",
"input": "node_modules/@onecx/portal-integration-angular/assets/",
"output": "/onecx-portal-lib/assets/"
}
],
"styles": [
"node_modules/primeicons/primeicons.css",
"node_modules/primeng/resources/primeng.min.css",
"node_modules/@onecx/portal-integration-angular/assets/output.css",
"src/styles.scss"
],
"scripts": [],
"extraWebpackConfig": "webpack.config.js",
"commonChunk": false
},
"configurations": {
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
},
"production": {
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "3mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"outputHashing": "all",
"extraWebpackConfig": "webpack.prod.config.js"
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "ngx-build-plus:dev-server",
"options": {
"browserTarget": "theme-mgmt-ui:build",
"port": 4200,
"publicHost": "http://localhost:4200",
"extraWebpackConfig": "webpack.config.js",
"proxyConfig": "proxy.conf.js"
},
"configurations": {
"development": {
"browserTarget": "theme-mgmt-ui:build:development"
},
"production": {
"browserTarget": "theme-mgmt-ui:build:production",
"extraWebpackConfig": "webpack.prod.config.js"
}
}
},
"extract-i18n": {
"builder": "ngx-build-plus:extract-i18n",
"options": {
"browserTarget": "theme-mgmt-ui:build",
"extraWebpackConfig": "webpack.config.js"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["src/styles.scss"],
"scripts": []
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]
}
}
}
}
},
"cli": {
"analytics": false
}
}
4 changes: 4 additions & 0 deletions apigen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
serviceSuffix: APIService
stringEnums: true
useSingleRequestParameter: true
providedIn: 'any'
3 changes: 3 additions & 0 deletions babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"babelrcRoots": ["*"]
}
17 changes: 17 additions & 0 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v2
name: onecx-theme-ui
version: 0.0.0
description: Onecx theme UI.
home: https://github.com/onecx/onecx-theme-ui
keywords:
- theme
sources:
- https://github.com/onecx/onecx-theme-ui
maintainers:
- name: OneCX Developer Team
email: [email protected]
dependencies:
- name: helm-angular-app
version: ^0
repository: oci://ghcr.io/onecx/charts
alias: app
21 changes: 21 additions & 0 deletions helm/microfrontend.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"id": "THEME_MFE",
{{- if .Values.app.routing.hostName }}
"remoteEntry": "https://{{ .Values.app.routing.hostName }}{{ .Values.app.routing.path }}remoteEntry.js",
{{- else if .Values.global.hostName }}
"remoteEntry": "https://{{ .Values.global.hostName }}{{ .Values.app.routing.path }}remoteEntry.js",
{{- end }}
"remoteName": "ThemeModule",
{{- if .Values.app.routing.hostName }}
"remoteBaseUrl": "https://{{ .Values.app.routing.hostName }}{{ .Values.app.routing.path }}",
{{- else if .Values.global.hostName }}
"remoteBaseUrl": "https://{{ .Values.global.hostName }}{{ .Values.app.routing.path }}",
{{- end }}
"exposedModule": "./ThemeModule",
"displayName": "ThemeModule",
"moduleType": "ANGULAR",
"wcTagName": "UPMF",
"appVersion": "{{ .Chart.Version }}",
"note": "Theme mgmt module auto import via MF operator",
"contact": "[email protected]"
}
9 changes: 9 additions & 0 deletions helm/permissions.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
PERMISSION NAME;PERMISSION_KEY;portal-mgmt-admin;portal-mgmt-user;
Theme create;THEME#CREATE;x;;
Theme delete;THEME#DELETE;x;;
Theme edit;THEME#EDIT;x;;
Theme save;THEME#SAVE;x;;
Theme import;THEME#IMPORT;x;;
Theme export;THEME#EXPORT;x;;
Theme detail page;THEME#VIEW;x;x;
Theme search page;THEME#SEARCH;x;x;
Loading

0 comments on commit 59f3c05

Please sign in to comment.