Merge pull request #50 in DEFINMA/definma-ui from proper-indentation to master

* commit '2f6231a6b5c5f0639341c4aac8fefd9bbbc77adf':
  Properly indent all source files
This commit is contained in:
Kai S. K. Engelbart 2021-01-25 12:56:14 +01:00
commit 29b8d3b922
106 changed files with 5170 additions and 5171 deletions

View File

@ -13,7 +13,7 @@ import {DocumentationDatabaseComponent} from './documentation/documentation-data
import {PredictionComponent} from './prediction/prediction.component'; import {PredictionComponent} from './prediction/prediction.component';
import {ModelTemplatesComponent} from './model-templates/model-templates.component'; import {ModelTemplatesComponent} from './model-templates/model-templates.component';
import {DocumentationArchitectureComponent} from import {DocumentationArchitectureComponent} from
'./documentation/documentation-architecture/documentation-architecture.component'; './documentation/documentation-architecture/documentation-architecture.component';
import {MaterialsComponent} from './materials/materials.component'; import {MaterialsComponent} from './materials/materials.component';
import {MaterialComponent} from './material/material.component'; import {MaterialComponent} from './material/material.component';
import {DocumentationModelsComponent} from './documentation/documentation-models/documentation-models.component'; import {DocumentationModelsComponent} from './documentation/documentation-models/documentation-models.component';

View File

@ -55,20 +55,20 @@ export class AppComponent implements OnInit{
bugReportContent() { bugReportContent() {
return `mailto:${this.d.contact.mail}?subject=Bug report&body=Thanks for sending the report! Your bug will be return `mailto:${this.d.contact.mail}?subject=Bug report&body=Thanks for sending the report! Your bug will be
(hopefully) fixed soon. (hopefully) fixed soon.
%0D%0A%0D%0A--- REPORT DATA --- %0D%0A%0D%0A--- REPORT DATA ---
%0D%0A%0D%0ATime: ${new Date().toString()}%0D%0A %0D%0A%0D%0ATime: ${new Date().toString()}%0D%0A
URL: ${this.window.location}%0D%0A%0D%0AWhat did you do?%0D%0A${encodeURIComponent(this.bugReport.do)} URL: ${this.window.location}%0D%0A%0D%0AWhat did you do?%0D%0A${encodeURIComponent(this.bugReport.do)}
%0D%0A%0D%0AWhat did not work?%0D%0A${encodeURIComponent(this.bugReport.work)}%0D%0A%0D%0ABrowser:%0D%0A %0D%0A%0D%0AWhat did not work?%0D%0A${encodeURIComponent(this.bugReport.work)}%0D%0A%0D%0ABrowser:%0D%0A
%0D%0AappCodeName: ${navigator.appCodeName} %0D%0AappCodeName: ${navigator.appCodeName}
%0D%0AappVersion: ${navigator.appVersion} %0D%0AappVersion: ${navigator.appVersion}
%0D%0Alanguage: ${navigator.language} %0D%0Alanguage: ${navigator.language}
%0D%0AonLine: ${navigator.onLine} %0D%0AonLine: ${navigator.onLine}
%0D%0Aoscpu: ${navigator.oscpu} %0D%0Aoscpu: ${navigator.oscpu}
%0D%0Aplatform: ${navigator.platform} %0D%0Aplatform: ${navigator.platform}
%0D%0AuserAgent: ${navigator.userAgent} %0D%0AuserAgent: ${navigator.userAgent}
%0D%0AinnerWidth: ${this.window.innerWidth} %0D%0AinnerWidth: ${this.window.innerWidth}
%0D%0AinnerHeight: ${this.window.innerHeight}`; %0D%0AinnerHeight: ${this.window.innerHeight}`;
} }
closeBugReport(close) { closeBugReport(close) {

View File

@ -27,13 +27,13 @@ import { SettingsComponent } from './settings/settings.component';
import { UsersComponent } from './users/users.component'; import { UsersComponent } from './users/users.component';
import { ChangelogComponent } from './changelog/changelog.component'; import { ChangelogComponent } from './changelog/changelog.component';
import { DocumentationDatabaseComponent } from import { DocumentationDatabaseComponent } from
'./documentation/documentation-database/documentation-database.component'; './documentation/documentation-database/documentation-database.component';
import { PredictionComponent } from './prediction/prediction.component'; import { PredictionComponent } from './prediction/prediction.component';
import { HelpComponent } from './help/help.component'; import { HelpComponent } from './help/help.component';
import { ModelTemplatesComponent } from './model-templates/model-templates.component'; import { ModelTemplatesComponent } from './model-templates/model-templates.component';
import { SizePipe } from './size.pipe'; import { SizePipe } from './size.pipe';
import { DocumentationArchitectureComponent } from import { DocumentationArchitectureComponent } from
'./documentation/documentation-architecture/documentation-architecture.component'; './documentation/documentation-architecture/documentation-architecture.component';
import { MaterialsComponent } from './materials/materials.component'; import { MaterialsComponent } from './materials/materials.component';
import { MaterialComponent } from './material/material.component'; import { MaterialComponent } from './material/material.component';
import { DocumentationModelsComponent } from './documentation/documentation-models/documentation-models.component'; import { DocumentationModelsComponent } from './documentation/documentation-models/documentation-models.component';

View File

@ -1,46 +1,46 @@
<div class="header"> <div class="header">
<rb-form-date-input name="dateInput" label="older than" [options]="{enableTime: true}" <rb-form-date-input name="dateInput" label="older than" [options]="{enableTime: true}"
[(ngModel)]="timestamp" (ngModelChange)="loadChangelog()"> [(ngModel)]="timestamp" (ngModelChange)="loadChangelog()">
</rb-form-date-input> </rb-form-date-input>
<rb-form-select name="pageSizeSelection" label="page size" [(ngModel)]="pageSize" (ngModelChange)="loadChangelog()"> <rb-form-select name="pageSizeSelection" label="page size" [(ngModel)]="pageSize" (ngModelChange)="loadChangelog()">
<option value="3">3</option> <option value="3">3</option>
<option value="10">10</option> <option value="10">10</option>
<option value="25">25</option> <option value="25">25</option>
<option value="50">50</option> <option value="50">50</option>
<option value="100">100</option> <option value="100">100</option>
<option value="250">250</option> <option value="250">250</option>
<option value="500">500</option> <option value="500">500</option>
</rb-form-select> </rb-form-select>
<button class="rb-btn rb-link" type="button" (click)="loadChangelog(1)"> <button class="rb-btn rb-link" type="button" (click)="loadChangelog(1)">
next page next page
<span class="rb-ic rb-ic-forward-right"></span> <span class="rb-ic rb-ic-forward-right"></span>
</button> </button>
</div> </div>
<rb-table ellipsis> <rb-table ellipsis>
<tr> <tr>
<th>Date</th> <th>Date</th>
<th>Action</th> <th>Action</th>
<th>Data</th> <th>Data</th>
</tr> </tr>
<tr *ngFor="let entry of changelog; index as i" class="clickable" (click)="showDetails(i, sampleModal)"> <tr *ngFor="let entry of changelog; index as i" class="clickable" (click)="showDetails(i, sampleModal)">
<td>{{entry.date}}</td> <td>{{entry.date}}</td>
<td>{{entry.action}}</td> <td>{{entry.action}}</td>
<td>{{entry.data | json}}</td> <td>{{entry.data | json}}</td>
</tr> </tr>
</rb-table> </rb-table>
<ng-template #sampleModal> <ng-template #sampleModal>
<h4>Date</h4> <h4>Date</h4>
<p class="space-below">{{changelog[modalDetail].date}}</p> <p class="space-below">{{changelog[modalDetail].date}}</p>
<h4>Action</h4> <h4>Action</h4>
<p class="space-below">{{changelog[modalDetail].action}}</p> <p class="space-below">{{changelog[modalDetail].action}}</p>
<h4>Collection</h4> <h4>Collection</h4>
<p class="space-below">{{changelog[modalDetail].collection}}</p> <p class="space-below">{{changelog[modalDetail].collection}}</p>
<h4>Conditions</h4> <h4>Conditions</h4>
<p class="space-below">{{changelog[modalDetail].conditions | json}}</p> <p class="space-below">{{changelog[modalDetail].conditions | json}}</p>
<h4>Data</h4> <h4>Data</h4>
<p class="space-below">{{changelog[modalDetail].data | json}}</p> <p class="space-below">{{changelog[modalDetail].data | json}}</p>
</ng-template> </ng-template>

View File

@ -1,50 +1,50 @@
<p> <p>
Bosch IoT Cloud space where all applications are hosted: Bosch IoT Cloud space where all applications are hosted:
<a href="https://apps.sys.de1.bosch-iot-cloud.com/organizations/b28baba5-f95f-4ce5-bc9c-3f45acd1dfb2"> <a href="https://apps.sys.de1.bosch-iot-cloud.com/organizations/b28baba5-f95f-4ce5-bc9c-3f45acd1dfb2">
https://apps.sys.de1.bosch-iot-cloud.com/organizations/b28baba5-f95f-4ce5-bc9c-3f45acd1dfb2 https://apps.sys.de1.bosch-iot-cloud.com/organizations/b28baba5-f95f-4ce5-bc9c-3f45acd1dfb2
</a><br> </a><br>
Find the API documentation here: Find the API documentation here:
<a href="https://definma-api.apps.de1.bosch-iot-cloud.com/api-doc/"> <a href="https://definma-api.apps.de1.bosch-iot-cloud.com/api-doc/">
https://definma-api.apps.de1.bosch-iot-cloud.com/api-doc/ https://definma-api.apps.de1.bosch-iot-cloud.com/api-doc/
</a><br> </a><br>
Admin database management page: Admin database management page:
<a href="https://definma-db.apps.de1.bosch-iot-cloud.com/"> <a href="https://definma-db.apps.de1.bosch-iot-cloud.com/">
https://definma-db.apps.de1.bosch-iot-cloud.com/ https://definma-db.apps.de1.bosch-iot-cloud.com/
</a><br> </a><br>
Code repository UI Code repository UI
<a href="https://sourcecode.socialcoding.bosch.com/users/vle2fe/repos/definma-ui"> <a href="https://sourcecode.socialcoding.bosch.com/users/vle2fe/repos/definma-ui">
https://sourcecode.socialcoding.bosch.com/users/vle2fe/repos/definma-ui https://sourcecode.socialcoding.bosch.com/users/vle2fe/repos/definma-ui
</a><br> </a><br>
Code repository API Code repository API
<a href="https://sourcecode.socialcoding.bosch.com/users/vle2fe/repos/definma-api"> <a href="https://sourcecode.socialcoding.bosch.com/users/vle2fe/repos/definma-api">
https://sourcecode.socialcoding.bosch.com/users/vle2fe/repos/definma-api https://sourcecode.socialcoding.bosch.com/users/vle2fe/repos/definma-api
</a><br> </a><br>
Code repository Models Code repository Models
<a href="https://sourcecode.socialcoding.bosch.com/users/poe2rng/repos/definma-models"> <a href="https://sourcecode.socialcoding.bosch.com/users/poe2rng/repos/definma-models">
https://sourcecode.socialcoding.bosch.com/users/poe2rng/repos/definma-models https://sourcecode.socialcoding.bosch.com/users/poe2rng/repos/definma-models
</a><br> </a><br>
</p> </p>
<p> <p>
All applications are hosted in the bosch IoT Cloud. The API is hosted in a Node.js container, with a bound MongoDB All applications are hosted in the bosch IoT Cloud. The API is hosted in a Node.js container, with a bound MongoDB
instance. <br> instance. <br>
The Angular UI is hosted in a staticfile container, serving the built Angular bundle. <br> The Angular UI is hosted in a staticfile container, serving the built Angular bundle. <br>
Finally any machine learning models are hosted in Python containers. Finally any machine learning models are hosted in Python containers.
</p> </p>
<h4>Development setup</h4> <h4>Development setup</h4>
<p> <p>
In any case, it is good to have PxProxy working, following the In any case, it is good to have PxProxy working, following the
<a href="https://inside-docupedia.bosch.com/confluence/pages/viewpage.action?pageId=608652557"> <a href="https://inside-docupedia.bosch.com/confluence/pages/viewpage.action?pageId=608652557">
Bosch installation guide Bosch installation guide
</a>. <br> </a>. <br>
For pushing to the BIC, you need the CloudFoundry CLI as described in the For pushing to the BIC, you need the CloudFoundry CLI as described in the
<a href="https://inside-docupedia.bosch.com/confluence/display/BICI/Cloud+Foundry+CLI">BIC documentation</a>. <a href="https://inside-docupedia.bosch.com/confluence/display/BICI/Cloud+Foundry+CLI">BIC documentation</a>.
If the the downloaded version of the CLI should not work, there is an old installer with a definitely working version If the the downloaded version of the CLI should not work, there is an old installer with a definitely working version
on the file share in the bin folder. on the file share in the bin folder.
Please consider that you need to have a login to the BIC and be marked as space developer for the DeFinMa Org. <br> Please consider that you need to have a login to the BIC and be marked as space developer for the DeFinMa Org. <br>
For front and back end development, you need a For front and back end development, you need a
<a href="https://www.mongodb.com/try/download/community">local MongoDB server</a> as well as <a href="https://www.mongodb.com/try/download/community">local MongoDB server</a> as well as
<a href="https://nodejs.org/en/">Node.js</a>. <a href="https://nodejs.org/en/">Node.js</a>.
</p> </p>

View File

@ -1,15 +1,15 @@
<p> <p>
The used database instance is a MongoDB instance running on the BIC, storing all application data. The used database instance is a MongoDB instance running on the BIC, storing all application data.
The admin database management page can be accessed <a href="https://definma-db.apps.de1.bosch-iot-cloud.com/api-doc/">here</a>. The admin database management page can be accessed <a href="https://definma-db.apps.de1.bosch-iot-cloud.com/api-doc/">here</a>.
However, it is recommended to use a dedicated MongoDB application for anything apart from a quick look. However, it is recommended to use a dedicated MongoDB application for anything apart from a quick look.
The two tested applications are <a href="https://www.mongodb.com/products/compass">MongoDB Compass</a> and The two tested applications are <a href="https://www.mongodb.com/products/compass">MongoDB Compass</a> and
<a href="https://robomongo.org/s">Robo 3T</a> (recommended for trying queries). <a href="https://robomongo.org/s">Robo 3T</a> (recommended for trying queries).
</p> </p>
<p> <p>
To connect to the BIC instance from your local application follow the To connect to the BIC instance from your local application follow the
<a href="https://inside-docupedia.bosch.com/confluence/display/BICI/MongoDB+Client+Tool+via+SSH+Tunnel">BIC guide</a>. <a href="https://inside-docupedia.bosch.com/confluence/display/BICI/MongoDB+Client+Tool+via+SSH+Tunnel">BIC guide</a>.
<br> <br>
TL;DR: TL;DR:
</p> </p>
<p>For the first time:</p> <p>For the first time:</p>
@ -30,9 +30,9 @@
<h4>Backup Instructions</h4> <h4>Backup Instructions</h4>
<p> <p>
For creating a database backup, you must follow the same steps from above (except the last one). For creating a database backup, you must follow the same steps from above (except the last one).
Additionally you need the <a href="https://www.mongodb.com/try/download/database-tools">MongoDB Tools</a> installed. Additionally you need the <a href="https://www.mongodb.com/try/download/database-tools">MongoDB Tools</a> installed.
Extract the ZIP file to a location on your hard drive and launch a Git Bash in that directory. Extract the ZIP file to a location on your hard drive and launch a Git Bash in that directory.
</p> </p>
<p>To back up the database from the BIC:</p> <p>To back up the database from the BIC:</p>
@ -51,10 +51,10 @@
</pre> </pre>
<p> <p>
More information can be found inside the More information can be found inside the
<a href="https://docs.mongodb.com/database-tools/">documentation</a>. <br> <a href="https://docs.mongodb.com/database-tools/">documentation</a>. <br>
The BIC service also creates an internal backup, which can be requested to restore, see The BIC service also creates an internal backup, which can be requested to restore, see
<a href="https://inside-docupedia.bosch.com/confluence/pages/viewpage.action?pageId=565402281">MongoDB FAQ</a> <a href="https://inside-docupedia.bosch.com/confluence/pages/viewpage.action?pageId=565402281">MongoDB FAQ</a>
</p> </p>
<h4>Database Model</h4> <h4>Database Model</h4>

View File

@ -1,15 +1,15 @@
<h4>Model file upload</h4> <h4>Model file upload</h4>
<p> <p>
Model files have to be saved as a .pkl file in 80_Modelle_BIC. <br> Model files have to be saved as a .pkl file in 80_Modelle_BIC. <br>
For upload the upload script has to be opened (can be in every environment). The name of the model file has to be For upload the upload script has to be opened (can be in every environment). The name of the model file has to be
entered wih the .pkl ending in the first command and without .pkl in the second. entered wih the .pkl ending in the first command and without .pkl in the second.
</p> </p>
<h4 class="space-above">Adding new model scripts</h4> <h4 class="space-above">Adding new model scripts</h4>
<p> <p>
Open Spyder in the base environment and open the model.py within. Open Spyder in the base environment and open the model.py within.
</p> </p>
<ul> <ul>
@ -21,8 +21,8 @@
<h4 class="space-above">Testing locally</h4> <h4 class="space-above">Testing locally</h4>
<p> <p>
To test the model Python script locally, you need to execute it in the base environment, in which all necessary To test the model Python script locally, you need to execute it in the base environment, in which all necessary
packages have to be installed. Note that Spyder also has to be opened in the base environment. packages have to be installed. Note that Spyder also has to be opened in the base environment.
</p> </p>
<ul> <ul>
@ -50,7 +50,7 @@ In the Windows Powershell:
</ul> </ul>
<p> <p>
After upload the new model details have to be entered in the UI. After upload the new model details have to be entered in the UI.
</p> </p>

View File

@ -1,9 +1,9 @@
<p> <p>
<a [href]="api.hostName + '/static/intro-presentation/index.html'"> <a [href]="api.hostName + '/static/intro-presentation/index.html'">
View the presentation explaining the main functions View the presentation explaining the main functions
</a><br> </a><br>
View the <a href="/assets/docs/Veit-Lukas_T3000.pdf">T3000 report</a> and View the <a href="/assets/docs/Veit-Lukas_T3000.pdf">T3000 report</a> and
<a href="/assets/docs/Veit-Lukas_Bachelor-Thesis.pdf">Bachelor Thesis</a> for an in-depth application description. <a href="/assets/docs/Veit-Lukas_Bachelor-Thesis.pdf">Bachelor Thesis</a> for an in-depth application description.
</p> </p>
<h4>User levels</h4> <h4>User levels</h4>

View File

@ -162,8 +162,7 @@ export class PredictionComponent implements OnInit {
{ {
table: { table: {
widths: ['auto', '*', 'auto', 'auto', 'auto'], widths: ['auto', '*', 'auto', 'auto', 'auto'],
body: [ body: [[
[
{text: new Date().toLocaleDateString(), style: 'tableHeader'}, {text: new Date().toLocaleDateString(), style: 'tableHeader'},
{text: 'Customer', style: 'tableHeader'}, {text: 'Customer', style: 'tableHeader'},
{text: 'Security class', style: 'tableHeader'}, {text: 'Security class', style: 'tableHeader'},

View File

@ -2,7 +2,7 @@ import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { RbTableComponent } from './rb-table/rb-table.component'; import { RbTableComponent } from './rb-table/rb-table.component';
import {RbArrayInputComponent, RbArrayInputListenerDirective, RbArrayInputItemDirective} from import {RbArrayInputComponent, RbArrayInputListenerDirective, RbArrayInputItemDirective} from
'./rb-array-input/rb-array-input.component'; './rb-array-input/rb-array-input.component';
import {RbUiComponentsModule} from '@inst-iot/bosch-angular-ui-components'; import {RbUiComponentsModule} from '@inst-iot/bosch-angular-ui-components';
import {FormsModule} from '@angular/forms'; import {FormsModule} from '@angular/forms';
import { RbIconButtonComponent } from './rb-icon-button/rb-icon-button.component'; import { RbIconButtonComponent } from './rb-icon-button/rb-icon-button.component';

View File

@ -4,7 +4,7 @@
<ng-template #content> <ng-template #content>
<!--BASE--> <!--BASE-->
<form #sampleForm="ngForm" *ngIf="view.base"> <form #sampleForm="ngForm" *ngIf="view.base">
<div class="sample"> <div class="sample">
@ -158,7 +158,7 @@
</ng-template> </ng-template>
</form> </form>
<!--BASE SUMMARY--> <!--BASE SUMMARY-->
<div *ngIf="view.baseSum"> <div *ngIf="view.baseSum">
<h3 *ngIf="mode === 'new'">Successfully added samples:</h3> <h3 *ngIf="mode === 'new'">Successfully added samples:</h3>
@ -178,7 +178,7 @@
</rb-table> </rb-table>
</div> </div>
<!--CM--> <!--CM-->
<div *ngIf="view.cm"> <div *ngIf="view.cm">
<form #cmForm="ngForm" [ngClass]="{'cm-form': samples.length > 1}"> <form #cmForm="ngForm" [ngClass]="{'cm-form': samples.length > 1}">
@ -304,7 +304,7 @@
</form> </form>
</div> </div>
<!--CM SUMMARY--> <!--CM SUMMARY-->
<div *ngIf="view.cmSum"> <div *ngIf="view.cmSum">
<span class="rb-ic rb-ic-edit clickable" (click)="checkFormAfterInit = view.cm = true; view.cmSum = false"> <span class="rb-ic rb-ic-edit clickable" (click)="checkFormAfterInit = view.cm = true; view.cmSum = false">

View File

@ -83,7 +83,7 @@ export class SampleComponent implements OnInit, AfterContentChecked {
// Deleted measurements if user is allowed and measurements are available // Deleted measurements if user is allowed and measurements are available
measurementRestoreData: MeasurementModel[] = []; measurementRestoreData: MeasurementModel[] = [];
charts = [[]]; // Chart data for spectra charts = [[]]; // Chart data for spectra
readonly chartInit = [{ readonly chartInit = [{
data: [], data: [],
label: 'Spectrum', label: 'Spectrum',

View File

@ -18,7 +18,7 @@ rb-table {
width: 100%; width: 100%;
} }
td .clickable.rb-ic { td .clickable.rb-ic {
font-size: 1.1rem; font-size: 1.1rem;
color: $color-gray-silver-sand; color: $color-gray-silver-sand;
cursor: pointer; cursor: pointer;

View File

@ -76,9 +76,9 @@ export class ApiService {
if (/http[s]?:\/\//.test(url)) { if (/http[s]?:\/\//.test(url)) {
return url; return url;
} }
else { else {
return this.host + url; return this.host + url;
} }
} }
// Generate request options // Generate request options