From: jh245g Date: Tue, 22 Oct 2019 18:05:53 +0000 (-0400) Subject: improve the dark theme X-Git-Tag: R2~1^2 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=a4b2e71472b32a8244da846af20128504f4cbc65;p=portal%2Fric-dashboard.git improve the dark theme Change-Id: I2bd9d18fbd5941619660edf9425da9056965901a Signed-off-by: Jun (Nicolas) Hu --- diff --git a/docs/release-notes.rst b/docs/release-notes.rst index 3eaf7ddd..e4898f84 100644 --- a/docs/release-notes.rst +++ b/docs/release-notes.rst @@ -19,7 +19,7 @@ RIC Dashboard Release Notes =========================== -Version 1.2.4, 21 Oct 2019 +Version 1.2.4, 23 Oct 2019 -------------------------- * Revise a1-med-client to use API spec in new submodule ric-plt/a1; removed cached copy @@ -33,6 +33,7 @@ Version 1.2.4, 21 Oct 2019 * Update EPSDK-FW to version 2.6 * Make constructor robust to missing caasingress.insecure property * Repair bug that omitted slashes in CAAS-Ingress URL builder +* Improve the dark mode Version 1.2.3, 4 Oct 2019 ------------------------- diff --git a/webapp-frontend/src/app/anr-xapp/anr-xapp.component.html b/webapp-frontend/src/app/anr-xapp/anr-xapp.component.html index def032e4..9bf24a0d 100644 --- a/webapp-frontend/src/app/anr-xapp/anr-xapp.component.html +++ b/webapp-frontend/src/app/anr-xapp/anr-xapp.component.html @@ -17,7 +17,7 @@ limitations under the License. ========================LICENSE_END=================================== --> -
+

ANR xApp Neighbor Cell Relation Table

diff --git a/webapp-frontend/src/app/anr-xapp/anr-xapp.component.ts b/webapp-frontend/src/app/anr-xapp/anr-xapp.component.ts index e88720c8..98728b21 100644 --- a/webapp-frontend/src/app/anr-xapp/anr-xapp.component.ts +++ b/webapp-frontend/src/app/anr-xapp/anr-xapp.component.ts @@ -20,7 +20,7 @@ import { HttpErrorResponse, HttpResponse } from '@angular/common/http'; import { AfterViewInit, Component, ElementRef, OnInit, ViewChild } from '@angular/core'; -import { MatSort } from '@angular/material'; +import { MatSort } from '@angular/material/sort'; import { MatDialog } from '@angular/material/dialog'; import { fromEvent } from 'rxjs/observable/fromEvent'; import { debounceTime, distinctUntilChanged, finalize, tap } from 'rxjs/operators'; @@ -32,6 +32,7 @@ import { ConfirmDialogService } from './../services/ui/confirm-dialog.service'; import { NotificationService } from './../services/ui/notification.service'; import { AnrEditNcrDialogComponent } from './anr-edit-ncr-dialog.component'; import { ANRXappDataSource } from './anr-xapp.datasource'; +import { UiService } from '../services/ui/ui.service'; @Component({ selector: 'rd-anr', @@ -40,6 +41,8 @@ import { ANRXappDataSource } from './anr-xapp.datasource'; }) export class AnrXappComponent implements AfterViewInit, OnInit { + darkMode: boolean; + panelClass: string = ""; dataSource: ANRXappDataSource; gNodeBIds: string[]; @ViewChild('ggNodeB', { static: true }) ggNodeB: ElementRef; @@ -56,13 +59,17 @@ export class AnrXappComponent implements AfterViewInit, OnInit { private confirmDialogService: ConfirmDialogService, private errorDialogService: ErrorDialogService, private loadingDialogService: LoadingDialogService, - private notificationService: NotificationService) { } + private notificationService: NotificationService, + public ui: UiService) { } ngOnInit() { this.dataSource = new ANRXappDataSource(this.anrXappService, this.sort, this.notificationService); this.dataSource.loadTable(); // Empty string occurs first in the array of gNodeBIds this.anrXappService.getgNodeBs().subscribe((res: string[]) => this.gNodeBIds = res); + this.ui.darkModeState.subscribe((isDark) => { + this.darkMode = isDark; + }); } ngAfterViewInit() { @@ -95,7 +102,13 @@ export class AnrXappComponent implements AfterViewInit, OnInit { } modifyNcr(ncr: ANRNeighborCellRelation): void { + if (this.darkMode) { + this.panelClass = "dark-theme"; + } else { + this.panelClass = ""; + } const dialogRef = this.dialog.open(AnrEditNcrDialogComponent, { + panelClass: this.panelClass, width: '300px', data: ncr }); diff --git a/webapp-frontend/src/app/anr-xapp/anr-xapp.datasource.ts b/webapp-frontend/src/app/anr-xapp/anr-xapp.datasource.ts index d57f9e19..b31ad03e 100644 --- a/webapp-frontend/src/app/anr-xapp/anr-xapp.datasource.ts +++ b/webapp-frontend/src/app/anr-xapp/anr-xapp.datasource.ts @@ -20,7 +20,7 @@ import { CollectionViewer, DataSource } from '@angular/cdk/collections'; import { HttpErrorResponse } from '@angular/common/http'; -import { MatSort } from '@angular/material'; +import { MatSort } from '@angular/material/sort'; import { Observable } from 'rxjs/Observable'; import { BehaviorSubject } from 'rxjs/BehaviorSubject'; import { of } from 'rxjs/observable/of'; diff --git a/webapp-frontend/src/app/app-configuration/app-configuration.component.scss b/webapp-frontend/src/app/app-configuration/app-configuration.component.scss index dd782632..5186c3fe 100644 --- a/webapp-frontend/src/app/app-configuration/app-configuration.component.scss +++ b/webapp-frontend/src/app/app-configuration/app-configuration.component.scss @@ -27,9 +27,7 @@ mat-spinner { } .config-title { - height:50px; text-align: center; - color: #432c85; font-size: 30px; font-weight: 300; transform: translate(149 56); diff --git a/webapp-frontend/src/app/app-control/app-control.datasource.ts b/webapp-frontend/src/app/app-control/app-control.datasource.ts index b3aa6b99..e97dc637 100644 --- a/webapp-frontend/src/app/app-control/app-control.datasource.ts +++ b/webapp-frontend/src/app/app-control/app-control.datasource.ts @@ -20,7 +20,7 @@ import { CollectionViewer, DataSource } from '@angular/cdk/collections'; import { HttpErrorResponse } from '@angular/common/http'; -import { MatSort } from '@angular/material'; +import { MatSort } from '@angular/material/sort'; import { Observable } from 'rxjs/Observable'; import { BehaviorSubject } from 'rxjs/BehaviorSubject'; import { merge } from 'rxjs'; diff --git a/webapp-frontend/src/app/caas-ingress/caas-ingress.datasource.ts b/webapp-frontend/src/app/caas-ingress/caas-ingress.datasource.ts index 2505ca23..d823c0db 100644 --- a/webapp-frontend/src/app/caas-ingress/caas-ingress.datasource.ts +++ b/webapp-frontend/src/app/caas-ingress/caas-ingress.datasource.ts @@ -20,7 +20,7 @@ import { CollectionViewer, DataSource } from '@angular/cdk/collections'; import { HttpErrorResponse } from '@angular/common/http'; -import { MatSort } from '@angular/material'; +import { MatSort } from '@angular/material/sort'; import { Observable } from 'rxjs/Observable'; import { BehaviorSubject } from 'rxjs/BehaviorSubject'; import { of } from 'rxjs/observable/of'; diff --git a/webapp-frontend/src/app/catalog/catalog.component.ts b/webapp-frontend/src/app/catalog/catalog.component.ts index 51890ee6..07e0e020 100644 --- a/webapp-frontend/src/app/catalog/catalog.component.ts +++ b/webapp-frontend/src/app/catalog/catalog.component.ts @@ -30,6 +30,7 @@ import { AppConfigurationComponent } from './../app-configuration/app-configurat import { ConfirmDialogService } from './../services/ui/confirm-dialog.service'; import { NotificationService } from './../services/ui/notification.service'; import { CatalogDataSource } from './catalog.datasource'; +import { UiService } from '../services/ui/ui.service'; @Component({ selector: 'rd-app-catalog', @@ -38,6 +39,8 @@ import { CatalogDataSource } from './catalog.datasource'; }) export class CatalogComponent implements OnInit { + darkMode: boolean; + panelClass: string = ""; displayedColumns: string[] = ['name', 'version', 'action']; dataSource: CatalogDataSource; @ViewChild(MatSort, { static: true }) sort: MatSort; @@ -48,23 +51,32 @@ export class CatalogComponent implements OnInit { private dialog: MatDialog, private errorDiaglogService: ErrorDialogService, private loadingDialogService: LoadingDialogService, - private notificationService: NotificationService) { } + private notificationService: NotificationService, + public ui: UiService) { } ngOnInit() { this.dataSource = new CatalogDataSource(this.appMgrService, this.sort, this.notificationService); this.dataSource.loadTable(); + this.ui.darkModeState.subscribe((isDark) => { + this.darkMode = isDark; + }); } onConfigureApp(xapp: XMDeployableApp): void { + if (this.darkMode) { + this.panelClass = "dark-theme"; + } else { + this.panelClass = ""; + } const dialogRef = this.dialog.open(AppConfigurationComponent, { + panelClass: this.panelClass, width: '40%', maxHeight: '500px', position: { top: '10%' }, data: xapp - }); - + }) } onDeployApp(app: XMDeployableApp): void { diff --git a/webapp-frontend/src/app/catalog/catalog.datasource.ts b/webapp-frontend/src/app/catalog/catalog.datasource.ts index 8c2acfe8..f5f6e986 100644 --- a/webapp-frontend/src/app/catalog/catalog.datasource.ts +++ b/webapp-frontend/src/app/catalog/catalog.datasource.ts @@ -20,7 +20,7 @@ import { CollectionViewer, DataSource } from '@angular/cdk/collections'; import { HttpErrorResponse } from '@angular/common/http'; -import { MatSort } from '@angular/material'; +import { MatSort } from '@angular/material/sort'; import { Observable } from 'rxjs/Observable'; import { BehaviorSubject } from 'rxjs/BehaviorSubject'; import { merge } from 'rxjs'; diff --git a/webapp-frontend/src/app/footer/footer.component.html b/webapp-frontend/src/app/footer/footer.component.html index 4eae0cd0..5dd1c364 100644 --- a/webapp-frontend/src/app/footer/footer.component.html +++ b/webapp-frontend/src/app/footer/footer.component.html @@ -17,7 +17,7 @@ limitations under the License. ========================LICENSE_END=================================== --> -