improve the dark theme 97/1197/3
authorjh245g <jh245g@att.com>
Tue, 22 Oct 2019 18:05:53 +0000 (14:05 -0400)
committerjh245g <jh245g@att.com>
Wed, 23 Oct 2019 19:47:04 +0000 (15:47 -0400)
Change-Id: I2bd9d18fbd5941619660edf9425da9056965901a
Signed-off-by: Jun (Nicolas) Hu <jh245g@att.com>
36 files changed:
docs/release-notes.rst
webapp-frontend/src/app/anr-xapp/anr-xapp.component.html
webapp-frontend/src/app/anr-xapp/anr-xapp.component.ts
webapp-frontend/src/app/anr-xapp/anr-xapp.datasource.ts
webapp-frontend/src/app/app-configuration/app-configuration.component.scss
webapp-frontend/src/app/app-control/app-control.datasource.ts
webapp-frontend/src/app/caas-ingress/caas-ingress.datasource.ts
webapp-frontend/src/app/catalog/catalog.component.ts
webapp-frontend/src/app/catalog/catalog.datasource.ts
webapp-frontend/src/app/footer/footer.component.html
webapp-frontend/src/app/footer/footer.component.scss
webapp-frontend/src/app/footer/footer.component.ts
webapp-frontend/src/app/navigation/sidenav-list/sidenav-list.component.html
webapp-frontend/src/app/navigation/sidenav-list/sidenav-list.component.scss
webapp-frontend/src/app/navigation/sidenav-list/sidenav-list.component.ts
webapp-frontend/src/app/ran-control/ran-control.component.ts
webapp-frontend/src/app/rd.component.html
webapp-frontend/src/app/rd.component.scss
webapp-frontend/src/app/rd.module.ts
webapp-frontend/src/app/services/ui/confirm-dialog.service.ts
webapp-frontend/src/app/services/ui/error-dialog.service.ts
webapp-frontend/src/app/services/ui/loading-dialog.service.ts
webapp-frontend/src/app/ui/catalog-card/catalog-card.component.html
webapp-frontend/src/app/ui/catalog-card/catalog-card.component.scss
webapp-frontend/src/app/ui/confirm-dialog/confirm-dialog.component.html
webapp-frontend/src/app/ui/confirm-dialog/confirm-dialog.component.ts
webapp-frontend/src/app/ui/control-card/control-card.component.html
webapp-frontend/src/app/ui/control-card/control-card.component.scss
webapp-frontend/src/app/ui/error-dialog/error-dialog.component.ts
webapp-frontend/src/app/ui/loading-dialog/loading-dialog.component.ts
webapp-frontend/src/app/ui/stat-card/stat-card.component.html
webapp-frontend/src/app/ui/stat-card/stat-card.component.scss
webapp-frontend/src/app/user/user.component.ts
webapp-frontend/src/app/user/user.datasource.ts
webapp-frontend/src/styles.scss
webapp-frontend/src/styles/dark-theme.scss [new file with mode: 0644]

index 3eaf7dd..e4898f8 100644 (file)
@@ -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
 -------------------------
index def032e..9bf24a0 100644 (file)
@@ -17,7 +17,7 @@
   limitations under the License.
   ========================LICENSE_END===================================
 -->
-<div class="anr__section">
+<div class="anr__section" >
   <h3 class="rd-global-page-title">ANR xApp Neighbor Cell Relation Table</h3>
 
   <mat-form-field class="input-width">
index e88720c..98728b2 100644 (file)
@@ -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
     });
index d57f9e1..b31ad03 100644 (file)
@@ -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';
index dd78263..5186c3f 100644 (file)
@@ -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);
index b3aa6b9..e97dc63 100644 (file)
@@ -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';
index 2505ca2..d823c0d 100644 (file)
@@ -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';
index 51890ee..07e0e02 100644 (file)
@@ -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 {
index 8c2acfe..f5f6e98 100644 (file)
@@ -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';
index 4eae0cd..5dd1c36 100644 (file)
@@ -17,7 +17,7 @@
   limitations under the License.
   ========================LICENSE_END===================================
   -->
-<div class="copyright__text">
+<div class="copyright__text" [ngClass]="{'footer-dark': darkMode}">
   Copyright (C) 2019 AT&T Intellectual Property. Licensed under the Apache License, Version 2.0.
   <br/>
   Version {{dashboardVersion}}
index f9eb87a..e2456d7 100644 (file)
@@ -22,3 +22,7 @@
   letter-spacing: 0.1rem;
   font-size: 12px;
 }
+
+.footer-dark {
+  color: white;
+}
\ No newline at end of file
index d45ee3f..e119d70 100644 (file)
@@ -18,8 +18,9 @@
  * ========================LICENSE_END===================================
  */
 import { Component, OnInit } from '@angular/core';
-import { DashboardService } from '../services/dashboard/dashboard.service';
 import { DashboardSuccessTransport } from '../interfaces/dashboard.types';
+import { DashboardService } from '../services/dashboard/dashboard.service';
+import { UiService } from '../services/ui/ui.service';
 
 @Component({
   selector: 'rd-footer',
@@ -31,14 +32,18 @@ import { DashboardSuccessTransport } from '../interfaces/dashboard.types';
  * Fetches the version on load for display in the footer
  */
 export class FooterComponent implements OnInit {
-
+  darkMode: boolean;
   dashboardVersion: string;
 
   // Inject the service
-  constructor(private dashboardService: DashboardService) { }
+  constructor(private dashboardService: DashboardService,
+              public ui: UiService ) { }
 
   ngOnInit() {
     this.dashboardService.getVersion().subscribe((res: DashboardSuccessTransport) => this.dashboardVersion = res.data);
+    this.ui.darkModeState.subscribe((isDark) => {
+      this.darkMode = isDark;
+    });
   }
 
 }
index 18756a3..2fb3b59 100644 (file)
@@ -19,7 +19,7 @@
   -->
 
 <!-- browse icons at https://material.io/tools/icons/?style=baseline -->
-<mat-nav-list>
+<mat-nav-list [ngClass]="{'dark': darkMode}">
   <a mat-list-item routerLink="/" (click)="onSidenavClose()">
     <mat-icon>home</mat-icon> <span class="nav-caption">Home</span>
   </a>
index 3344eb1..72c724e 100644 (file)
@@ -21,7 +21,11 @@ a {
     text-decoration: none;
     color: black;
 }
+
+.dark a {
+  color: white;
+}
+
 a:hover, a:active{
     color: lightgray;
 }
index 584ad07..c0f05af 100644 (file)
@@ -18,6 +18,7 @@
  * ========================LICENSE_END===================================
  */
 import { Component, OnInit, Output, EventEmitter } from '@angular/core';
+import { UiService } from '../../services/ui/ui.service';
 
 @Component({
   selector: 'rd-sidenav-list',
@@ -25,11 +26,16 @@ import { Component, OnInit, Output, EventEmitter } from '@angular/core';
   styleUrls: ['./sidenav-list.component.scss']
 })
 export class SidenavListComponent implements OnInit {
+  darkMode: boolean;
   @Output() sidenavClose = new EventEmitter();
 
-  constructor() { }
+  constructor(public ui: UiService) { }
 
-  ngOnInit() { }
+  ngOnInit() {
+    this.ui.darkModeState.subscribe((isDark) => {
+      this.darkMode = isDark;
+    });
+  }
 
   public onSidenavClose = () => {
     this.sidenavClose.emit();
index 8baa556..b5aba66 100644 (file)
@@ -28,6 +28,7 @@ import { LoadingDialogService } from '../services/ui/loading-dialog.service';
 import { NotificationService } from '../services/ui/notification.service';
 import { RanControlConnectDialogComponent } from './ran-connection-dialog.component';
 import { RANControlDataSource } from './ran-control.datasource';
+import { UiService } from '../services/ui/ui.service';
 
 @Component({
   selector: 'rd-ran-control',
@@ -35,6 +36,9 @@ import { RANControlDataSource } from './ran-control.datasource';
   styleUrls: ['./ran-control.component.scss']
 })
 export class RanControlComponent implements OnInit {
+
+  darkMode: boolean;
+  panelClass: string = "";
   displayedColumns: string[] = ['nbId', 'nodeType', 'ranName', 'ranIp', 'ranPort', 'connectionStatus'];
   dataSource: RANControlDataSource;
 
@@ -43,18 +47,29 @@ export class RanControlComponent implements OnInit {
     private confirmDialogService: ConfirmDialogService,
     private notificationService: NotificationService,
     private loadingDialogService: LoadingDialogService,
-    public dialog: MatDialog) { }
+    public dialog: MatDialog,
+    public ui: UiService) { }
 
   ngOnInit() {
     this.dataSource = new RANControlDataSource(this.e2MgrSvc, this.notificationService);
     this.dataSource.loadTable();
+    this.ui.darkModeState.subscribe((isDark) => {
+      this.darkMode = isDark;
+    });
   }
 
   setupRANConnection() {
+    if (this.darkMode) {
+      this.panelClass = "dark-theme";
+    } else {
+      this.panelClass = "";
+    }
     const dialogRef = this.dialog.open(RanControlConnectDialogComponent, {
+      panelClass: this.panelClass,
       width: '450px'
     });
-    dialogRef.afterClosed().subscribe( (result: boolean) => {
+    dialogRef.afterClosed()
+      .subscribe((result: boolean) => {
       if (result) {
         this.dataSource.loadTable();
       }
index be30f56..7146b37 100644 (file)
@@ -18,9 +18,9 @@
   ========================LICENSE_END===================================
   -->
 <!-- Slide Menu-->
-<mat-drawer-container autosize>
-  <mat-drawer #drawer mode="push">
-  <section class="menu-header">
+<mat-drawer-container autosize >
+  <mat-drawer #drawer mode="push" [ngClass]="{'side-menu__dark': darkModeActive}">
+  <section class="menu-header" [ngClass]="{'menu-header__dark': darkModeActive}">
 
     <div class="left__section3Col" *ngIf="drawer.opened"  [ngClass]="{'menumargin-top': drawer.opened}">
       <svg (click)="drawer.toggle()" class="hamburger__icon" id="Menu_Burger_Icon" data-name="Menu Burger Icon"
@@ -55,8 +55,8 @@
         <span class="email__text">demo@o-ran-sc.org</span>
       </div>
     </section>
-    <section #sidenav class="menu-body">
-       <rd-sidenav-list></rd-sidenav-list>
+    <section #sidenav class="menu-body" >
+       <rd-sidenav-list ></rd-sidenav-list>
     </section>
     <section class="menu-footer">
 
   </header>
 
   <!-- Main Content -->
-  <main class="main__container">
-    <div class = main__container__body>
-      <div class="main-container__bg" [ngClass]="{'main-container__bg-dark': darkModeActive}"></div>
+  <main class="main__container" [ngClass]="{'main-container__bg-dark': darkModeActive}" >
+    <div class = main__container__body [ngClass]="{'dark-theme': darkModeActive}">
+      <div class="main-container__bg"></div>
       <router-outlet></router-outlet>
     </div>
   </main>
 
   <!-- Footer -->
-  <footer class="main__footer">
-    <div class="main-footer__bg" [ngClass]="{'main-footer__bg-dark': darkModeActive}">
+  <footer class="main__footer" [ngClass]="{'main-footer__bg-dark': darkModeActive}">
+    <div class="main-footer__bg">
       <rd-footer></rd-footer>
     </div>
   </footer>
index 93b3aef..19c13b5 100644 (file)
@@ -47,6 +47,10 @@ main {
     Slide Menu
 = = = = = = = = =
 */
+.side-menu__dark {
+  color: white;
+  background: gray;
+}
 
 .side-menu__container {
   position: fixed;
@@ -105,6 +109,9 @@ main {
 .slide-menu-active {
   transform: none;
 }
+.menu-header.menu-header__dark {
+  background: #2B244D;
+}
 
 .menu-header {
   background: linear-gradient(to right, #00FF9B, #5f84fb);
@@ -348,9 +355,7 @@ mat-drawer-content {
 */
 .main__footer {
   background: transparent;
-  margin: 10px;
   z-index: 100;
-  height: 35px;
 }
 
 .main__footer-dark {
index 4d1fc1f..b7eb0d4 100644 (file)
  * ========================LICENSE_END===================================
  */
 import { BrowserModule } from '@angular/platform-browser';
-// tslint:disable-next-line:max-line-length
-import {MatButtonModule, MatButtonToggleModule, MatCardModule, MatCheckboxModule,
-    MatDialogModule, MatExpansionModule, MatFormFieldModule, MatGridListModule,
-    MatIconModule, MatInputModule, MatListModule, MatPaginatorModule,
-    MatProgressSpinnerModule, MatSelectModule, MatSidenavModule, MatSliderModule,
-    MatSlideToggleModule, MatSnackBarModule, MatSortModule, MatTableModule,
-    MatTabsModule} from '@angular/material';
+import { MatButtonModule } from '@angular/material/button';
+import { MatButtonToggleModule } from '@angular/material/button-toggle';
+import { MatCardModule } from '@angular/material/card';
+import { MatCheckboxModule } from '@angular/material/checkbox';
+import { MatDialogModule } from '@angular/material/dialog';
+import { MatExpansionModule } from '@angular/material/expansion';
+import { MatFormFieldModule } from '@angular/material/form-field';
+import { MatGridListModule } from '@angular/material/grid-list';
+import { MatIconModule } from '@angular/material/icon';
+import { MatInputModule } from '@angular/material/input';
+import { MatListModule } from '@angular/material/list';
+import { MatPaginatorModule } from '@angular/material/paginator';
+import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
+import { MatSelectModule } from '@angular/material/select';
+import { MatSidenavModule } from '@angular/material/sidenav';
+import { MatSlideToggleModule } from '@angular/material/slide-toggle';
+import { MatSliderModule } from '@angular/material/slider';
+import { MatSnackBarModule } from '@angular/material/snack-bar';
+import { MatSortModule } from '@angular/material/sort';
+import { MatTableModule } from '@angular/material/table';
+import { MatTabsModule } from '@angular/material/tabs';
 import { BrowserAnimationsModule} from '@angular/platform-browser/animations';
 import { HttpClientModule } from '@angular/common/http';
 import { NgModule } from '@angular/core';
@@ -34,7 +48,6 @@ import { ChartsModule } from 'ng2-charts';
 import { MDBBootstrapModule } from 'angular-bootstrap-md';
 import { FormsModule, ReactiveFormsModule } from '@angular/forms';
 import { ToastrModule } from 'ngx-toastr';
-
 import { AcXappComponent } from './ac-xapp/ac-xapp.component';
 import { AddDashboardUserDialogComponent } from './user/add-dashboard-user-dialog/add-dashboard-user-dialog.component';
 import { AnrEditNcrDialogComponent } from './anr-xapp/anr-edit-ncr-dialog.component';
index 821a38b..297e673 100644 (file)
  */
 
 import { Injectable } from '@angular/core';
-import { MatDialog } from '@angular/material';
+import { MatDialog } from '@angular/material/dialog';
 import { ConfirmDialogComponent } from './../../ui/confirm-dialog/confirm-dialog.component';
+import { UiService } from './ui.service';
 
 @Injectable({
   providedIn: 'root'
 })
-export class ConfirmDialogService {
+export class ConfirmDialogService  {
 
-  constructor(private dialog: MatDialog) { }
+  darkMode: boolean;
+  panelClass: string = "";
+
+  constructor(private dialog: MatDialog,
+    public ui: UiService) { }
 
   openConfirmDialog(msg: string) {
+    this.ui.darkModeState.subscribe((isDark) => {
+      this.darkMode = isDark;
+    });
+    if (this.darkMode) {
+      this.panelClass = "dark-theme";
+    } else {
+      this.panelClass = "";
+    }
     return this.dialog.open(ConfirmDialogComponent, {
+      panelClass: this.panelClass,
       width: '480px',
       position: { top: '100px' },
       data: {
index 5811a92..a5a12f4 100644 (file)
@@ -21,18 +21,33 @@ import { ErrorDialogComponent } from '../../ui/error-dialog/error-dialog.compone
 import { HttpErrorResponse } from '@angular/common/http';
 import { MatDialog } from '@angular/material/dialog';
 import { Injectable } from '@angular/core';
+import { UiService } from './ui.service';
+
 @Injectable()
 export class ErrorDialogService {
 
+  darkMode: boolean;
+  panelClass: string = "";
   public errorMessage: string = '';
-  constructor(private dialog: MatDialog) { }
-  public displayError(error: string){
+
+  constructor(private dialog: MatDialog,
+    public ui: UiService) { }
+
+  public displayError(error: string) {
+    this.ui.darkModeState.subscribe((isDark) => {
+      this.darkMode = isDark;
+    });
+    if (this.darkMode) {
+      this.panelClass = "dark-theme";
+    } else {
+      this.panelClass = "";
+    }
     return this.dialog.open(ErrorDialogComponent, {
-            width: '400px',
-            position: { top: '100px' },
-            disableClose: true,
-            data: {'errorMessage': error}
-        });
+      panelClass: this.panelClass,
+      width: '400px',
+      position: { top: '100px' },
+      disableClose: true,
+      data: { 'errorMessage': error }
+    });
   }
 }
index 0a58a17..bf0830a 100644 (file)
 import { Injectable } from '@angular/core';
 import { MatDialog, MatDialogRef } from '@angular/material/dialog';
 import { LoadingDialogComponent } from './../../ui/loading-dialog/loading-dialog.component';
+import { UiService } from './ui.service';
 
 @Injectable({
   providedIn: 'root'
 })
 export class LoadingDialogService {
 
-  constructor(private dialog: MatDialog) { }
+  darkMode: boolean;
+  panelClass: string = "";
+
+  constructor(private dialog: MatDialog,
+    public ui: UiService) { }
 
   private loadingDialogRef: MatDialogRef<LoadingDialogComponent>;
 
   startLoading(msg: string) {
+    this.ui.darkModeState.subscribe((isDark) => {
+      this.darkMode = isDark;
+    });
+    if (this.darkMode) {
+      this.panelClass = "dark-theme";
+    } else {
+      this.panelClass = "";
+    }
     this.loadingDialogRef = this.dialog.open(LoadingDialogComponent, {
+      panelClass: this.panelClass,
       disableClose: true,
       width: '480px',
       position: { top: '100px' },
index e5a72de..3309871 100644 (file)
@@ -7,9 +7,9 @@
   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.
 <div class="add__card" routerLink="/catalog" [ngClass]="{'add__card-dark': darkMode}">
   <div class="header__container">
     <span class="card__title">xApp Catalog</span><br><br><br>
-    <div style="color: black; size: 1em; text-align: center">
-        <mat-icon>wifi</mat-icon> UE Event Collector</div>
-    <div style="color: black; size: 1em; text-align: center">
-        <mat-icon>check_box</mat-icon> Admission Control</div>
-    <div style="color: black; size: 1em; text-align: center">
-        <mat-icon>settings_input_antenna</mat-icon> ANR</div>
-    <div style="color: black; size: 1em; text-align: center">
-        <mat-icon>open_in_new</mat-icon> Deploy</div>
+    <div class="card_item">
+      <mat-icon>wifi</mat-icon> UE Event Collector
+    </div>
+    <div class="card_item">
+      <mat-icon>check_box</mat-icon> Admission Control
+    </div>
+    <div class="card_item">
+      <mat-icon>settings_input_antenna</mat-icon> ANR
+    </div>
+    <div class="card_item">
+      <mat-icon>open_in_new</mat-icon> Deploy
+    </div>
   </div>
   <div class="body__container">
-    <img src="../../../assets/intelligence.png" width="250px"/>
+    <img src="../../../assets/intelligence.png"  />
   </div>
 </div>
index 6db05d3..ad6ca9b 100644 (file)
   width: 10rem;
   margin-bottom: 1.15rem;
 }
+
+.card_item  {
+  font-size: 1em;
+}
+
+img {
+  width: 250px;
+}
\ No newline at end of file
index 51daeff..7e86ba0 100644 (file)
@@ -18,7 +18,6 @@
   ========================LICENSE_END===================================
   -->
 
-
   <div mat-dialog-title>
   </div>
   <div mat-dialog-content>
@@ -27,4 +26,4 @@
   <div mat-dialog-actions class="modal-footer justify-content-center">
     <button mat-button class="mat-raised-button" [mat-dialog-close]="false">Cancel</button>
     <button mat-button class="mat-raised-button mat-primary" [mat-dialog-close]="true">OK</button>
-  </div>
+  </div>
\ No newline at end of file
index bf964aa..3d99530 100644 (file)
@@ -19,7 +19,7 @@
  */
 
 import { Component, OnInit, Inject } from '@angular/core';
-import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material';
+import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
 
 @Component({
   selector: 'rd-confirm-dialog',
index b0923d8..7883214 100644 (file)
@@ -7,9 +7,9 @@
   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.
 <div class="add__card" routerLink="/control" [ngClass]="{'add__card-dark': darkMode}">
   <div class="header__container">
     <span class="card__title">RIC Control</span><br><br><br>
-    <div style="color: black; size: 1em; text-align: center">
-        <mat-icon>play_circle_outline</mat-icon> Start</div>
-    <div style="color: black; size: 1em; text-align: center">
-        <mat-icon>stop</mat-icon> Stop</div>
-    <div style="color: black; size: 1em; text-align: center">
-        <mat-icon>build</mat-icon>Config</div>
-
-
+    <div class="card_item">
+      <mat-icon>play_circle_outline</mat-icon> Start
+    </div>
+    <div class="card_item">
+      <mat-icon>stop</mat-icon> Stop
+    </div>
+    <div class="card_item">
+      <mat-icon>build</mat-icon>Config
+    </div>
   </div>
   <div class="body__container">
-    <img src="../../../assets/xAppControl.png" width="250px"/>
+    <img src="../../../assets/xAppControl.png"/>
   </div>
 </div>
index b816a3d..1636c0d 100644 (file)
@@ -18,7 +18,7 @@
  * ========================LICENSE_END===================================
  */
 import { Component, OnInit, Inject } from '@angular/core';
-import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material';
+import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
 
 export interface ErrorData {
   errorMessage: string;
index d2612c6..c78ae4e 100644 (file)
@@ -19,7 +19,7 @@
  */
 
 import { Component, OnInit, Inject } from '@angular/core';
-import { MAT_DIALOG_DATA } from '@angular/material';
+import { MAT_DIALOG_DATA } from '@angular/material/dialog';
 
 @Component({
   selector: 'rd-loading-dialog',
index 0c8dfd0..8b84259 100644 (file)
@@ -7,9 +7,9 @@
   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.
 <div class="add__card" routerLink="/stats" [ngClass]="{'add__card-dark': darkMode}">
   <div class="header__container">
     <span class="card__title">xApp Stats</span><br><br><br>
-    <div style="color: black; size: 1em; text-align: center">
-        <mat-icon>alarm</mat-icon> Control Loop Latency</div>
-    <div style="color: black; size: 1em; text-align: center">
-        <mat-icon>backup</mat-icon> Load generator</div>
-    <div style="color: black; size: 1em; text-align: center">
-        <mat-icon>timeline</mat-icon>Performance</div>
-    
+    <div class="card_item">
+      <mat-icon>alarm</mat-icon> Control Loop Latency
+    </div>
+    <div class="card_item">
+      <mat-icon>backup</mat-icon> Load generator
+    </div>
+    <div class="card_item">
+      <mat-icon>timeline</mat-icon>Performance
+    </div>
+
   </div>
   <div class="body__container">
-    <img src="../../../assets/latency.png" width="100%" height="100%"/>
+    <img src="../../../assets/latency.png"/>
   </div>
 </div>
index 6db05d3..52f156c 100644 (file)
   width: 10rem;
   margin-bottom: 1.15rem;
 }
+
+img {
+  width: 250px;
+}
+
+.card_item div {
+  font-size: 1em;
+}
index dfa7809..a3573c0 100644 (file)
@@ -27,6 +27,7 @@ import { NotificationService } from './../services/ui/notification.service';
 import { UserDataSource } from './user.datasource';
 import { AddDashboardUserDialogComponent } from './add-dashboard-user-dialog/add-dashboard-user-dialog.component';
 import { EditDashboardUserDialogComponent } from './edit-dashboard-user-dialog/edit-dashboard-user-dialog.component';
+import { UiService } from '../services/ui/ui.service';
 
 @Component({
   selector: 'rd-user',
@@ -36,6 +37,8 @@ import { EditDashboardUserDialogComponent } from './edit-dashboard-user-dialog/e
 
 export class UserComponent implements OnInit {
 
+  darkMode: boolean;
+  panelClass: string = "";
   displayedColumns: string[] = ['loginId', 'firstName', 'lastName', 'active', 'action'];
   dataSource: UserDataSource;
   @ViewChild(MatSort, {static: true}) sort: MatSort;
@@ -44,15 +47,25 @@ export class UserComponent implements OnInit {
     private dashboardSvc: DashboardService,
     private errorService: ErrorDialogService,
     private notificationService: NotificationService,
-    public dialog: MatDialog) { }
+    public dialog: MatDialog,
+    public ui: UiService) { }
 
   ngOnInit() {
     this.dataSource = new UserDataSource(this.dashboardSvc, this.sort, this.notificationService);
     this.dataSource.loadTable();
+    this.ui.darkModeState.subscribe((isDark) => {
+      this.darkMode = isDark;
+    });
   }
 
   editUser(user: EcompUser) {
+    if (this.darkMode) {
+      this.panelClass = "dark-theme"
+    } else {
+      this.panelClass = "";
+    }
     const dialogRef = this.dialog.open(EditDashboardUserDialogComponent, {
+      panelClass: this.panelClass,
       width: '450px',
       data: user
     });
@@ -67,7 +80,13 @@ export class UserComponent implements OnInit {
   }
 
   addUser() {
+    if (this.darkMode) {
+      this.panelClass = "dark-theme"
+    } else {
+      this.panelClass = "";
+    }
     const dialogRef = this.dialog.open(AddDashboardUserDialogComponent, {
+      panelClass: this.panelClass,
       width: '450px'
     });
     dialogRef.afterClosed().subscribe(result => {
index 09d1741..6b7805b 100644 (file)
@@ -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';
index fc7a29e..c74cf88 100644 (file)
@@ -1,7 +1,26 @@
-/* You can add global styles to this file, and also import other style files */
+/*-
+ * ========================LICENSE_START=================================
+ * O-RAN-SC
+ * %%
+ * Copyright (C) 2019 AT&T Intellectual Property
+ * %%
+ * 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===================================
+ */
 
 @import '~bootstrap/dist/css/bootstrap.min.css';
 @import '~@angular/material/prebuilt-themes/deeppurple-amber.css';
+@import './styles/dark-theme';
 
 /* for sidenav to take a whole page */
 html, body { 
@@ -22,4 +41,4 @@ html, body {
   color: #432c85;
   font-size: 25px;
   font-weight: 100;
-}
\ No newline at end of file
+}
diff --git a/webapp-frontend/src/styles/dark-theme.scss b/webapp-frontend/src/styles/dark-theme.scss
new file mode 100644 (file)
index 0000000..8cc0ece
--- /dev/null
@@ -0,0 +1,36 @@
+/*-
+ * ========================LICENSE_START=================================
+ * O-RAN-SC
+ * %%
+ * Copyright (C) 2019 AT&T Intellectual Property
+ * %%
+ * 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===================================
+ */
+
+@import '~@angular/material/theming';
+@include mat-core();
+
+.dark-theme {
+  color: white;
+  $dark-primary: mat-palette($mat-yellow);
+  $dark-accent: mat-palette($mat-amber, A400, A100, A700);
+  $dark-warn: mat-palette($mat-red);
+  $dark-theme: mat-dark-theme($dark-primary, $dark-accent, $dark-warn);
+
+  @include angular-material-theme($dark-theme);
+}
+
+.dark-theme .rd-global-page-title {
+  color:white;
+}
\ No newline at end of file