Skip to content
This repository has been archived by the owner on Oct 6, 2023. It is now read-only.

Commit

Permalink
Merge pull request #127 from SoftwareAG/pki-intergration-frontend
Browse files Browse the repository at this point in the history
#121: Implement the UI to connect manage the certificate of the PKI
  • Loading branch information
kreinhar committed Jul 5, 2022
2 parents 7b10891 + 3acc002 commit 4d22864
Show file tree
Hide file tree
Showing 37 changed files with 45,795 additions and 0 deletions.
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions pkiintergration-fe/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"parser": "@typescript-eslint/parser", // Specifies the ESLint parser
"extends": [
"plugin:@typescript-eslint/recommended", // Uses the recommended rules from the @typescript-eslint/eslint-plugin
"eslint-config-prettier", // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
"plugin:prettier/recommended" // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
],
"parserOptions": {
"ecmaVersion": 2020, // Allows for the parsing of modern ECMAScript features
"sourceType": "module" // Allows for the use of imports
},
"rules": {
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
"@typescript-eslint/ban-ts-comment": "warn",
"no-unused-vars": ["warn", { "vars": "all", "args": "none", "ignoreRestSiblings": false }],
"explicit-module-boundary-types": "off"
}
}
15 changes: 15 additions & 0 deletions pkiintergration-fe/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
dist/
.idea
coverage

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Dependency directories
node_modules/
jspm_packages/
13 changes: 13 additions & 0 deletions pkiintergration-fe/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"tabWidth": 2,
"singleQuote": true,
"trailingComma": "none",
"semi": true,
"printWidth": 120,
"useTabs": false,
"bracketSpacing": true,
"editor.formatOnSave": true,
"[typescript]": {
"editor.formatOnSave": true
}
}
36 changes: 36 additions & 0 deletions pkiintergration-fe/angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"pki-intergration": {
"projectType": "application",
"schematics": {},
"root": "./",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"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": [],
"styles": [],
"scripts": []
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": ["tsconfig.app.json", "tsconfig.spec.json", "e2e/tsconfig.json"],
"exclude": ["**/node_modules/**"]
}
}
}
}
},
"defaultProject": "pki-intergration"
}
66 changes: 66 additions & 0 deletions pkiintergration-fe/app.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import { NgModule } from '@angular/core';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { RouterModule as NgRouterModule } from '@angular/router';
import { UpgradeModule as NgUpgradeModule } from '@angular/upgrade/static';
import { CoreModule, RouterModule } from '@c8y/ngx-components';
import { AssetsNavigatorModule } from '@c8y/ngx-components/assets-navigator';
import { BinaryFileDownloadModule } from '@c8y/ngx-components/binary-file-download';
import { ChildDevicesModule } from '@c8y/ngx-components/child-devices';
import { DeviceInfoDashboardModule, DeviceManagementHomeDashboardModule } from '@c8y/ngx-components/context-dashboard';
import { DeviceGridExampleModule } from '@c8y/ngx-components/device-grid-example';
import { DeviceProfileModule } from '@c8y/ngx-components/device-profile';
import { DiagnosticsModule } from '@c8y/ngx-components/diagnostics';
import { OperationsModule } from '@c8y/ngx-components/operations';
import { ImpactProtocolModule } from '@c8y/ngx-components/protocol-impact';
import { LpwanProtocolModule } from '@c8y/ngx-components/protocol-lpwan';
import { OpcuaProtocolModule } from '@c8y/ngx-components/protocol-opcua';
import { RepositoryModule } from '@c8y/ngx-components/repository';
import { SearchModule } from '@c8y/ngx-components/search';
import { SubAssetsModule } from '@c8y/ngx-components/sub-assets';
import { TrustedCertificatesModule } from '@c8y/ngx-components/trusted-certificates';
import { DashboardUpgradeModule, HybridAppModule, UpgradeModule, UPGRADE_ROUTES } from '@c8y/ngx-components/upgrade';
import { PkiManagedCertificatesModule } from '@modules/pki-managed-certificates/pki-managed-certificates.module';
import { BsModalRef } from 'ngx-bootstrap/modal';
import { HooksModule } from '@modules/hooks/hooks.module';

@NgModule({
imports: [
// Upgrade module must be the first
UpgradeModule,
BrowserAnimationsModule,
RouterModule.forRoot(),
NgRouterModule.forRoot([...UPGRADE_ROUTES], { enableTracing: false, useHash: true }),
CoreModule.forRoot(),
AssetsNavigatorModule.config({
smartGroups: true
}),
OperationsModule,
OpcuaProtocolModule,
ImpactProtocolModule,
TrustedCertificatesModule,
DeviceGridExampleModule,
NgUpgradeModule,
DashboardUpgradeModule,
RepositoryModule,
DeviceProfileModule,
BinaryFileDownloadModule,
SearchModule,
LpwanProtocolModule,
SubAssetsModule,
ChildDevicesModule,
DeviceManagementHomeDashboardModule,
DeviceInfoDashboardModule,
DiagnosticsModule,
PkiManagedCertificatesModule,
HooksModule
],
declarations: [],
entryComponents: [],

providers: [BsModalRef]
})
export class AppModule extends HybridAppModule {
constructor(protected upgrade: NgUpgradeModule) {
super();
}
}
40 changes: 40 additions & 0 deletions pkiintergration-fe/apps/admin/app.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { NgModule } from '@angular/core';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { RouterModule as NgRouterModule } from '@angular/router';
import { UpgradeModule as NgUpgradeModule } from '@angular/upgrade/static';
import { CoreModule, RouterModule } from '@c8y/ngx-components';
import { AppLogsAutoRefreshModule } from '@c8y/ngx-components/app-logs';
import { ConnectivityModule, SimModule } from '@c8y/ngx-components/connectivity';
import { SmsGatewayModule } from '@c8y/ngx-components/sms-gateway';
import { HybridAppModule, UpgradeModule, UPGRADE_ROUTES } from '@c8y/ngx-components/upgrade';
import { BinaryFileDownloadModule } from '@c8y/ngx-components/binary-file-download';
import { DefaultSubscriptionsModule } from '@c8y/ngx-components/default-subscriptions';
import { EcosystemModule } from '@c8y/ngx-components/ecosystem';
import { TenantsModule } from '@c8y/ngx-components/tenants';
import { AuthConfigurationModule } from '@c8y/ngx-components/auth-configuration';

@NgModule({
imports: [
// Upgrade module must be the first
UpgradeModule,
BrowserAnimationsModule,
RouterModule.forRoot(),
NgRouterModule.forRoot([...UPGRADE_ROUTES], { enableTracing: false, useHash: true }),
CoreModule.forRoot(),
NgUpgradeModule,
AppLogsAutoRefreshModule,
SmsGatewayModule,
ConnectivityModule,
SimModule,
BinaryFileDownloadModule,
DefaultSubscriptionsModule,
EcosystemModule,
AuthConfigurationModule,
TenantsModule
]
})
export class AppModule extends HybridAppModule {
constructor(protected upgrade: NgUpgradeModule) {
super();
}
}
17 changes: 17 additions & 0 deletions pkiintergration-fe/apps/admin/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import '../..polyfills';
import './ng1';
import './i18n';

import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app.module';

declare const __MODE__: string;
if (__MODE__ === 'production') {
enableProdMode();
}

export function bootstrap() {
return platformBrowserDynamic()
.bootstrapModule(AppModule).catch((err) => console.log(err));
}
37 changes: 37 additions & 0 deletions pkiintergration-fe/apps/admin/ng1.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import '@c8y/ng1-modules/core';
import '@c8y/ng1-modules/users/cumulocity.json';
import '@c8y/ng1-modules/aclManagement/cumulocity.json';
import '@c8y/ng1-modules/oauth/cumulocity.json';
import '@c8y/ng1-modules/binaryArtefactsManagement/cumulocity.json';
import '@c8y/ng1-modules/smartRules/cumulocity.json';
import '@c8y/ng1-modules/dataPointExplorer/cumulocity.json';
import '@c8y/ng1-modules/deviceSelector/cumulocity.json';
import '@c8y/ng1-modules/tenants/cumulocity.json';
import '@c8y/ng1-modules/tenantApplications/cumulocity.json';
import '@c8y/ng1-modules/tenantStatistics/cumulocity.json';
import '@c8y/ng1-modules/notifications/cumulocity.json';
import '@c8y/ng1-modules/roles/cumulocity.json';
import '@c8y/ng1-modules/userRoles/cumulocity.json';
import '@c8y/ng1-modules/propertiesLibrary/cumulocity.json';
import '@c8y/ng1-modules/platformConfiguration/cumulocity.json';
import '@c8y/ng1-modules/dataBroker/cumulocity.json';
import '@c8y/ng1-modules/tenantPolicies/cumulocity.json';
import '@c8y/ng1-modules/tenantLicenses/cumulocity.json';
import '@c8y/ng1-modules/actilityProviderSettings/cumulocity.json';
import '@c8y/ng1-modules/sigfox-provider-settings/cumulocity.json';
import '@c8y/ng1-modules/enterpriseEdition/cumulocity.json';
import '@c8y/ng1-modules/auth-configuration/cumulocity.json';
import '@c8y/ng1-modules/app-status-ui/cumulocity.json';
import '@c8y/ng1-modules/app-logs/cumulocity.json';
import '@c8y/ng1-modules/administration-config/cumulocity.json';
import '@c8y/ng1-modules/remoteAccess/cumulocity.json';
import '@c8y/ng1-modules/administration-homeAdministration/cumulocity.json';
import '@c8y/ng1-modules/administration-applicationSettings/cumulocity.json';
import '@c8y/ng1-modules/administration-eventProcessing/cumulocity.json';
import '@c8y/ng1-modules/administration-alarmMapping/cumulocity.json';
import '@c8y/ng1-modules/administration-applications/cumulocity.json';
import '@c8y/ng1-modules/administration-statistics/cumulocity.json';
import '@c8y/ng1-modules/administration-retentionRules/cumulocity.json';
import '@c8y/ng1-modules/administration-archivesEditor/cumulocity.json';
import '@c8y/ng1-modules/administration-auditLogs/cumulocity.json';
import '@c8y/ng1-modules/administration-storageLimitEmail/cumulocity.json';
19 changes: 19 additions & 0 deletions pkiintergration-fe/apps/admin/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "pki-admin",
"version": "1.0.0",
"description": "",
"main": "index.js",
"c8y": {
"application": {
"name": "admin",
"contextPath": "pki-admin",
"key": "admin-application-key",
"upgrade": true,
"rightDrawer": true,
"tabsHorizontal": true,
"contentSecurityPolicy": "base-uri 'none'; default-src 'self' 'unsafe-inline' http: https: ws: wss:; connect-src 'self' http: https: ws: wss:; script-src 'self' open.mapquestapi.com *.twitter.com *.twimg.com *.aptrinsic.com 'unsafe-inline' 'unsafe-eval' data:; style-src * 'unsafe-inline' blob:; img-src * data:; font-src * data:; frame-src *; worker-src 'self' blob:;",
"dynamicOptionsUrl": "/apps/public/public-options/options.json"
},
"cli": {}
}
}
66 changes: 66 additions & 0 deletions pkiintergration-fe/apps/devicemanagement/app.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import { NgModule } from '@angular/core';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { RouterModule as NgRouterModule } from '@angular/router';
import { UpgradeModule as NgUpgradeModule } from '@angular/upgrade/static';
import { CoreModule, RouterModule } from '@c8y/ngx-components';
import { AssetsNavigatorModule } from '@c8y/ngx-components/assets-navigator';
import { BinaryFileDownloadModule } from '@c8y/ngx-components/binary-file-download';
import { ChildDevicesModule } from '@c8y/ngx-components/child-devices';
import { DeviceInfoDashboardModule, DeviceManagementHomeDashboardModule } from '@c8y/ngx-components/context-dashboard';
import { DeviceGridExampleModule } from '@c8y/ngx-components/device-grid-example';
import { DeviceProfileModule } from '@c8y/ngx-components/device-profile';
import { DiagnosticsModule } from '@c8y/ngx-components/diagnostics';
import { OperationsModule } from '@c8y/ngx-components/operations';
import { ImpactProtocolModule } from '@c8y/ngx-components/protocol-impact';
import { LpwanProtocolModule } from '@c8y/ngx-components/protocol-lpwan';
import { OpcuaProtocolModule } from '@c8y/ngx-components/protocol-opcua';
import { RepositoryModule } from '@c8y/ngx-components/repository';
import { SearchModule } from '@c8y/ngx-components/search';
import { SubAssetsModule } from '@c8y/ngx-components/sub-assets';
import { TrustedCertificatesModule } from '@c8y/ngx-components/trusted-certificates';
import { DashboardUpgradeModule, HybridAppModule, UpgradeModule, UPGRADE_ROUTES } from '@c8y/ngx-components/upgrade';
import { PkiManagedCertificatesModule } from '@modules/pki-managed-certificates/pki-managed-certificates.module';
import { BsModalRef } from 'ngx-bootstrap/modal';
import { HooksModule } from '@modules/hooks/hooks.module';

@NgModule({
imports: [
// Upgrade module must be the first
UpgradeModule,
BrowserAnimationsModule,
RouterModule.forRoot(),
NgRouterModule.forRoot([...UPGRADE_ROUTES], { enableTracing: false, useHash: true }),
CoreModule.forRoot(),
AssetsNavigatorModule.config({
smartGroups: true
}),
OperationsModule,
OpcuaProtocolModule,
ImpactProtocolModule,
TrustedCertificatesModule,
DeviceGridExampleModule,
NgUpgradeModule,
DashboardUpgradeModule,
RepositoryModule,
DeviceProfileModule,
BinaryFileDownloadModule,
SearchModule,
LpwanProtocolModule,
SubAssetsModule,
ChildDevicesModule,
DeviceManagementHomeDashboardModule,
DeviceInfoDashboardModule,
DiagnosticsModule,
PkiManagedCertificatesModule,
HooksModule
],
declarations: [],
entryComponents: [],

providers: [BsModalRef]
})
export class AppModule extends HybridAppModule {
constructor(protected upgrade: NgUpgradeModule) {
super();
}
}
17 changes: 17 additions & 0 deletions pkiintergration-fe/apps/devicemanagement/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import '../..polyfills';
import './ng1';

import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app.module';

declare const __MODE__: string;
if (__MODE__ === 'production') {
enableProdMode();
}

export function bootstrap() {
platformBrowserDynamic()
.bootstrapModule(AppModule)
.catch((err) => console.log(err));
}
Loading

0 comments on commit 4d22864

Please sign in to comment.