Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: init shell UI #1

Merged
merged 26 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
c4345a3
feat: test
Feb 27, 2024
ae74028
feat: init new shell ui
Feb 27, 2024
1847aa4
fix: delete .vscode
Feb 27, 2024
df3860b
fix: menu module and menu component are displayed in shell
Mar 13, 2024
e97dace
feat: add styles
Mar 13, 2024
8a8c0ab
feat: updated first version bff yaml
Mar 15, 2024
a0a3f61
fix: appInitializeService
Mar 15, 2024
612f153
feat: added remoteComponent loading
SchettlerKoehler Mar 15, 2024
a727fb6
feat: new slot service
SchettlerKoehler Mar 16, 2024
d1cd92a
fix: removed not needed endpoint
SchettlerKoehler Mar 16, 2024
6dede70
fix: fixed imports after moving of SlotComponent
SchettlerKoehler Mar 16, 2024
c273272
feat: SlotService returns config
SchettlerKoehler Mar 16, 2024
558b328
fix: fixed build error
SchettlerKoehler Mar 16, 2024
d7e9cd6
feat: added permissions to slot.component
SchettlerKoehler Mar 17, 2024
707bce7
fix: renamed basePath ot baseUrl
SchettlerKoehler Mar 17, 2024
dc1445f
fix: refactoring
SchettlerKoehler Mar 17, 2024
f186121
fix: refactoring
SchettlerKoehler Mar 17, 2024
165d42d
fix: renaming basePath to baseUrl and displayName to productName in p…
Mar 17, 2024
34e0c80
feat: updated yaml file
Mar 18, 2024
536d427
feat: use ocx-portal-viewport of shell core
Mar 18, 2024
5385f95
fix: fixed name of AngularRemoteComponentsModule
SchettlerKoehler Mar 18, 2024
4a141d9
feat: add error-page and some minor fixes
Mar 20, 2024
a07ceaf
feat: use permissionsCacheService, some changes in yaml
Mar 22, 2024
7466e68
feat: keycloak, new yaml, home page comoponent for fallback
Mar 28, 2024
f285b91
feat: parse theme properties, bff fixes
Apr 3, 2024
9c8c790
feat: update libs and chart
Apr 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
47 changes: 47 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"root": true,
"ignorePatterns": ["!**/*"],
"plugins": ["@nx"],
"overrides": [
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nx/typescript"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nx/javascript"],
"rules": {}
},
{
"files": ["*.ts"],
"extends": [
"plugin:@nx/angular",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "ocx-shell",
"style": "camelCase"
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "ocx-shell",
"style": "kebab-case"
}
]
}
},
{
"files": ["*.html"],
"extends": ["plugin:@nx/angular-template"],
"rules": {}
}
]
}
42 changes: 42 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
dist
tmp
/out-tsc

# dependencies
node_modules

# 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

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

# System Files
.DS_Store
Thumbs.db

.nx/cache
.angular
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Add files here to ignore them from prettier formatting
/dist
/coverage
/.nx/cache
.angular
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"singleQuote": true
}
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM ghcr.io/onecx/docker-spa-base:1.4.0

# Copy nginx configuration
COPY nginx/locations.conf $DIR_LOCATION/locations.conf
# Copy application build
COPY dist/onecx-shell-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-shell-bff:8080/
ENV APP_BASE_HREF /newShell/

RUN chmod 775 -R "$DIR_HTML"/assets
USER 1001
71 changes: 69 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,69 @@
# onecx-shell-ui
OneCx shell UI
# Shell

<a alt="Nx logo" href="https://nx.dev" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.png" width="45"></a>

✨ **This workspace has been generated by [Nx, Smart Monorepos · Fast CI.](https://nx.dev)** ✨


## Start the app

To start the development server run `nx serve shell`. Open your browser and navigate to http://localhost:4200/. Happy coding!


## Generate code

If you happen to use Nx plugins, you can leverage code generators that might come with it.

Run `nx list` to get a list of available plugins and whether they have generators. Then run `nx list <plugin-name>` to see what generators are available.

Learn more about [Nx generators on the docs](https://nx.dev/plugin-features/use-code-generators).

## Running tasks

To execute tasks with Nx use the following syntax:

```
nx <target> <project> <...options>
```

You can also run multiple targets:

```
nx run-many -t <target1> <target2>
```

..or add `-p` to filter specific projects

```
nx run-many -t <target1> <target2> -p <proj1> <proj2>
```

Targets can be defined in the `package.json` or `projects.json`. Learn more [in the docs](https://nx.dev/core-features/run-tasks).

## Want better Editor Integration?

Have a look at the [Nx Console extensions](https://nx.dev/nx-console). It provides autocomplete support, a UI for exploring and running tasks & generators, and more! Available for VSCode, IntelliJ and comes with a LSP for Vim users.

## Ready to deploy?

Just run `nx build demoapp` to build the application. The build artifacts will be stored in the `dist/` directory, ready to be deployed.

## Set up CI!

Nx comes with local caching already built-in (check your `nx.json`). On CI you might want to go a step further.

- [Set up remote caching](https://nx.dev/core-features/share-your-cache)
- [Set up task distribution across multiple machines](https://nx.dev/nx-cloud/features/distribute-task-execution)
- [Learn more how to setup CI](https://nx.dev/recipes/ci)

## Explore the Project Graph
Run `nx graph` to show the graph of the workspace.
It will show tasks that you can run with Nx.

- [Learn more about Exploring the Project Graph](https://nx.dev/core-features/explore-graph)

## Connect with us!

- [Join the community](https://nx.dev/community)
- [Subscribe to the Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Follow us on Twitter](https://twitter.com/nxdevtools)
4 changes: 4 additions & 0 deletions apigen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
serviceSuffix: BffService
stringEnums: true
providedIn: 'any'
enumPropertyNaming: 'original'
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-shell-ui
version: 0.0.0
description: OneCX Shell UI.
home: https://github.com/onecx/onecx-shell-ui
keywords:
- shell
sources:
- https://github.com/onecx/onecx-shell-ui
maintainers:
- name: OneCX Developer Team
email: [email protected]
dependencies:
- name: helm-angular-app
version: ^0
repository: oci://ghcr.io/onecx/charts
alias: app
18 changes: 18 additions & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
app:
name: ui
image:
repository: 'onecx/onecx-shell-ui'
routing:
enabled: true
path: /newShell/

operator:
# Keycloak
keycloak:
client:
enabled: true
spec:
kcConfig:
clientId: "onecx-shell-ui"

# PIPE Config
26 changes: 26 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/* eslint-disable */
export default {
displayName: 'shell',
preset: './jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
coverageDirectory: './coverage/shell',
transform: {
'^.+\\.(ts|mjs|js|html)$': [
'jest-preset-angular',
{
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
],
},
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
snapshotSerializers: [
'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot',
'jest-preset-angular/build/serializers/html-comment',
],
testMatch: [
'<rootDir>/src/**/__tests__/**/*.[jt]s?(x)',
'<rootDir>/src/**/*(*.)@(spec|test).[jt]s?(x)',
],
};
3 changes: 3 additions & 0 deletions jest.preset.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const nxPreset = require('@nx/jest/preset').default;

module.exports = { ...nxPreset };
5 changes: 5 additions & 0 deletions nginx/locations.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
location @@APP_BASE_HREFshell-bff {
proxy_pass @@BFF_URL;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}
64 changes: 64 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"targetDefaults": {
"build": {
"cache": true,
"dependsOn": ["^build"],
"inputs": ["production", "^production"]
},
"lint": {
"cache": true
},
"@angular-devkit/build-angular:browser": {
"cache": true,
"dependsOn": ["^build"],
"inputs": ["production", "^production"]
},
"@nx/eslint:lint": {
"cache": true,
"inputs": [
"default",
"{workspaceRoot}/.eslintrc.json",
"{workspaceRoot}/.eslintignore",
"{workspaceRoot}/eslint.config.js"
]
},
"@nx/jest:jest": {
"cache": true,
"inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"],
"options": {
"passWithNoTests": true
},
"configurations": {
"ci": {
"ci": true,
"codeCoverage": true
}
}
}
},
"namedInputs": {
"default": ["{projectRoot}/**/*", "sharedGlobals"],
"production": [
"default",
"!{projectRoot}/.eslintrc.json",
"!{projectRoot}/eslint.config.js",
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
"!{projectRoot}/tsconfig.spec.json",
"!{projectRoot}/jest.config.[jt]s",
"!{projectRoot}/src/test-setup.[jt]s",
"!{projectRoot}/test-setup.[jt]s"
],
"sharedGlobals": []
},
"generators": {
"@nx/angular:application": {
"e2eTestRunner": "none",
"linter": "eslint",
"style": "scss",
"unitTestRunner": "jest"
}
},
"defaultProject": "shell",
"nxCloudAccessToken": "NzFjY2NlNjItZGM4My00MDdjLTg2NWQtM2M3NGFjNWFlOWNifHJlYWQtd3JpdGU="
}
7 changes: 7 additions & 0 deletions openapitools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json",
"spaces": 2,
"generator-cli": {
"version": "7.2.0"
}
}
Loading