GUI2 Changed loading screen display to be a component
Change-Id: Id1592b498e6827ec4cd3544dec92e46f00e8d378
diff --git a/web/gui2/src/main/webapp/app/view/cluster/cluster/cluster.component.html b/web/gui2/src/main/webapp/app/view/cluster/cluster/cluster.component.html
index 1bd61ec..1917d02 100644
--- a/web/gui2/src/main/webapp/app/view/cluster/cluster/cluster.component.html
+++ b/web/gui2/src/main/webapp/app/view/cluster/cluster/cluster.component.html
@@ -14,6 +14,7 @@
~ limitations under the License.
-->
<div id="ov-cluster">
+ <onos-loading [theme]="'light'" [running]="loadingIconShown"></onos-loading>
<div class="tabular-header">
<h2>
{{lionFn('title_cluster_nodes')}}
@@ -69,4 +70,4 @@
</table>
</div>
</div>
-</div>
\ No newline at end of file
+</div>
diff --git a/web/gui2/src/main/webapp/app/view/cluster/cluster/cluster.component.spec.ts b/web/gui2/src/main/webapp/app/view/cluster/cluster/cluster.component.spec.ts
index 4756b4e..6e976b4 100644
--- a/web/gui2/src/main/webapp/app/view/cluster/cluster/cluster.component.spec.ts
+++ b/web/gui2/src/main/webapp/app/view/cluster/cluster/cluster.component.spec.ts
@@ -19,7 +19,6 @@
import {
FnService,
- LoadingService,
LogService,
WebSocketService,
IconComponent,
@@ -27,7 +26,7 @@
GlyphService,
MastService,
NavService,
- ThemeService,
+ ThemeService, LoadingComponent,
} from 'gui2-fw-lib';
@@ -54,14 +53,6 @@
class MockGlyphService {
}
-class MockLoadingService {
- startAnim() {
- }
-
- stop() {
- }
-}
-
class MockNavService {
}
@@ -116,12 +107,11 @@
TestBed.configureTestingModule({
imports: [BrowserAnimationsModule, FormsModule, RouterTestingModule],
- declarations: [ClusterComponent, IconComponent],
+ declarations: [ClusterComponent, IconComponent, 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: LogService, useValue: logSpy},
diff --git a/web/gui2/src/main/webapp/app/view/cluster/cluster/cluster.component.ts b/web/gui2/src/main/webapp/app/view/cluster/cluster/cluster.component.ts
index f72b1d0..ee74446 100644
--- a/web/gui2/src/main/webapp/app/view/cluster/cluster/cluster.component.ts
+++ b/web/gui2/src/main/webapp/app/view/cluster/cluster/cluster.component.ts
@@ -16,7 +16,6 @@
import {Component, OnDestroy, OnInit} from '@angular/core';
import {
FnService,
- LoadingService,
LogService,
WebSocketService,
LionService,
@@ -59,12 +58,11 @@
constructor(
protected fs: FnService,
- protected ls: LoadingService,
protected log: LogService,
protected lion: LionService,
protected wss: WebSocketService,
) {
- super(fs, ls, log, wss, 'cluster');
+ super(fs, log, wss, 'cluster');
this.responseCallback = this.clusterResponseCb;
this.sortParams = {