diff --git a/angular.json b/angular.json index dc5d0bb..8e856ae 100644 --- a/angular.json +++ b/angular.json @@ -89,6 +89,7 @@ "polyfills": "src/polyfills.ts", "tsConfig": "tsconfig.spec.json", "karmaConfig": "karma.conf.js", + "codeCoverage": true, "assets": [ "src/favicon.ico", "src/assets" diff --git a/package-lock.json b/package-lock.json index 7dc62be..4f3ba55 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1863,6 +1863,49 @@ "to-fast-properties": "^2.0.0" } }, + "@hapi/address": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@hapi/address/-/address-4.0.1.tgz", + "integrity": "sha512-0oEP5UiyV4f3d6cBL8F3Z5S7iWSX39Knnl0lY8i+6gfmmIBj44JCBNtcMgwyS+5v7j3VYavNay0NFHDS+UGQcw==", + "requires": { + "@hapi/hoek": "^9.0.0" + } + }, + "@hapi/formula": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@hapi/formula/-/formula-2.0.0.tgz", + "integrity": "sha512-V87P8fv7PI0LH7LiVi8Lkf3x+KCO7pQozXRssAHNXXL9L1K+uyu4XypLXwxqVDKgyQai6qj3/KteNlrqDx4W5A==" + }, + "@hapi/hoek": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.0.4.tgz", + "integrity": "sha512-EwaJS7RjoXUZ2cXXKZZxZqieGtc7RbvQhUy8FwDoMQtxWVi14tFjeFCYPZAM1mBCpOpiBpyaZbb9NeHc7eGKgw==" + }, + "@hapi/joi": { + "version": "17.1.1", + "resolved": "https://registry.npmjs.org/@hapi/joi/-/joi-17.1.1.tgz", + "integrity": "sha512-p4DKeZAoeZW4g3u7ZeRo+vCDuSDgSvtsB/NpfjXEHTUjSeINAi/RrVOWiVQ1isaoLzMvFEhe8n5065mQq1AdQg==", + "requires": { + "@hapi/address": "^4.0.1", + "@hapi/formula": "^2.0.0", + "@hapi/hoek": "^9.0.0", + "@hapi/pinpoint": "^2.0.0", + "@hapi/topo": "^5.0.0" + } + }, + "@hapi/pinpoint": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@hapi/pinpoint/-/pinpoint-2.0.0.tgz", + "integrity": "sha512-vzXR5MY7n4XeIvLpfl3HtE3coZYO4raKXW766R6DZw/6aLqR26iuZ109K7a0NtF2Db0jxqh7xz2AxkUwpUFybw==" + }, + "@hapi/topo": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.0.0.tgz", + "integrity": "sha512-tFJlT47db0kMqVm3H4nQYgn6Pwg10GTZHb1pwmSiv1K4ks6drQOtfEF5ZnPjkvC+y4/bUPHK+bc87QvLcL+WMw==", + "requires": { + "@hapi/hoek": "^9.0.0" + } + }, "@inst-iot/bosch-angular-ui-components": { "version": "0.5.30", "resolved": "https://rb-artifactory.bosch.com:443/artifactory/api/npm/iot-insights-release-local/@inst-iot/bosch-angular-ui-components/-/@inst-iot/bosch-angular-ui-components-0.5.30.tgz", diff --git a/package.json b/package.json index 7bf680e..2857c1c 100644 --- a/package.json +++ b/package.json @@ -3,11 +3,12 @@ "version": "0.0.0", "scripts": { "ng": "ng", - "start": "ng serve", + "start": "ng serve -o", "build": "ng build", "test": "ng test", "lint": "ng lint", - "e2e": "ng e2e" + "e2e": "ng e2e", + "coverage": "ng test --no-watch --code-coverage" }, "private": true, "dependencies": { @@ -19,6 +20,7 @@ "@angular/platform-browser": "~8.2.14", "@angular/platform-browser-dynamic": "~8.2.14", "@angular/router": "~8.2.14", + "@hapi/joi": "^17.1.1", "@inst-iot/bosch-angular-ui-components": "^0.5.30", "flatpickr": "^4.6.3", "rxjs": "~6.4.0", diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 06c7342..c4d872c 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -1,8 +1,11 @@ import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; +import {HomeComponent} from './home/home.component'; -const routes: Routes = []; +const routes: Routes = [ + {path: '', component: HomeComponent} +]; @NgModule({ imports: [RouterModule.forRoot(routes)], diff --git a/src/app/app.component.html b/src/app/app.component.html index 3739515..b902561 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -4,3 +4,7 @@
Digital Fingerprint of Plastics
+ +
+ +
diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 27a4816..3936d45 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -4,15 +4,21 @@ import { NgModule } from '@angular/core'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; import {RbUiComponentsModule} from '@inst-iot/bosch-angular-ui-components'; +import { LoginComponent } from './login/login.component'; +import { HomeComponent } from './home/home.component'; +import {FormsModule} from '@angular/forms'; @NgModule({ declarations: [ - AppComponent + AppComponent, + LoginComponent, + HomeComponent ], imports: [ BrowserModule, AppRoutingModule, - RbUiComponentsModule + RbUiComponentsModule, + FormsModule ], providers: [], bootstrap: [AppComponent] diff --git a/src/app/home/home.component.html b/src/app/home/home.component.html new file mode 100644 index 0000000..3317c9b --- /dev/null +++ b/src/app/home/home.component.html @@ -0,0 +1 @@ + diff --git a/src/app/home/home.component.scss b/src/app/home/home.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/home/home.component.spec.ts b/src/app/home/home.component.spec.ts new file mode 100644 index 0000000..490e81b --- /dev/null +++ b/src/app/home/home.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { HomeComponent } from './home.component'; + +describe('HomeComponent', () => { + let component: HomeComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ HomeComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(HomeComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/home/home.component.ts b/src/app/home/home.component.ts new file mode 100644 index 0000000..f56c8c1 --- /dev/null +++ b/src/app/home/home.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-home', + templateUrl: './home.component.html', + styleUrls: ['./home.component.scss'] +}) +export class HomeComponent implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/src/app/login/login.component.html b/src/app/login/login.component.html new file mode 100644 index 0000000..240b221 --- /dev/null +++ b/src/app/login/login.component.html @@ -0,0 +1,10 @@ +
+

Please log in

+ + + + + + + {{message}} +
diff --git a/src/app/login/login.component.scss b/src/app/login/login.component.scss new file mode 100644 index 0000000..db64a3b --- /dev/null +++ b/src/app/login/login.component.scss @@ -0,0 +1,3 @@ +.login-wrapper { + max-width: 220px; +} diff --git a/src/app/login/login.component.spec.ts b/src/app/login/login.component.spec.ts new file mode 100644 index 0000000..d6d85a8 --- /dev/null +++ b/src/app/login/login.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { LoginComponent } from './login.component'; + +describe('LoginComponent', () => { + let component: LoginComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ LoginComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(LoginComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/login/login.component.ts b/src/app/login/login.component.ts new file mode 100644 index 0000000..21e6356 --- /dev/null +++ b/src/app/login/login.component.ts @@ -0,0 +1,19 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-login', + templateUrl: './login.component.html', + styleUrls: ['./login.component.scss'] +}) +export class LoginComponent implements OnInit { + + message = ''; + + constructor() { } + + ngOnInit() { + } + + + +} diff --git a/src/app/validation.service.spec.ts b/src/app/validation.service.spec.ts new file mode 100644 index 0000000..50735e2 --- /dev/null +++ b/src/app/validation.service.spec.ts @@ -0,0 +1,12 @@ +import { TestBed } from '@angular/core/testing'; + +import { ValidationService } from './validation.service'; + +describe('ValidationService', () => { + beforeEach(() => TestBed.configureTestingModule({})); + + it('should be created', () => { + const service: ValidationService = TestBed.get(ValidationService); + expect(service).toBeTruthy(); + }); +}); diff --git a/src/app/validation.service.ts b/src/app/validation.service.ts new file mode 100644 index 0000000..433bf34 --- /dev/null +++ b/src/app/validation.service.ts @@ -0,0 +1,9 @@ +import { Injectable } from '@angular/core'; + +@Injectable({ + providedIn: 'root' +}) +export class ValidationService { + + constructor() { } +} diff --git a/src/styles.scss b/src/styles.scss index b3fb321..d08cb34 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -1,3 +1,17 @@ $font-path: "../node_modules/@inst-iot/bosch-angular-ui-components/assets/"; $rb-extended-breakpoints: false; // whether to use extended breakpoints xxl and xxxl @import "~@inst-iot/bosch-angular-ui-components/styles/global.scss"; + +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +a, a:active, a:focus { + outline: 0 !important; +} + +button::-moz-focus-inner { + border: 0; +}