GUI2 Changed loading screen display to be a component
Change-Id: Id1592b498e6827ec4cd3544dec92e46f00e8d378
diff --git a/web/gui2/src/main/webapp/app/view/flow/flow/flow.component.html b/web/gui2/src/main/webapp/app/view/flow/flow/flow.component.html
index a1b23df..a0b97b7 100644
--- a/web/gui2/src/main/webapp/app/view/flow/flow/flow.component.html
+++ b/web/gui2/src/main/webapp/app/view/flow/flow/flow.component.html
@@ -14,6 +14,7 @@
~ limitations under the License.
-->
<div id="ov-flow" xmlns="http://www.w3.org/1999/html">
+ <onos-loading [theme]="'light'" [running]="loadingIconShown"></onos-loading>
<div class="tabular-header">
<h2>
{{lionFn('title_flows')}} {{id}} ({{ tableData.length }} {{ lionFn('total') }})
@@ -133,4 +134,4 @@
</div>
</div>
<onos-flowdetails class="floatpanels" flowId="{{ selId }}" appId="{{ selRowAppId }}" (closeEvent)="deselectRow($event)"></onos-flowdetails>
-</div>
\ No newline at end of file
+</div>
diff --git a/web/gui2/src/main/webapp/app/view/flow/flow/flow.component.spec.ts b/web/gui2/src/main/webapp/app/view/flow/flow/flow.component.spec.ts
index e049fcf..a758553 100644
--- a/web/gui2/src/main/webapp/app/view/flow/flow/flow.component.spec.ts
+++ b/web/gui2/src/main/webapp/app/view/flow/flow/flow.component.spec.ts
@@ -24,13 +24,12 @@
GlyphService,
IconComponent,
LionService,
- LoadingService,
LogService,
NavService,
MastService,
TableFilterPipe,
ThemeService,
- WebSocketService
+ WebSocketService, LoadingComponent
} from 'gui2-fw-lib';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
@@ -53,11 +52,6 @@
class MockGlyphService { }
-class MockLoadingService {
- startAnim() { }
- stop() { }
-}
-
class MockNavService { }
class MockMastService { }
@@ -111,7 +105,13 @@
TestBed.configureTestingModule({
imports: [BrowserAnimationsModule, FormsModule, RouterTestingModule],
- declarations: [FlowComponent, IconComponent, TableFilterPipe, FlowDetailsComponent],
+ declarations: [
+ FlowComponent,
+ IconComponent,
+ TableFilterPipe,
+ FlowDetailsComponent,
+ LoadingComponent
+ ],
providers: [
{ provide: FnService, useValue: fs },
{ provide: IconService, useClass: MockIconService },
@@ -125,7 +125,6 @@
};
})
},
- { provide: LoadingService, useClass: MockLoadingService },
{ provide: MastService, useClass: MockMastService },
{ provide: NavService, useClass: MockNavService },
{ provide: LogService, useValue: logSpy },
diff --git a/web/gui2/src/main/webapp/app/view/flow/flow/flow.component.ts b/web/gui2/src/main/webapp/app/view/flow/flow/flow.component.ts
index 7a6c892..a54e0f6 100644
--- a/web/gui2/src/main/webapp/app/view/flow/flow/flow.component.ts
+++ b/web/gui2/src/main/webapp/app/view/flow/flow/flow.component.ts
@@ -17,7 +17,6 @@
import { Component, OnDestroy, OnInit } from '@angular/core';
import {
FnService,
- LoadingService,
LogService,
WebSocketService,
LionService,
@@ -70,13 +69,12 @@
pipeconfTip: string;
constructor(protected fs: FnService,
- protected ls: LoadingService,
protected log: LogService,
protected as: ActivatedRoute,
protected wss: WebSocketService,
protected lion: LionService,
) {
- super(fs, ls, log, wss, 'flow');
+ super(fs, log, wss, 'flow');
this.as.queryParams.subscribe(params => {
this.id = params['devId'];