https://definma-api.apps.de1.bosch-iot-cloud.com/api-doc/
@@ -77,4 +81,13 @@
+Architecture
+
+
+
+ All applications are hosted in the bosch IoT Cloud. The API is hosted in a Node.js container, with a bound MongoDB
+ instance.
+ The Angular UI is hosted in a staticfile container, serving the built Angular bundle.
+ Finally any machine learning models are hosted in Python containers.
+
diff --git a/src/app/documentation/documentation.component.ts b/src/app/documentation/documentation.component.ts
index fa7cacb..29668b5 100644
--- a/src/app/documentation/documentation.component.ts
+++ b/src/app/documentation/documentation.component.ts
@@ -1,8 +1,6 @@
import { Component, OnInit } from '@angular/core';
import {ApiService} from '../services/api.service';
-// TODO: links to BIC
-// TODO: bic structure image
@Component({
selector: 'app-documentation',
diff --git a/src/app/sample/sample.component.html b/src/app/sample/sample.component.html
index c25520d..2500204 100644
--- a/src/app/sample/sample.component.html
+++ b/src/app/sample/sample.component.html
@@ -261,5 +261,3 @@
-
-
diff --git a/src/app/samples/samples.component.html b/src/app/samples/samples.component.html
index 0c3992c..f56420e 100644
--- a/src/app/samples/samples.component.html
+++ b/src/app/samples/samples.component.html
@@ -50,11 +50,14 @@
{{item.label}}
+
+ Reset to default
+
+
-
+
@@ -102,6 +105,10 @@
+
+
+ Apply filters
+
@@ -109,6 +116,8 @@
+
+
JSON download link
diff --git a/src/app/samples/samples.component.scss b/src/app/samples/samples.component.scss
index 833a27d..b534741 100644
--- a/src/app/samples/samples.component.scss
+++ b/src/app/samples/samples.component.scss
@@ -53,6 +53,8 @@ rb-table {
.paging {
height: 50px;
+ float: left;
+
rb-form-input {
max-width: 65px;
}
@@ -232,3 +234,12 @@ textarea.linkmodal {
float: right;
}
}
+
+.samples-loading {
+ float: left;
+ transform: scale(0.5);
+}
+
+.reset-preferences {
+ float: right;
+}
diff --git a/src/app/samples/samples.component.ts b/src/app/samples/samples.component.ts
index 993f2b3..8d995ca 100644
--- a/src/app/samples/samples.component.ts
+++ b/src/app/samples/samples.component.ts
@@ -11,6 +11,11 @@ import {DataService} from '../services/data.service';
import {LocalStorageService} from 'angular-2-local-storage';
// TODO: turn off sort field
+// TODO reset sort when field is excluded
+// TODO: material name to product
+// TODO: Eh DPT
+// TODO: filter button
+// TODO: check if connect-src to model works
interface LoadSamplesOptions {
@@ -58,7 +63,6 @@ export class SamplesComponent implements OnInit {
{field: 'type', label: 'Type', active: false, autocomplete: [], mode: 'eq', values: ['']},
{field: 'color', label: 'Color', active: false, autocomplete: [], mode: 'eq', values: ['']},
{field: 'batch', label: 'Batch', active: false, autocomplete: [], mode: 'eq', values: ['']},
- {field: 'notes', label: 'Notes', active: false, autocomplete: [], mode: 'eq', values: ['']},
{field: 'added', label: 'Added', active: false, autocomplete: [], mode: 'eq', values: ['']}
]
};
@@ -69,13 +73,13 @@ export class SamplesComponent implements OnInit {
{id: 'number', label: 'Number', active: true, sortable: true},
{id: 'material.numbers', label: 'Material numbers', active: false, sortable: false},
{id: 'material.name', label: 'Material name', active: true, sortable: true},
- {id: 'material.supplier', label: 'Supplier', active: true, sortable: true},
- {id: 'material.group', label: 'Material', active: false, sortable: true},
+ {id: 'material.supplier', label: 'Supplier', active: false, sortable: true},
+ {id: 'material.group', label: 'Material', active: true, sortable: true},
{id: 'type', label: 'Type', active: true, sortable: true},
- {id: 'color', label: 'Color', active: true, sortable: true},
+ {id: 'color', label: 'Color', active: false, sortable: true},
{id: 'batch', label: 'Batch', active: true, sortable: true},
{id: 'notes', label: 'Notes', active: false, sortable: false},
- {id: 'status', label: 'Status', active: true, sortable: true},
+ {id: 'status', label: 'Status', active: false, sortable: true},
{id: 'added', label: 'Added', active: true, sortable: true}
];
isActiveKey: {[key: string]: boolean} = {};
@@ -83,6 +87,7 @@ export class SamplesComponent implements OnInit {
activeTemplateKeys = {material: [], condition: [], measurements: []};
sampleDetailsSample: any = null;
validation = false; // true to activate validation mode
+ loading = 0;
constructor(
@@ -97,9 +102,9 @@ export class SamplesComponent implements OnInit {
}
ngOnInit(): void {
- let loading = 8;
+ this.loading = 8;
const onLoad = () => {
- if ((--loading) <= 0) {
+ if ((--this.loading) <= 0) {
this.loadSamples();
}
};
@@ -178,7 +183,9 @@ export class SamplesComponent implements OnInit {
}
private sampleLoader(options: LoadSamplesOptions) { // actual loading of the sample, do not call directly
+ this.loading ++;
this.api.get(this.sampleUrl({paging: true, pagingOptions: options}), (sData, err, headers) => {
+ this.loading --;
if (err) {
this.storage.remove('samplesPreferences');
this.api.requestError(err);
@@ -317,12 +324,15 @@ export class SamplesComponent implements OnInit {
this.updateActiveKeys();
}
+ // TODO: avoid reloading
+ resetPreferences() {
+ this.storage.remove('samplesPreferences');
+ this.window.location.reload();
+ }
+
updateFilterFields(field) {
const filter = this.filters.filters.find(e => e.field === field);
filter.active = true;
- if (filter.active) {
- this.loadSamples({firstPage: true});
- }
}
setSort(string) {
diff --git a/src/app/users/users.component.ts b/src/app/users/users.component.ts
index 54a8680..e7857be 100644
--- a/src/app/users/users.component.ts
+++ b/src/app/users/users.component.ts
@@ -4,6 +4,7 @@ import {UserModel} from '../models/user.model';
import {LoginService} from '../services/login.service';
import {ModalService} from '@inst-iot/bosch-angular-ui-components';
+// TODO: somehow mail change triggered
@Component({
selector: 'app-users',