From 6f4a790f17f5e2f5a7ecfc2a017c2911e31addae Mon Sep 17 00:00:00 2001 From: ychacon Date: Tue, 2 Mar 2021 10:43:13 +0100 Subject: [PATCH] Move Ei Card as part of EI coordinator module Issue-ID: NONRTRIC-453 Signed-off-by: ychacon Change-Id: Ib550a0cd59a5bf813f36176ea4f32ebbe52f88cf --- webapp-frontend/src/app/app.module.ts | 2 - .../ei-card/ei-card.component.html | 13 ++--- .../ei-coordinator/ei-card/ei-card.component.scss | 58 ++++++++++++++++++++++ .../ei-card/ei-card.component.spec.ts | 10 ++-- .../ei-card/ei-card.component.ts | 2 +- .../app/ei-coordinator/ei-coordinator.module.ts | 7 ++- .../src/app/ui/ei-card/ei-card.component.scss | 58 ---------------------- 7 files changed, 76 insertions(+), 74 deletions(-) rename webapp-frontend/src/app/{ui => ei-coordinator}/ei-card/ei-card.component.html (71%) create mode 100644 webapp-frontend/src/app/ei-coordinator/ei-card/ei-card.component.scss rename webapp-frontend/src/app/{ui => ei-coordinator}/ei-card/ei-card.component.spec.ts (86%) rename webapp-frontend/src/app/{ui => ei-coordinator}/ei-card/ei-card.component.ts (95%) delete mode 100644 webapp-frontend/src/app/ui/ei-card/ei-card.component.scss diff --git a/webapp-frontend/src/app/app.module.ts b/webapp-frontend/src/app/app.module.ts index 6ea9f03..ecb20bd 100644 --- a/webapp-frontend/src/app/app.module.ts +++ b/webapp-frontend/src/app/app.module.ts @@ -64,7 +64,6 @@ import { SidenavListComponent } from './navigation/sidenav-list/sidenav-list.com import { UiService } from './services/ui/ui.service'; import { CookieService } from 'ngx-cookie-service'; import { NodeModulesComponent } from './node-modules/node-modules.component'; -import { EICardComponent } from './ui/ei-card/ei-card.component'; import { HttpMockRequestInterceptor } from './interceptor.mock'; import { environment } from 'src/environments/environment'; import { HttpRequestInterceptor } from './interceptor'; @@ -75,7 +74,6 @@ export const isMock = environment.mock; declarations: [ AppComponent, ConfirmDialogComponent, - EICardComponent, ErrorDialogComponent, FooterComponent, MainComponent, diff --git a/webapp-frontend/src/app/ui/ei-card/ei-card.component.html b/webapp-frontend/src/app/ei-coordinator/ei-card/ei-card.component.html similarity index 71% rename from webapp-frontend/src/app/ui/ei-card/ei-card.component.html rename to webapp-frontend/src/app/ei-coordinator/ei-card/ei-card.component.html index ccbbb41..bdbb604 100644 --- a/webapp-frontend/src/app/ui/ei-card/ei-card.component.html +++ b/webapp-frontend/src/app/ei-coordinator/ei-card/ei-card.component.html @@ -17,10 +17,11 @@ limitations under the License. ========================LICENSE_END=================================== --> -
-
- Enrichment Information Coordinator -
- +
+
+ Enrichment Information Coordinator +
+ +
-
+ \ No newline at end of file diff --git a/webapp-frontend/src/app/ei-coordinator/ei-card/ei-card.component.scss b/webapp-frontend/src/app/ei-coordinator/ei-card/ei-card.component.scss new file mode 100644 index 0000000..f308fb6 --- /dev/null +++ b/webapp-frontend/src/app/ei-coordinator/ei-card/ei-card.component.scss @@ -0,0 +1,58 @@ +/*- + * ========================LICENSE_START================================= + * O-RAN-SC + * %% + * Copyright (C) 2019 Nordix Foundation + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file 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=================================== + */ + .ei__card { + background-color: #ffffff; + box-shadow: 0 0 2rem rgba(0, 0, 255, 0.1); + display: grid; + grid-template-columns: 1fr; + grid-template-rows: 1fr 1fr; + padding: 2rem; + margin: 2rem; + width: 19rem; + height: 30rem; + justify-items: center; + cursor: pointer; + border-radius: 1.75rem; + animation: fadein 1.25s ease-in-out 0ms 1; + color: #443282; + } + + .add__card-dark { + background: linear-gradient(to bottom, rgb(78, 78, 129), rgb(45, 44, 61)); + color: white; + } + + .card__title { + text-transform: uppercase; + letter-spacing: 0.1rem; + } + + .body__container { + align-self: end; + display: flex; + justify-content: space-between; + align-items: center; + flex-flow: column; + } + + .add__icon { + width: 10rem; + margin-bottom: 1.15rem; + } \ No newline at end of file diff --git a/webapp-frontend/src/app/ui/ei-card/ei-card.component.spec.ts b/webapp-frontend/src/app/ei-coordinator/ei-card/ei-card.component.spec.ts similarity index 86% rename from webapp-frontend/src/app/ui/ei-card/ei-card.component.spec.ts rename to webapp-frontend/src/app/ei-coordinator/ei-card/ei-card.component.spec.ts index 797483d..d092383 100644 --- a/webapp-frontend/src/app/ui/ei-card/ei-card.component.spec.ts +++ b/webapp-frontend/src/app/ei-coordinator/ei-card/ei-card.component.spec.ts @@ -19,18 +19,18 @@ */ import {async, ComponentFixture, TestBed} from '@angular/core/testing'; -import {EICardComponent} from './ei-card.component'; +import {EiCardComponent} from './ei-card.component'; import { MatIconModule } from '@angular/material/icon'; import { RouterTestingModule } from '@angular/router/testing'; import {UiService} from '../../services/ui/ui.service'; describe('EICardComponent', () => { - let component: EICardComponent; - let fixture: ComponentFixture; + let component: EiCardComponent; + let fixture: ComponentFixture; beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [EICardComponent], + declarations: [EiCardComponent], imports: [ MatIconModule, RouterTestingModule ], @@ -40,7 +40,7 @@ describe('EICardComponent', () => { })); beforeEach(() => { - fixture = TestBed.createComponent(EICardComponent); + fixture = TestBed.createComponent(EiCardComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/webapp-frontend/src/app/ui/ei-card/ei-card.component.ts b/webapp-frontend/src/app/ei-coordinator/ei-card/ei-card.component.ts similarity index 95% rename from webapp-frontend/src/app/ui/ei-card/ei-card.component.ts rename to webapp-frontend/src/app/ei-coordinator/ei-card/ei-card.component.ts index 57d24d9..fa05aa9 100644 --- a/webapp-frontend/src/app/ui/ei-card/ei-card.component.ts +++ b/webapp-frontend/src/app/ei-coordinator/ei-card/ei-card.component.ts @@ -26,7 +26,7 @@ import { UiService } from '../../services/ui/ui.service'; templateUrl: './ei-card.component.html', styleUrls: ['./ei-card.component.scss'] }) -export class EICardComponent implements OnInit, OnDestroy { +export class EiCardComponent implements OnInit, OnDestroy { darkMode: boolean; constructor(public router: Router, private ui: UiService) { } diff --git a/webapp-frontend/src/app/ei-coordinator/ei-coordinator.module.ts b/webapp-frontend/src/app/ei-coordinator/ei-coordinator.module.ts index 1e38575..cda22ce 100644 --- a/webapp-frontend/src/app/ei-coordinator/ei-coordinator.module.ts +++ b/webapp-frontend/src/app/ei-coordinator/ei-coordinator.module.ts @@ -32,6 +32,7 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { MatSortModule } from '@angular/material/sort'; import { MatButtonModule } from '@angular/material/button'; import { FlexLayoutModule } from '@angular/flex-layout'; +import { EiCardComponent } from './ei-card/ei-card.component'; const routes: Routes = [ @@ -42,7 +43,8 @@ const routes: Routes = [ declarations: [ EICoordinatorComponent, ProducersListComponent, - JobsListComponent + JobsListComponent, + EiCardComponent ], imports: [ CommonModule, @@ -57,7 +59,8 @@ const routes: Routes = [ RouterModule.forChild(routes) ], exports: [ - EICoordinatorComponent + EICoordinatorComponent, + EiCardComponent ] }) export class EiCoordinatorModule { } diff --git a/webapp-frontend/src/app/ui/ei-card/ei-card.component.scss b/webapp-frontend/src/app/ui/ei-card/ei-card.component.scss deleted file mode 100644 index 8f91696..0000000 --- a/webapp-frontend/src/app/ui/ei-card/ei-card.component.scss +++ /dev/null @@ -1,58 +0,0 @@ -/*- - * ========================LICENSE_START================================= - * O-RAN-SC - * %% - * Copyright (C) 2019 Nordix Foundation - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file 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=================================== - */ -.ei__card { - background-color: #ffffff; - box-shadow: 0 0 2rem rgba(0, 0, 255, 0.1); - display: grid; - grid-template-columns: 1fr; - grid-template-rows: 1fr 1fr; - padding: 2rem; - margin: 2rem; - width: 19rem; - height: 30rem; - justify-items: center; - cursor: pointer; - border-radius: 1.75rem; - animation: fadein 1.25s ease-in-out 0ms 1; - color: #443282; -} - -.add__card-dark { - background: linear-gradient(to bottom, rgb(78, 78, 129), rgb(45, 44, 61)); - color: white; -} - -.card__title { - text-transform: uppercase; - letter-spacing: 0.1rem; -} - -.body__container { - align-self: end; - display: flex; - justify-content: space-between; - align-items: center; - flex-flow: column; -} - -.add__icon { - width: 10rem; - margin-bottom: 1.15rem; -} \ No newline at end of file -- 2.16.6