GUI2 Changed loading screen display to be a component
Change-Id: Id1592b498e6827ec4cd3544dec92e46f00e8d378
diff --git a/web/gui2/src/main/webapp/app/view/settings/settings/settings.component.html b/web/gui2/src/main/webapp/app/view/settings/settings/settings.component.html
index 7f88b51..65cae49 100644
--- a/web/gui2/src/main/webapp/app/view/settings/settings/settings.component.html
+++ b/web/gui2/src/main/webapp/app/view/settings/settings/settings.component.html
@@ -14,6 +14,7 @@
~ limitations under the License.
-->
<div id="ov-settings">
+ <onos-loading [theme]="'light'" [running]="loadingIconShown"></onos-loading>
<div class="tabular-header">
<h2>Component Settings ({{tableData.length}} total)</h2>
<div class="ctrl-btns">
@@ -60,4 +61,4 @@
</div>
</div>
<onos-settingsdetails class="floatpanels" id="{{ selId }}" [settingsDetails]="settingsDetails" (closeEvent)="deselectRow($event)"></onos-settingsdetails>
-</div>
\ No newline at end of file
+</div>
diff --git a/web/gui2/src/main/webapp/app/view/settings/settings/settings.component.spec.ts b/web/gui2/src/main/webapp/app/view/settings/settings/settings.component.spec.ts
index 7e0d8de..5ae73ce 100644
--- a/web/gui2/src/main/webapp/app/view/settings/settings/settings.component.spec.ts
+++ b/web/gui2/src/main/webapp/app/view/settings/settings/settings.component.spec.ts
@@ -22,9 +22,8 @@
FnService,
IconService,
IconComponent,
- LoadingService,
LogService,
- WebSocketService
+ WebSocketService, LoadingComponent
} from 'gui2-fw-lib';
import { DebugElement } from '@angular/core';
import { By } from '@angular/platform-browser';
@@ -42,12 +41,6 @@
loadIconDef() { }
}
-class MockLoadingService {
- startAnim() { }
- stop() { }
- waiting() { }
-}
-
class MockWebSocketService {
createWebSocket() { }
isConnected() { return false; }
@@ -85,11 +78,15 @@
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [BrowserAnimationsModule],
- declarations: [SettingsComponent, IconComponent, SettingsDetailsComponent],
+ declarations: [
+ SettingsComponent,
+ IconComponent,
+ SettingsDetailsComponent,
+ LoadingComponent
+ ],
providers: [
{ provide: FnService, useValue: fs },
{ provide: IconService, useClass: MockIconService },
- { provide: LoadingService, useClass: MockLoadingService },
{ provide: LogService, useValue: logSpy },
{ provide: WebSocketService, useClass: MockWebSocketService },
]
diff --git a/web/gui2/src/main/webapp/app/view/settings/settings/settings.component.ts b/web/gui2/src/main/webapp/app/view/settings/settings/settings.component.ts
index a2bf6c4..b2444ad 100644
--- a/web/gui2/src/main/webapp/app/view/settings/settings/settings.component.ts
+++ b/web/gui2/src/main/webapp/app/view/settings/settings/settings.component.ts
@@ -16,7 +16,6 @@
import { Component, OnInit, OnDestroy } from '@angular/core';
import {
FnService,
- LoadingService,
LogService,
WebSocketService,
SortDir, TableBaseImpl, TableResponse
@@ -57,11 +56,10 @@
constructor(
protected fs: FnService,
- protected ls: LoadingService,
protected log: LogService,
protected wss: WebSocketService
) {
- super(fs, ls, log, wss, 'setting');
+ super(fs, log, wss, 'setting');
this.responseCallback = this.settingsResponseCb;
this.parentSelCb = this.rowSelection;