Skip to content

Commit

Permalink
Merge branch 'development' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderWollbrink authored Nov 9, 2023
2 parents 0ab8d48 + 8b4f974 commit eea3add
Show file tree
Hide file tree
Showing 42 changed files with 16,949 additions and 31,310 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
FROM node:lts-alpine3.16 as build
WORKDIR /usr/src/app
COPY . .
RUN npm install -w=aas-server -w=aas-portal
RUN apk add g++ make py3-pip
RUN npm install
RUN node create-app-info.js
RUN npm run build

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.aas-portal
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
FROM node:lts-alpine3.16 as build
WORKDIR /usr/src/app
COPY . .
RUN npm ci -w=aas-portal
RUN npm install
RUN npm run aas-portal:build

FROM nginx:latest as aas-portal
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.aas-server
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
FROM node:lts-alpine3.16 as build
WORKDIR /usr/src/app
COPY . .
RUN npm install -w=aas-server
RUN npm install
RUN node create-app-info.js
RUN npm run aas-server:build

Expand Down
4 changes: 3 additions & 1 deletion docs/source/gettingstarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ or the name (idShort) of the AAS
http://localhost/?id=Bosch_NexoPistolGripNutrunner

## AASServer
ToDo.
AASServer is a Node.js server application based on the Express framework. The main feature of AASServer is the provision of Asset Administration Shells from different data sources (AASX server, OPC UA server, file system). AASServer can read Asset Administration Shells in JSON, XML and OPC UA format. An Asset Administration Shell is always provided to a web client (AASPortal) in JSON version 3 format.

AASServer provides a user management. Authentication of a user is based on Json Web Token.

## Environment Variables
| Name | | default |
Expand Down
45,783 changes: 16,279 additions & 29,504 deletions package-lock.json

Large diffs are not rendered by default.

101 changes: 97 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aas-portal-project",
"version": "1.1.0-staging.1",
"version": "3.0.5",
"description": "Web-based visualization and control of asset administration shells.",
"type": "module",
"scripts": {
Expand Down Expand Up @@ -34,9 +34,102 @@
"./projects/aas-lib",
"./projects/aas-portal"
],
"dependencies": {
"@angular/animations": "^16.2.9",
"@angular/common": "^16.2.9",
"@angular/compiler": "^16.2.9",
"@angular/core": "^16.2.9",
"@angular/forms": "^16.2.9",
"@angular/localize": "^16.2.9",
"@angular/platform-browser": "^16.2.9",
"@angular/platform-browser-dynamic": "^16.2.9",
"@angular/router": "^16.2.9",
"@babel/polyfill": "^7.4.4",
"@ng-bootstrap/ng-bootstrap": "^15.1.1",
"@ngrx/effects": "^16.3.0",
"@ngrx/store": "^16.3.0",
"@ngx-translate/core": "^15.0.0",
"@ngx-translate/http-loader": "^8.0.0",
"@popperjs/core": "^2.11.8",
"@xmldom/xmldom": "^0.8.10",
"bcryptjs": "^2.4.3",
"bootstrap": "^5.3.2",
"bootstrap-icons": "^1.11.1",
"chart.js": "^4.4.0",
"cors": "^2.8.5",
"express": "^4.18.2",
"form-data": "^4.0.0",
"jimp": "^0.22.10",
"jsonwebtoken": "^9.0.2",
"jszip": "^3.10.1",
"jwt-decode": "^3.1.2",
"lodash-es": "^4.17.21",
"mongoose": "^7.6.2",
"morgan": "^1.10.0",
"multer": "^1.4.5-lts.1",
"nodemailer": "^6.9.6",
"node-opcua": "^2.115.0",
"node-opcua-client-crawler": "^2.115.0",
"owncloud-sdk": "^3.1.0-alpha.9",
"reflect-metadata": "^0.1.13",
"rxjs": "~7.8.1",
"swagger-ui-express": "^5.0.0",
"tslib": "^2.6.2",
"tsoa": "^5.1.1",
"tsyringe": "^4.8.0",
"uuid": "^8.3.2",
"winston": "^3.11.0",
"winston-daily-rotate-file": "^4.7.1",
"ws": "^8.14.2",
"xpath": "^0.0.33",
"zone.js": "~0.13.1"
},
"devDependencies": {
"@angular/cli": "^16.2.6",
"@angular/compiler-cli": "^16.2.9",
"@angular-devkit/build-angular": "^16.2.6",
"@angular-eslint/builder": "16.2.0",
"@angular-eslint/eslint-plugin": "16.2.0",
"@angular-eslint/eslint-plugin-template": "16.2.0",
"@angular-eslint/schematics": "16.2.0",
"@angular-eslint/template-parser": "16.2.0",
"@babel/plugin-syntax-import-attributes": "^7.22.5",
"@semantic-release/git": "^10.0.1",
"@semantic-release/gitlab": "^12.0.5"
"@jest/globals": "^29.7.0",
"@ngrx/eslint-plugin": "^16.3.0",
"@types/bcryptjs": "^2.4.4",
"@types/bootstrap": "^5.2.7",
"@types/cors": "^2.8.14",
"@types/express": "^4.17.19",
"@types/jasmine": "^4.3.5",
"@types/jquery": "^3.5.22",
"@types/jsonwebtoken": "^9.0.3",
"@types/lodash-es": "^4.17.9",
"@types/morgan": "^1.9.6",
"@types/multer": "^1.4.8",
"@types/node": "^18.16.0",
"@types/nodemailer": "^6.4.11",
"@types/supertest": "^2.0.14",
"@types/swagger-ui-express": "^4.1.4",
"@types/uuid": "^8.3.4",
"@types/ws": "^8.5.7",
"@typescript-eslint/eslint-plugin": "^6.7.5",
"@typescript-eslint/parser": "^6.7.5",
"babel-plugin-transform-import-meta": "^2.2.1",
"esbuild": "^0.18.19",
"eslint": "^8.51.0",
"jasmine-core": "^5.1.1",
"jest": "^29.7.0",
"karma": "^6.4.2",
"karma-chrome-launcher": "^3.2.0",
"karma-coverage": "^2.2.1",
"karma-jasmine": "^5.1.0",
"karma-jasmine-html-reporter": "^2.1.0",
"karma-junit-reporter": "^2.0.1",
"ng-packagr": "^16.2.3",
"rimraf": "^5.0.5",
"supertest": "^6.3.3",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1",
"typescript": "5.0.*"
}
}
}
28 changes: 0 additions & 28 deletions projects/aas-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,5 @@
"tsc": "rimraf build && tsc -p tsconfig.json",
"lint": "ng lint aas-lib",
"format": "ng lint aas-lib --fix"
},
"peerDependencies": {
"@angular/animations": "^16.1.8",
"@angular/common": "^16.1.8",
"@angular/compiler": "^16.1.8",
"@angular/core": "^16.1.8",
"@angular/forms": "^16.1.8",
"@angular/localize": "^16.1.8",
"@angular/platform-browser": "^16.1.8",
"@angular/platform-browser-dynamic": "^16.1.8",
"@angular/router": "^16.1.8",
"@ng-bootstrap/ng-bootstrap": "^15.1.0",
"@ngrx/effects": "^16.1.0",
"@ngrx/store": "^16.1.0",
"@ngx-translate/core": "^15.0.0",
"@ngx-translate/http-loader": "^8.0.0",
"@popperjs/core": "^2.11.8",
"@xmldom/xmldom": "^0.8.10",
"aas-lib": "3.0.0",
"bootstrap": "^5.3.1",
"bootstrap-icons": "^1.10.5",
"chart.js": "^4.3.3",
"common": "3.0.0",
"jwt-decode": "^3.1.2",
"lodash-es": "^4.17.21",
"rxjs": "~7.8.1",
"uuid": "^8.3.2",
"zone.js": "~0.13.1"
}
}
3 changes: 0 additions & 3 deletions projects/aas-lib/src/lib/aas-lib.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { StoreModule } from '@ngrx/store';
import { FormsModule } from '@angular/forms';

import { ToolbarComponent } from './toolbar/toolbar.component';
import { NotifyComponent } from './notify/notify.component';
import { LocalizeComponent } from './localize/localize.component';
import { LoginFormComponent } from './auth/login-form/login-form.component';
Expand Down Expand Up @@ -42,7 +41,6 @@ import { SecuredImageComponent } from './secured-image/secured-image.component';
@NgModule({
declarations: [
NotifyComponent,
ToolbarComponent,
LocalizeComponent,
LoginFormComponent,
RegisterFormComponent,
Expand Down Expand Up @@ -75,7 +73,6 @@ import { SecuredImageComponent } from './secured-image/secured-image.component';
],
exports: [
NotifyComponent,
ToolbarComponent,
LocalizeComponent,
LoginFormComponent,
RegisterFormComponent,
Expand Down
2 changes: 1 addition & 1 deletion projects/aas-lib/src/lib/aas-table/aas-table.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export class AASTableComponent implements AASTable, OnChanges, OnDestroy {
}

this.clipboard.set('AASQuery', query);
this.router.navigateByUrl('/aas?format=AASQuery');
this.router.navigateByUrl('/aas?format=AASQuery', { skipLocationChange: true });
}

public onSort({ column, direction }: SortEvent) {
Expand Down
6 changes: 3 additions & 3 deletions projects/aas-lib/src/lib/aas-tree/aas-tree.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ export class AASTreeComponent implements AASTree, OnInit, OnChanges, OnDestroy {
};

this.clipboard.set('ViewQuery', { descriptor } as ViewQuery);
this.router.navigateByUrl('/view?format=ViewQuery');
this.router.navigateByUrl('/view?format=ViewQuery', { skipLocationChange: true });
}
}
}
Expand Down Expand Up @@ -351,15 +351,15 @@ export class AASTreeComponent implements AASTree, OnInit, OnChanges, OnDestroy {
const entity = element as aas.Entity;
if (entity && entity.globalAssetId) {
this.clipboard.set('AASQuery', { id: entity.globalAssetId } as AASQuery);
this.router.navigateByUrl('/aas?format=AASQuery');
this.router.navigateByUrl('/aas?format=AASQuery', { skipLocationChange: true });
}
}

private openReference(element: aas.Referable): void {
const referenceElement = element as aas.ReferenceElement;
if (referenceElement && referenceElement.value) {
this.clipboard.set('AASQuery', { id: referenceElement.value.keys[0].value } as AASQuery);
this.router.navigateByUrl('/aas?format=AASQuery');
this.router.navigateByUrl('/aas?format=AASQuery', { skipLocationChange: true });
}
}

Expand Down
31 changes: 13 additions & 18 deletions projects/aas-lib/src/lib/download.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,25 +50,20 @@ export class DownloadService {
* @param id The AAS identifier.
* @param name The file name.
*/
public downloadDocumentAsync(url: string, id: string, name: string): Promise<void> {
return new Promise<void>((resolve, reject) => {
this.http.get(
`/api/v1/containers/${encodeBase64Url(url)}/documents/${encodeBase64Url(id)}`,
{
responseType: 'blob'
}).pipe(map(blob => {
const a = document.createElement('a');
a.href = URL.createObjectURL(blob);
a.setAttribute('download', name);
a.click();
URL.revokeObjectURL(a.href);
})).subscribe({
error: (error) => reject(error),
complete: () => resolve()
});
});
public downloadDocument(url: string, id: string, name: string): Observable<void> {
return this.http.get(
`/api/v1/containers/${encodeBase64Url(url)}/documents/${encodeBase64Url(id)}`,
{
responseType: 'blob'
}).pipe(map(blob => {
const a = document.createElement('a');
a.href = URL.createObjectURL(blob);
a.setAttribute('download', name);
a.click();
URL.revokeObjectURL(a.href);
}));
}

/**
* Uploads the specified aasx file.
* @param file A file.
Expand Down
109 changes: 0 additions & 109 deletions projects/aas-lib/src/lib/toolbar/toolbar.component.html

This file was deleted.

Loading

0 comments on commit eea3add

Please sign in to comment.