diff options
Diffstat (limited to 'cds-ui/client/src/app/common')
10 files changed, 386 insertions, 0 deletions
diff --git a/cds-ui/client/src/app/common/core/core.module.ts b/cds-ui/client/src/app/common/core/core.module.ts new file mode 100644 index 000000000..9b812a0b3 --- /dev/null +++ b/cds-ui/client/src/app/common/core/core.module.ts @@ -0,0 +1,38 @@ +/* +============LICENSE_START========================================== +=================================================================== +Copyright (C) 2018 IBM Intellectual Property. All rights reserved. +=================================================================== + +Unless otherwise specified, all software contained herein is licensed +under the Apache License, Version 2.0 (the License); +you may not use this software except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +============LICENSE_END============================================ +*/ + +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { HttpClientModule } from '@angular/common/http'; + +import { ApiService } from './services/api.service'; +// import { BlueprintService } from './services/blueprint.service'; + +@NgModule({ + declarations: [ + ], + imports: [ + CommonModule, + HttpClientModule + ], + providers : [ ApiService ] +}) +export class CoreModule { } diff --git a/cds-ui/client/src/app/common/core/services/api.service.ts b/cds-ui/client/src/app/common/core/services/api.service.ts new file mode 100644 index 000000000..0ee3c6a78 --- /dev/null +++ b/cds-ui/client/src/app/common/core/services/api.service.ts @@ -0,0 +1,52 @@ +/* +============LICENSE_START========================================== +=================================================================== +Copyright (C) 2018 IBM Intellectual Property. All rights reserved. +=================================================================== + +Unless otherwise specified, all software contained herein is licensed +under the Apache License, Version 2.0 (the License); +you may not use this software except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +============LICENSE_END============================================ +*/ + + +import { Injectable } from '@angular/core'; +import { HttpClient } from '@angular/common/http'; +import { Observable } from 'rxjs'; + +//import { IBlueprintHttp } from '../store/models/blueprint-http.model'; + +@Injectable() +export class ApiService { + // blueprintUrl = '../../constants/blueprint.json'; + + constructor(private _http: HttpClient) { + } + + get(url: string, params?: any): Observable<any> { + return this._http.get(url); + } + + post() { + // to do + } + + put() { + // to do + } + + delete() { + // to do + } + +}
\ No newline at end of file diff --git a/cds-ui/client/src/app/common/shared/components/header/header.component.html b/cds-ui/client/src/app/common/shared/components/header/header.component.html new file mode 100644 index 000000000..e1ed84227 --- /dev/null +++ b/cds-ui/client/src/app/common/shared/components/header/header.component.html @@ -0,0 +1,23 @@ +<!-- +============LICENSE_START========================================== +=================================================================== +Copyright (C) 2018 IBM Intellectual Property. All rights reserved. +=================================================================== + +Unless otherwise specified, all software contained herein is licensed +under the Apache License, Version 2.0 (the License); +you may not use this software except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +============LICENSE_END============================================ +--> +<mat-toolbar color="primary"> + <span>Controller Blueprint Design Studio</span> +</mat-toolbar> diff --git a/cds-ui/client/src/app/common/shared/components/header/header.component.scss b/cds-ui/client/src/app/common/shared/components/header/header.component.scss new file mode 100644 index 000000000..22941b5fa --- /dev/null +++ b/cds-ui/client/src/app/common/shared/components/header/header.component.scss @@ -0,0 +1,20 @@ +/* +============LICENSE_START========================================== +=================================================================== +Copyright (C) 2018 IBM Intellectual Property. All rights reserved. +=================================================================== + +Unless otherwise specified, all software contained herein is licensed +under the Apache License, Version 2.0 (the License); +you may not use this software except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +============LICENSE_END============================================ +*/
\ No newline at end of file diff --git a/cds-ui/client/src/app/common/shared/components/header/header.component.spec.ts b/cds-ui/client/src/app/common/shared/components/header/header.component.spec.ts new file mode 100644 index 000000000..99bb63b8e --- /dev/null +++ b/cds-ui/client/src/app/common/shared/components/header/header.component.spec.ts @@ -0,0 +1,45 @@ +/* +============LICENSE_START========================================== +=================================================================== +Copyright (C) 2018 IBM Intellectual Property. All rights reserved. +=================================================================== + +Unless otherwise specified, all software contained herein is licensed +under the Apache License, Version 2.0 (the License); +you may not use this software except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +============LICENSE_END============================================ +*/ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { HeaderComponent } from './header.component'; + +describe('HeaderComponent', () => { + let component: HeaderComponent; + let fixture: ComponentFixture<HeaderComponent>; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ HeaderComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(HeaderComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/cds-ui/client/src/app/common/shared/components/header/header.component.ts b/cds-ui/client/src/app/common/shared/components/header/header.component.ts new file mode 100644 index 000000000..40a337579 --- /dev/null +++ b/cds-ui/client/src/app/common/shared/components/header/header.component.ts @@ -0,0 +1,35 @@ +/* +============LICENSE_START========================================== +=================================================================== +Copyright (C) 2018 IBM Intellectual Property. All rights reserved. +=================================================================== + +Unless otherwise specified, all software contained herein is licensed +under the Apache License, Version 2.0 (the License); +you may not use this software except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +============LICENSE_END============================================ +*/ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-header', + templateUrl: './header.component.html', + styleUrls: ['./header.component.scss'] +}) +export class HeaderComponent implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/cds-ui/client/src/app/common/shared/components/home/home.component.html b/cds-ui/client/src/app/common/shared/components/home/home.component.html new file mode 100644 index 000000000..fc763be47 --- /dev/null +++ b/cds-ui/client/src/app/common/shared/components/home/home.component.html @@ -0,0 +1,52 @@ +<!-- ============LICENSE_START========================================== +=================================================================== +Copyright (C) 2018 IBM Intellectual Property. All rights reserved. +=================================================================== + +Unless otherwise specified, all software contained herein is licensed +under the Apache License, Version 2.0 (the License); +you may not use this software except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +============LICENSE_END============================================ +--> + + +<!-- <app-header></app-header> --> +<!-- <mat-toolbar color="warn"> + <mat-toolbar-row> + <button type="button" aria-label="Toggle sidenav" mat-icon-button (click)="drawer.toggle()" color="primary"> + <mat-icon aria-label="Side nav toggle icon">menu</mat-icon> + </button> + <span>MY Image</span> + </mat-toolbar-row> +</mat-toolbar> --> +<mat-toolbar color="primary"> + <mat-toolbar-row> + <button type="button" aria-label="Toggle sidenav" mat-icon-button (click)="drawer.toggle()" color="primary"> + <mat-icon aria-label="Side nav toggle icon">menu</mat-icon> + </button> + <span>Controller Blueprint Design Studio</span> + </mat-toolbar-row> +</mat-toolbar> +<mat-sidenav-container class="example-container"> + <mat-sidenav #drawer mode="side" [(opened)]="opened" (opened)="events.push('open!')" + (closed)="events.push('close!')"> + <mat-toolbar color=""primary>Menu</mat-toolbar> + <mat-nav-list> + <a mat-list-item>Data dictionory</a> + <a mat-list-item [routerLink]="['/controllerBlueprint']">Controlled Blueprint</a> + </mat-nav-list> + </mat-sidenav> + + <mat-sidenav-content (click)="drawer.close()"> + <router-outlet></router-outlet> + </mat-sidenav-content> +</mat-sidenav-container>
\ No newline at end of file diff --git a/cds-ui/client/src/app/common/shared/components/home/home.component.scss b/cds-ui/client/src/app/common/shared/components/home/home.component.scss new file mode 100644 index 000000000..ca503e591 --- /dev/null +++ b/cds-ui/client/src/app/common/shared/components/home/home.component.scss @@ -0,0 +1,38 @@ +/* +============LICENSE_START========================================== +=================================================================== +Copyright (C) 2018 IBM Intellectual Property. All rights reserved. +=================================================================== + +Unless otherwise specified, all software contained herein is licensed +under the Apache License, Version 2.0 (the License); +you may not use this software except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +============LICENSE_END============================================ +*/ + +// .example-container { +// // position: absolute; +// top: 0; +// bottom: 0; +// left: 0; +// right: 0; +// } + +// .example-events { +// width: 300px; +// height: 200px; +// overflow: auto; +// border: 1px solid #555; +// } +.mat-sidenav-container{ + height: 652px; +}
\ No newline at end of file diff --git a/cds-ui/client/src/app/common/shared/components/home/home.component.spec.ts b/cds-ui/client/src/app/common/shared/components/home/home.component.spec.ts new file mode 100644 index 000000000..5bfec0399 --- /dev/null +++ b/cds-ui/client/src/app/common/shared/components/home/home.component.spec.ts @@ -0,0 +1,46 @@ +/* +============LICENSE_START========================================== +=================================================================== +Copyright (C) 2018 IBM Intellectual Property. All rights reserved. +=================================================================== + +Unless otherwise specified, all software contained herein is licensed +under the Apache License, Version 2.0 (the License); +you may not use this software except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +============LICENSE_END============================================ +*/ + +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { HomeComponent } from './home.component'; + +describe('HomeComponent', () => { + let component: HomeComponent; + let fixture: ComponentFixture<HomeComponent>; + + 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/cds-ui/client/src/app/common/shared/components/home/home.component.ts b/cds-ui/client/src/app/common/shared/components/home/home.component.ts new file mode 100644 index 000000000..d70da85f6 --- /dev/null +++ b/cds-ui/client/src/app/common/shared/components/home/home.component.ts @@ -0,0 +1,37 @@ +/* +============LICENSE_START========================================== +=================================================================== +Copyright (C) 2018 IBM Intellectual Property. All rights reserved. +=================================================================== + +Unless otherwise specified, all software contained herein is licensed +under the Apache License, Version 2.0 (the License); +you may not use this software except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +============LICENSE_END============================================ +*/ + +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-home', + templateUrl: './home.component.html', + styleUrls: ['./home.component.scss'] +}) +export class HomeComponent implements OnInit { + events: string[] = []; + opened: boolean; + constructor() { } + + ngOnInit() { + } + +} |