GUI2 Changed loading screen display to be a component
Change-Id: Id1592b498e6827ec4cd3544dec92e46f00e8d378
diff --git a/web/gui2/src/main/webapp/app/view/meter/meter/meter.component.html b/web/gui2/src/main/webapp/app/view/meter/meter/meter.component.html
index bfeb407..b5cb7a9 100644
--- a/web/gui2/src/main/webapp/app/view/meter/meter/meter.component.html
+++ b/web/gui2/src/main/webapp/app/view/meter/meter/meter.component.html
@@ -14,6 +14,7 @@
~ limitations under the License.
-->
<div id="ov-meter">
+ <onos-loading [theme]="'light'" [running]="loadingIconShown"></onos-loading>
<div class="tabular-header">
<h2> Meter for Device {{id}} ({{tableData.length}} Total )</h2>
@@ -98,4 +99,4 @@
</table>
</div>
</div>
-</div>
\ No newline at end of file
+</div>
diff --git a/web/gui2/src/main/webapp/app/view/meter/meter/meter.component.spec.ts b/web/gui2/src/main/webapp/app/view/meter/meter/meter.component.spec.ts
index 1337cb8..6a298cf 100644
--- a/web/gui2/src/main/webapp/app/view/meter/meter/meter.component.spec.ts
+++ b/web/gui2/src/main/webapp/app/view/meter/meter/meter.component.spec.ts
@@ -23,17 +23,13 @@
import {
FnService,
IconService,
- GlyphService,
IconComponent,
LionService,
- LoadingService,
LogService,
- NavService,
- MastService,
TableFilterPipe,
ThemeService,
UrlFnService,
- WebSocketService
+ WebSocketService, LoadingComponent
} from 'gui2-fw-lib';
import { of, Subject } from 'rxjs';
import { } from 'jasmine';
@@ -54,12 +50,6 @@
loadIconDef() { }
}
-class MockLoadingService {
- startAnim() { }
- stop() { }
- waiting() { }
-}
-
class MockThemeService { }
class MockUrlFnService { }
@@ -117,7 +107,12 @@
TestBed.configureTestingModule({
imports: [BrowserAnimationsModule, FormsModule, RouterTestingModule],
- declarations: [MeterComponent, IconComponent, TableFilterPipe],
+ declarations: [
+ MeterComponent,
+ IconComponent,
+ TableFilterPipe,
+ LoadingComponent
+ ],
providers: [
{ provide: FnService, useValue: fs },
{ provide: IconService, useClass: MockIconService },
@@ -130,7 +125,6 @@
};
})
},
- { provide: LoadingService, useClass: MockLoadingService },
{ provide: LogService, useValue: logSpy },
{ provide: ThemeService, useClass: MockThemeService },
{ provide: UrlFnService, useClass: MockUrlFnService },
diff --git a/web/gui2/src/main/webapp/app/view/meter/meter/meter.component.ts b/web/gui2/src/main/webapp/app/view/meter/meter/meter.component.ts
index b534c0a..914e062 100644
--- a/web/gui2/src/main/webapp/app/view/meter/meter/meter.component.ts
+++ b/web/gui2/src/main/webapp/app/view/meter/meter/meter.component.ts
@@ -16,7 +16,6 @@
import { Component, OnDestroy, OnInit } from '@angular/core';
import {
FnService,
- LoadingService,
LogService,
WebSocketService,
SortDir, TableBaseImpl, TableResponse
@@ -66,11 +65,10 @@
constructor(
protected fs: FnService,
protected log: LogService,
- protected ls: LoadingService,
protected as: ActivatedRoute,
protected wss: WebSocketService,
) {
- super(fs, ls, log, wss, 'meter');
+ super(fs, log, wss, 'meter');
this.as.queryParams.subscribe(params => {
this.id = params['devId'];
});