GUI2 Changed loading screen display to be a component

Change-Id: Id1592b498e6827ec4cd3544dec92e46f00e8d378
diff --git a/web/gui2/src/main/webapp/app/view/port/port/port.component.html b/web/gui2/src/main/webapp/app/view/port/port/port.component.html
index 8625d1a..32501b6 100644
--- a/web/gui2/src/main/webapp/app/view/port/port/port.component.html
+++ b/web/gui2/src/main/webapp/app/view/port/port/port.component.html
@@ -15,6 +15,7 @@
 -->
 <!-- Port partial HTML -->
 <div id="ov-port">
+    <onos-loading [theme]="'light'" [running]="loadingIconShown"></onos-loading>
     <div class="tabular-header">
         <h2>
             Ports for Device {{devId}} ({{tableData.length}} Total)
@@ -133,4 +134,4 @@
         </div>
         <onos-portdetails class="floatpanels" id="{{ selId }}" devId="{{devId}}" (closeEvent)="deselectRow($event)"></onos-portdetails>
     </div>
-</div>
\ No newline at end of file
+</div>
diff --git a/web/gui2/src/main/webapp/app/view/port/port/port.component.spec.ts b/web/gui2/src/main/webapp/app/view/port/port/port.component.spec.ts
index a53bd1c..0f230c4 100644
--- a/web/gui2/src/main/webapp/app/view/port/port/port.component.spec.ts
+++ b/web/gui2/src/main/webapp/app/view/port/port/port.component.spec.ts
@@ -24,14 +24,13 @@
     IconService,
     GlyphService,
     IconComponent,
-    LoadingService,
     LogService,
     NavService,
     MastService,
     PrefsService,
     TableFilterPipe,
     ThemeService,
-    WebSocketService
+    WebSocketService, LoadingComponent
 } from 'gui2-fw-lib';
 import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
 import { FormsModule } from '@angular/forms';
@@ -39,6 +38,7 @@
 import { DebugElement } from '@angular/core';
 import { By } from '@angular/platform-browser';
 import { PortDetailsComponent } from '../portdetails/portdetails.component';
+
 class MockActivatedRoute extends ActivatedRoute {
     constructor(params: Params) {
         super();
@@ -59,11 +59,6 @@
 
 class MockGlyphService { }
 
-class MockLoadingService {
-    startAnim() { }
-    stop() { }
-}
-
 class MockNavService { }
 
 class MockMastService { }
@@ -110,12 +105,17 @@
 
         TestBed.configureTestingModule({
             imports: [BrowserAnimationsModule, FormsModule, RouterTestingModule],
-            declarations: [PortComponent, IconComponent, TableFilterPipe, PortDetailsComponent],
+            declarations: [
+                PortComponent,
+                IconComponent,
+                TableFilterPipe,
+                PortDetailsComponent,
+                LoadingComponent
+            ],
             providers: [
                 { provide: FnService, useValue: fs },
                 { provide: IconService, useClass: MockIconService },
                 { provide: GlyphService, useClass: MockGlyphService },
-                { provide: LoadingService, useClass: MockLoadingService },
                 { provide: MastService, useClass: MockMastService },
                 { provide: NavService, useClass: MockNavService },
                 { provide: PrefsService, useClass: MockPrefsService },
diff --git a/web/gui2/src/main/webapp/app/view/port/port/port.component.ts b/web/gui2/src/main/webapp/app/view/port/port/port.component.ts
index 0dcd114..1c66459 100644
--- a/web/gui2/src/main/webapp/app/view/port/port/port.component.ts
+++ b/web/gui2/src/main/webapp/app/view/port/port/port.component.ts
@@ -16,7 +16,6 @@
 import { Component, OnDestroy, OnInit } from '@angular/core';
 import {
     FnService,
-    LoadingService,
     LogService,
     PrefsService,
     WebSocketService,
@@ -82,13 +81,12 @@
     toggleNZTip = 'Toggle non zero port statistics';
 
     constructor(protected fs: FnService,
-        protected ls: LoadingService,
         protected log: LogService,
         protected ar: ActivatedRoute,
         protected wss: WebSocketService,
         protected prefs: PrefsService,
     ) {
-        super(fs, ls, log, wss, 'port');
+        super(fs, log, wss, 'port');
         this.ar.queryParams.subscribe(params => {
             this.devId = params['devId'];
 
diff --git a/web/gui2/src/main/webapp/app/view/port/portdetails/portdetails.component.ts b/web/gui2/src/main/webapp/app/view/port/portdetails/portdetails.component.ts
index 0960cd6..76b628e 100644
--- a/web/gui2/src/main/webapp/app/view/port/portdetails/portdetails.component.ts
+++ b/web/gui2/src/main/webapp/app/view/port/portdetails/portdetails.component.ts
@@ -18,7 +18,6 @@
 import {
     FnService,
     IconService,
-    LoadingService,
     LogService,
     DetailsPanelBaseImpl,
     WebSocketService
@@ -60,12 +59,11 @@
     @Input() devId: string;
 
     constructor(protected fs: FnService,
-        protected ls: LoadingService,
         protected log: LogService,
         protected is: IconService,
         protected wss: WebSocketService
     ) {
-        super(fs, ls, log, wss, 'port');
+        super(fs, log, wss, 'port');
     }
 
     ngOnInit() {