{{ toolTipDisp }}
+ + + + {{toolTipDisp}} +
- |
{{lionFn('title')}}
- |
{{lionFn('app_id')}}
- |
{{lionFn('version')}}
- |
{{lionFn('category')}}
- |
{{lionFn('origin')}}
- |
---|
{{annots.no_rows_msg}}
@@ -137,6 +137,6 @@
The advantage in 2) is that panel can be animated in and out, as it is not
killed every time the selection changes.
-->
-
-
diff --git a/web/gui2/src/main/webapp/app/view/device/device.module.ts b/web/gui2/src/main/webapp/app/view/device/device.module.ts
index 7840292f93..9ad545613b 100644
--- a/web/gui2/src/main/webapp/app/view/device/device.module.ts
+++ b/web/gui2/src/main/webapp/app/view/device/device.module.ts
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-present Open Networking Foundation
+ * Copyright 2018-present Open Networking Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,22 +16,26 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { DeviceRoutingModule } from './device-routing.module';
-import { DeviceComponent } from './device.component';
-import { DeviceDetailsPanelDirective } from './devicedetailspanel.directive';
+import { DeviceComponent } from './device/device.component';
import { SvgModule } from '../../fw/svg/svg.module';
+import { WidgetModule } from '../../fw/widget/widget.module';
+import { FormsModule } from '@angular/forms';
+import { DeviceDetailsComponent } from './devicedetails/devicedetails.component';
/**
* ONOS GUI -- Device View Module
*/
@NgModule({
- imports: [
- CommonModule,
- DeviceRoutingModule,
- SvgModule
- ],
- declarations: [
- DeviceComponent,
- DeviceDetailsPanelDirective
- ]
+ imports: [
+ CommonModule,
+ DeviceRoutingModule,
+ SvgModule,
+ WidgetModule,
+ FormsModule
+ ],
+ declarations: [
+ DeviceComponent,
+ DeviceDetailsComponent
+ ]
})
export class DeviceModule { }
diff --git a/web/gui2/src/main/webapp/app/view/device/device.component.css b/web/gui2/src/main/webapp/app/view/device/device/device.component.css
similarity index 97%
rename from web/gui2/src/main/webapp/app/view/device/device.component.css
rename to web/gui2/src/main/webapp/app/view/device/device/device.component.css
index 4d8454df54..5ed16e8219 100644
--- a/web/gui2/src/main/webapp/app/view/device/device.component.css
+++ b/web/gui2/src/main/webapp/app/view/device/device/device.component.css
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-present Open Networking Foundation
+ * Copyright 2018-present Open Networking Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/web/gui2/src/main/webapp/app/view/device/device/device.component.html b/web/gui2/src/main/webapp/app/view/device/device/device.component.html
new file mode 100644
index 0000000000..7a22076eae
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/view/device/device/device.component.html
@@ -0,0 +1,121 @@
+
+
-
-
- Devices ({{ tableData.length }} total)-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
TODO (21 Jun 18): Add in: -
+
\ No newline at end of file
diff --git a/web/gui2/src/main/webapp/app/view/device/device.component.spec.ts b/web/gui2/src/main/webapp/app/view/device/device/device.component.spec.ts
similarity index 55%
rename from web/gui2/src/main/webapp/app/view/device/device.component.spec.ts
rename to web/gui2/src/main/webapp/app/view/device/device/device.component.spec.ts
index 066a636e58..207dde9399 100644
--- a/web/gui2/src/main/webapp/app/view/device/device.component.spec.ts
+++ b/web/gui2/src/main/webapp/app/view/device/device/device.component.spec.ts
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-present Open Networking Foundation
+ * Copyright 2018-present Open Networking Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,21 +17,26 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ActivatedRoute, Params } from '@angular/router';
import { DebugElement } from '@angular/core';
import { By } from '@angular/platform-browser';
-import { LogService } from '../../log.service';
+import { LogService } from '../../../log.service';
import { DeviceComponent } from './device.component';
+import { } from 'jasmine';
-import { FnService, WindowSize } from '../../fw/util/fn.service';
-import { IconService } from '../../fw/svg/icon.service';
-import { GlyphService } from '../../fw/svg/glyph.service';
-import { IconComponent } from '../../fw/svg/icon/icon.component';
-import { KeyService } from '../../fw/util/key.service';
-import { LoadingService } from '../../fw/layer/loading.service';
-import { NavService } from '../../fw/nav/nav.service';
-import { MastService } from '../../fw/mast/mast.service';
-import { SvgUtilService } from '../../fw/svg/svgutil.service';
-import { ThemeService } from '../../fw/util/theme.service';
-import { WebSocketService } from '../../fw/remote/websocket.service';
+import { FnService } from '../../../fw/util/fn.service';
+import { IconService } from '../../../fw/svg/icon.service';
+import { GlyphService } from '../../../fw/svg/glyph.service';
+import { IconComponent } from '../../../fw/svg/icon/icon.component';
+import { KeyService } from '../../../fw/util/key.service';
+import { LoadingService } from '../../../fw/layer/loading.service';
+import { NavService } from '../../../fw/nav/nav.service';
+import { MastService } from '../../../fw/mast/mast.service';
+import { TableFilterPipe } from '../../../fw/widget/tablefilter.pipe';
+import { ThemeService } from '../../../fw/util/theme.service';
+import { WebSocketService } from '../../../fw/remote/websocket.service';
import { of } from 'rxjs';
+import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
+import { FormsModule } from '@angular/forms';
+import { DeviceDetailsComponent } from './../devicedetails/devicedetails.component';
+import { RouterTestingModule } from '@angular/router/testing';
class MockActivatedRoute extends ActivatedRoute {
constructor(params: Params) {
@@ -40,38 +45,30 @@ class MockActivatedRoute extends ActivatedRoute {
}
}
-class MockDetailsPanelService {}
-
-class MockFnService {}
-
class MockIconService {
- loadIconDef() {}
+ loadIconDef() { }
}
-class MockGlyphService {}
+class MockGlyphService { }
-class MockKeyService {}
+class MockKeyService { }
class MockLoadingService {
- startAnim() {}
- stop() {}
+ startAnim() { }
+ stop() { }
}
-class MockNavService {}
+class MockNavService { }
-class MockMastService {}
+class MockMastService { }
-class MockTableBuilderService {}
-
-class MockTableDetailService {}
-
-class MockThemeService {}
+class MockThemeService { }
class MockWebSocketService {
- createWebSocket() {}
+ createWebSocket() { }
isConnected() { return false; }
- unbindHandlers() {}
- bindHandlers() {}
+ unbindHandlers() { }
+ bindHandlers() { }
}
/**
@@ -87,15 +84,15 @@ describe('DeviceComponent', () => {
beforeEach(async(() => {
const logSpy = jasmine.createSpyObj('LogService', ['info', 'debug', 'warn', 'error']);
- ar = new MockActivatedRoute({'debug': 'txrx'});
+ ar = new MockActivatedRoute({ 'debug': 'txrx' });
windowMock =
+
+
+ Devices ({{ tableData.length }} total)+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/web/gui2/src/main/webapp/app/view/device/devicedetails/devicedetails.component.spec.ts b/web/gui2/src/main/webapp/app/view/device/devicedetails/devicedetails.component.spec.ts
new file mode 100644
index 0000000000..5daa2efc20
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/view/device/devicedetails/devicedetails.component.spec.ts
@@ -0,0 +1,142 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import { DeviceDetailsComponent } from './devicedetails.component';
+import { ActivatedRoute, Params } from '@angular/router';
+import { of } from 'rxjs/index';
+import { FnService } from '../../../fw/util/fn.service';
+import { LogService } from '../../../log.service';
+import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
+import { IconService } from '../../../fw/svg/icon.service';
+import { WebSocketService } from '../../../fw/remote/websocket.service';
+import { DebugElement } from '@angular/core';
+import { By } from '@angular/platform-browser';
+import { } from 'jasmine';
+import { IconComponent } from '../../../fw/svg/icon/icon.component';
+
+class MockActivatedRoute extends ActivatedRoute {
+ constructor(params: Params) {
+ super();
+ this.queryParams = of(params);
+ }
+}
+
+class MockIconService {
+ classes = 'active-close';
+ loadIconDef() { }
+}
+
+class MockWebSocketService {
+ createWebSocket() { }
+ isConnected() { return false; }
+ unbindHandlers() { }
+ bindHandlers() { }
+}
+
+describe('DeviceDetailsComponent', () => {
+ let fs: FnService;
+ let ar: MockActivatedRoute;
+ let windowMock: Window;
+ let logServiceSpy: jasmine.SpyObj
+
+
+
+
+
+
+ {{detailsData.id}}+
+
+
+
+
+
+
+
+
+
+
+ Ports+
+
\ No newline at end of file
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
new file mode 100644
index 0000000000..e6ed12a918
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/view/flow/flow/flow.component.spec.ts
@@ -0,0 +1,183 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { FlowComponent } from './flow.component';
+import { ActivatedRoute, Params } from '@angular/router';
+import { of } from 'rxjs/index';
+import { LogService } from '../../../log.service';
+import { FnService } from '../../../fw/util/fn.service';
+import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
+import { FormsModule } from '@angular/forms';
+import { RouterTestingModule } from '@angular/router/testing';
+import { TableFilterPipe } from '../../../fw/widget/tablefilter.pipe';
+import { IconComponent } from '../../../fw/svg/icon/icon.component';
+import { IconService } from '../../../fw/svg/icon.service';
+import { GlyphService } from '../../../fw/svg/glyph.service';
+import { KeyService } from '../../../fw/util/key.service';
+import { LoadingService } from '../../../fw/layer/loading.service';
+import { MastService } from '../../../fw/mast/mast.service';
+import { NavService } from '../../../fw/nav/nav.service';
+import { ThemeService } from '../../../fw/util/theme.service';
+import { WebSocketService } from '../../../fw/remote/websocket.service';
+import { DebugElement } from '@angular/core';
+import { By } from '@angular/platform-browser';
+import { LionService } from '../../../fw/util/lion.service';
+import { FlowDetailsComponent } from '../flowdetails/flowdetails/flowdetails.component';
+
+class MockActivatedRoute extends ActivatedRoute {
+ constructor(params: Params) {
+ super();
+ this.queryParams = of(params);
+ }
+}
+
+class MockIconService {
+ loadIconDef() { }
+}
+
+class MockGlyphService { }
+
+class MockKeyService { }
+
+class MockLoadingService {
+ startAnim() { }
+ stop() { }
+}
+
+class MockNavService { }
+
+class MockMastService { }
+
+class MockThemeService { }
+
+class MockWebSocketService {
+ createWebSocket() { }
+ isConnected() { return false; }
+ unbindHandlers() { }
+ bindHandlers() { }
+}
+
+/**
+ * ONOS GUI -- Flow View Module - Unit Tests
+ */
+
+describe('FlowComponent', () => {
+ let fs: FnService;
+ let ar: MockActivatedRoute;
+ let windowMock: Window;
+ let logServiceSpy: jasmine.SpyObj
+
+
+ + {{lionFn('title_flows')}} {{id}} ({{ tableData.length }} {{ lionFn('total') }}) ++
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/web/gui2/src/main/webapp/app/view/flow/flowdetails/flowdetails/flowdetails.component.spec.ts b/web/gui2/src/main/webapp/app/view/flow/flowdetails/flowdetails/flowdetails.component.spec.ts
new file mode 100644
index 0000000000..8bbf482445
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/view/flow/flowdetails/flowdetails/flowdetails.component.spec.ts
@@ -0,0 +1,140 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { FlowDetailsComponent } from './flowdetails.component';
+import { ActivatedRoute, Params } from '@angular/router';
+import { of } from 'rxjs';
+import { FnService } from '../../../../fw/util/fn.service';
+import { LogService } from '../../../../log.service';
+import { IconService } from '../../../../fw/svg/icon.service';
+import { WebSocketService } from '../../../../fw/remote/websocket.service';
+import { IconComponent } from '../../../../fw/svg/icon/icon.component';
+import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
+import { DebugElement } from '@angular/core';
+import { By } from '@angular/platform-browser';
+
+class MockActivatedRoute extends ActivatedRoute {
+ constructor(params: Params) {
+ super();
+ this.queryParams = of(params);
+ }
+}
+
+class MockIconService {
+ classes = 'active-close';
+ loadIconDef() { }
+}
+
+class MockWebSocketService {
+ createWebSocket() { }
+ isConnected() { return false; }
+ unbindHandlers() { }
+ bindHandlers() { }
+}
+
+describe('FlowDetailsComponent', () => {
+ let fs: FnService;
+ let ar: MockActivatedRoute;
+ let windowMock: Window;
+ let logServiceSpy: jasmine.SpyObj
+
+
+
+
+
+
+ {{ flowId }}+
+
+
+
+
+ {{ lionFn('selector') }}+
+
+
+ {{ lionFn('treatment') }}+
+
+
+
\ No newline at end of file
diff --git a/web/gui2/src/main/webapp/app/view/group/group/group.component.spec.ts b/web/gui2/src/main/webapp/app/view/group/group/group.component.spec.ts
new file mode 100644
index 0000000000..bcf0ca2007
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/view/group/group/group.component.spec.ts
@@ -0,0 +1,175 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { GroupComponent } from './group.component';
+import { LogService } from '../../../log.service';
+import { ConsoleLoggerService } from '../../../consolelogger.service';
+import { IconComponent } from '../../../fw/svg/icon/icon.component';
+import { DialogService } from '../../../fw/layer/dialog.service';
+import { FnService } from '../../../fw/util/fn.service';
+import { IconService } from '../../../fw/svg/icon.service';
+import { KeyService } from '../../../fw/util/key.service';
+import { LoadingService } from '../../../fw/layer/loading.service';
+import { ThemeService } from '../../../fw/util/theme.service';
+import { UrlFnService } from '../../../fw/remote/urlfn.service';
+import { WebSocketService } from '../../../fw/remote/websocket.service';
+import { ActivatedRoute, Params } from '@angular/router';
+import { of } from 'rxjs';
+import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
+import { FormsModule } from '@angular/forms';
+import { TableFilterPipe } from '../../../fw/widget/tablefilter.pipe';
+import { RouterTestingModule } from '@angular/router/testing';
+import { DebugElement } from '@angular/core';
+import { By } from '@angular/platform-browser';
+
+class MockActivatedRoute extends ActivatedRoute {
+ constructor(params: Params) {
+ super();
+ this.queryParams = of(params);
+ }
+}
+
+class MockDialogService { }
+
+class MockFnService { }
+
+class MockIconService {
+ loadIconDef() { }
+}
+
+class MockKeyService { }
+
+class MockLoadingService {
+ startAnim() { }
+ stop() { }
+ waiting() { }
+}
+
+class MockThemeService { }
+
+class MockUrlFnService { }
+
+class MockWebSocketService {
+ createWebSocket() { }
+ isConnected() { return false; }
+ unbindHandlers() { }
+ bindHandlers() { }
+}
+
+/**
+ * ONOS GUI -- Group View Module - Unit Tests
+ */
+describe('GroupComponent', () => {
+ let component: GroupComponent;
+ let fixture: ComponentFixture
+
+
+ + Groups for Device {{id}} ({{tableData.length}} total) ++
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/web/gui2/src/main/webapp/app/view/host/host/host.component.spec.ts b/web/gui2/src/main/webapp/app/view/host/host/host.component.spec.ts
new file mode 100644
index 0000000000..6d915c737f
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/view/host/host/host.component.spec.ts
@@ -0,0 +1,176 @@
+/*
+* Copyright 2018-present Open Networking Foundation
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import { ActivatedRoute, Params } from '@angular/router';
+import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
+import { FormsModule } from '@angular/forms';
+import { DebugElement } from '@angular/core';
+import { By } from '@angular/platform-browser';
+
+import { LogService } from '../../../log.service';
+import { HostComponent } from './host.component';
+import { HostDetailsComponent } from '../hostdetails/hostdetails.component';
+import { DialogService } from '../../../fw/layer/dialog.service';
+import { FnService } from '../../../fw/util/fn.service';
+import { IconComponent } from '../../../fw/svg/icon/icon.component';
+import { IconService } from '../../../fw/svg/icon.service';
+import { KeyService } from '../../../fw/util/key.service';
+import { LoadingService } from '../../../fw/layer/loading.service';
+import { ThemeService } from '../../../fw/util/theme.service';
+import { TableFilterPipe } from '../../../fw/widget/tablefilter.pipe';
+import { UrlFnService } from '../../../fw/remote/urlfn.service';
+import { WebSocketService } from '../../../fw/remote/websocket.service';
+import { of } from 'rxjs';
+import { } from 'jasmine';
+
+class MockActivatedRoute extends ActivatedRoute {
+ constructor(params: Params) {
+ super();
+ this.queryParams = of(params);
+ }
+}
+
+class MockDialogService { }
+
+class MockFnService { }
+
+class MockIconService {
+ loadIconDef() { }
+}
+
+class MockKeyService { }
+
+class MockLoadingService {
+ startAnim() { }
+ stop() { }
+ waiting() { }
+}
+
+class MockThemeService { }
+
+class MockUrlFnService { }
+
+class MockWebSocketService {
+ createWebSocket() { }
+ isConnected() { return false; }
+ unbindHandlers() { }
+ bindHandlers() { }
+}
+
+
+describe('HostComponent', () => {
+
+ let fs: FnService;
+ let ar: MockActivatedRoute;
+ let windowMock: Window;
+ let logServiceSpy: jasmine.SpyObj
+
+ Hosts ({{tableData.length}} total)+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/web/gui2/src/main/webapp/app/view/host/hostdetails/hostdetails.component.spec.ts b/web/gui2/src/main/webapp/app/view/host/hostdetails/hostdetails.component.spec.ts
new file mode 100644
index 0000000000..0ce1ba09bf
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/view/host/hostdetails/hostdetails.component.spec.ts
@@ -0,0 +1,167 @@
+/*
+* Copyright 2018-present Open Networking Foundation
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import { ActivatedRoute, Params } from '@angular/router';
+import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
+import { DebugElement } from '@angular/core';
+import { By } from '@angular/platform-browser';
+
+import { LogService } from '../../../log.service';
+import { FnService } from '../../../../app/fw/util/fn.service';
+import { IconComponent } from '../../../../app/fw/svg/icon/icon.component';
+import { IconService } from '../../../../app/fw/svg/icon.service';
+import { UrlFnService } from '../../../fw/remote/urlfn.service';
+import { WebSocketService } from '../../../fw/remote/websocket.service';
+import { of } from 'rxjs';
+import { } from 'jasmine';
+
+import { HostDetailsComponent } from './hostdetails.component';
+
+class MockActivatedRoute extends ActivatedRoute {
+ constructor(params: Params) {
+ super();
+ this.queryParams = of(params);
+ }
+}
+
+class MockFnService { }
+
+class MockIconService {
+ loadIconDef() { }
+}
+
+class MockUrlFnService { }
+
+class MockWebSocketService {
+ createWebSocket() { }
+ isConnected() { return false; }
+ unbindHandlers() { }
+ bindHandlers() { }
+}
+
+/**
+ * ONOS GUI -- Host Detail Panel View -- Unit Tests
+ */
+
+describe('HostdetailsComponent', () => {
+ let fs: FnService;
+ let ar: MockActivatedRoute;
+ let windowMock: Window;
+ let logServiceSpy: jasmine.SpyObj
+
+
+
+
+ {{detailsData.name}}+
+
+
+
+
+
+
+
+
+ + +
+
\ No newline at end of file
diff --git a/web/gui2/src/main/webapp/app/view/link/link/link.component.spec.ts b/web/gui2/src/main/webapp/app/view/link/link/link.component.spec.ts
new file mode 100644
index 0000000000..699e535015
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/view/link/link/link.component.spec.ts
@@ -0,0 +1,143 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the 'License');
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an 'AS IS' BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { LinkComponent } from './link.component';
+import { ActivatedRoute, Params } from '@angular/router';
+import { of } from 'rxjs';
+import { FnService } from '../../../fw/util/fn.service';
+import { LogService } from '../../../log.service';
+import { IconComponent } from '../../../fw/svg/icon/icon.component';
+import { IconService } from '../../../fw/svg/icon.service';
+import { LoadingService } from '../../../fw/layer/loading.service';
+import { WebSocketService } from '../../../fw/remote/websocket.service';
+import { DebugElement } from '@angular/core';
+import { By } from '@angular/platform-browser';
+
+class MockActivatedRoute extends ActivatedRoute {
+ constructor(params: Params) {
+ super();
+ this.queryParams = of(params);
+ }
+}
+
+class MockIconService {
+ loadIconDef() { }
+}
+
+class MockLoadingService {
+ startAnim() { }
+ stop() { }
+ waiting() { }
+}
+
+class MockWebSocketService {
+ createWebSocket() { }
+ isConnected() { return false; }
+ unbindHandlers() { }
+ bindHandlers() { }
+}
+
+/**
+ * ONOS GUI -- Link View Module - Unit Tests
+ */
+describe('LinkComponent', () => {
+
+ let fs: FnService;
+ let ar: MockActivatedRoute;
+ let windowMock: Window;
+ let logServiceSpy: jasmine.SpyObj
+
+ Links ({{tableData.length}} total)+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
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
new file mode 100644
index 0000000000..e17ff50d1e
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/view/meter/meter/meter.component.spec.ts
@@ -0,0 +1,196 @@
+/*
+* Copyright 2018-present Open Networking Foundation
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import { ActivatedRoute, Params } from '@angular/router';
+import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
+import { FormsModule } from '@angular/forms';
+import { DebugElement } from '@angular/core';
+import { By } from '@angular/platform-browser';
+import { MeterComponent } from './meter.component';
+import { LogService } from '../../../log.service';
+import { DialogService } from '../../../fw/layer/dialog.service';
+import { FnService } from '../../../fw/util/fn.service';
+import { IconComponent } from '../../../fw/svg/icon/icon.component';
+import { IconService } from '../../../fw/svg/icon.service';
+import { KeyService } from '../../../fw/util/key.service';
+import { LionService } from '../../../fw/util/lion.service';
+import { LoadingService } from '../../../fw/layer/loading.service';
+import { ThemeService } from '../../../fw/util/theme.service';
+import { TableFilterPipe } from '../../../fw/widget/tablefilter.pipe';
+import { UrlFnService } from '../../../fw/remote/urlfn.service';
+import { WebSocketService } from '../../../fw/remote/websocket.service';
+import { of, Subject } from 'rxjs';
+import { } from 'jasmine';
+import { RouterTestingModule } from '@angular/router/testing';
+
+
+class MockActivatedRoute extends ActivatedRoute {
+ constructor(params: Params) {
+ super();
+ this.queryParams = of(params);
+ }
+}
+
+
+class MockDialogService { }
+
+class MockFnService { }
+
+class MockIconService {
+ loadIconDef() { }
+}
+
+class MockKeyService { }
+
+class MockLoadingService {
+ startAnim() { }
+ stop() { }
+ waiting() { }
+}
+
+class MockThemeService { }
+
+class MockUrlFnService { }
+
+class MockWebSocketService {
+ createWebSocket() { }
+ isConnected() { return false; }
+ unbindHandlers() { }
+ bindHandlers() { }
+}
+
+
+/**
+ * ONOS GUI -- Meter Panel View -- Unit Tests
+ */
+
+describe('MeterComponent', () => {
+
+ let fs: FnService;
+ let ar: MockActivatedRoute;
+ let windowMock: Window;
+ let logServiceSpy: jasmine.SpyObj
+
+ Meter for Device {{id}} ({{tableData.length}} Total )+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
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
new file mode 100644
index 0000000000..233b34ef34
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/view/port/port/port.component.spec.ts
@@ -0,0 +1,175 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { PortComponent } from './port.component';
+import { ActivatedRoute, Params } from '@angular/router';
+import { of } from 'rxjs/index';
+import { FnService } from '../../../fw/util/fn.service';
+import { LogService } from '../../../log.service';
+import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
+import { FormsModule } from '@angular/forms';
+import { RouterTestingModule } from '@angular/router/testing';
+import { IconComponent } from '../../../fw/svg/icon/icon.component';
+import { TableFilterPipe } from '../../../fw/widget/tablefilter.pipe';
+import { GlyphService } from '../../../fw/svg/glyph.service';
+import { IconService } from '../../../fw/svg/icon.service';
+import { KeyService } from '../../../fw/util/key.service';
+import { LoadingService } from '../../../fw/layer/loading.service';
+import { MastService } from '../../../fw/mast/mast.service';
+import { NavService } from '../../../fw/nav/nav.service';
+import { ThemeService } from '../../../fw/util/theme.service';
+import { WebSocketService } from '../../../fw/remote/websocket.service';
+import { DebugElement } from '@angular/core';
+import { By } from '@angular/platform-browser';
+import { PortDetailsComponent } from '../portdetails/portdetails.component';
+import { PrefsService } from '../../../fw/util/prefs.service';
+class MockActivatedRoute extends ActivatedRoute {
+ constructor(params: Params) {
+ super();
+ this.queryParams = of(params);
+ }
+}
+
+class MockIconService {
+ loadIconDef() { }
+}
+
+class MockPrefsService {
+ setPrefs() { }
+ getPrefs() { }
+ asNumbers() { }
+ updatePrefs() { }
+}
+
+class MockGlyphService { }
+
+class MockKeyService { }
+
+class MockLoadingService {
+ startAnim() { }
+ stop() { }
+}
+
+class MockNavService { }
+
+class MockMastService { }
+
+class MockThemeService { }
+
+class MockWebSocketService {
+ createWebSocket() { }
+ isConnected() { return false; }
+ unbindHandlers() { }
+ bindHandlers() { }
+ sendEvent() { }
+}
+
+/**
+ * ONOS GUI -- Flow View Module - Unit Tests
+ */
+
+
+describe('PortComponent', () => {
+ let fs: FnService;
+ let ar: MockActivatedRoute;
+ let windowMock: Window;
+ let logServiceSpy: jasmine.SpyObj
+
+
+ + Ports for Device {{devId}} ({{tableData.length}} Total) ++ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/web/gui2/src/main/webapp/app/view/port/portdetails/portdetails.component.spec.ts b/web/gui2/src/main/webapp/app/view/port/portdetails/portdetails.component.spec.ts
new file mode 100644
index 0000000000..18dc37bb9d
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/view/port/portdetails/portdetails.component.spec.ts
@@ -0,0 +1,123 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { PortDetailsComponent } from './portdetails.component';
+import { ActivatedRoute, Params } from '@angular/router';
+import { of } from 'rxjs/index';
+import { LogService } from '../../../log.service';
+import { FnService } from '../../../fw/util/fn.service';
+import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
+import { IconComponent } from '../../../fw/svg/icon/icon.component';
+import { IconService } from '../../../fw/svg/icon.service';
+import { WebSocketService } from '../../../fw/remote/websocket.service';
+import { DebugElement } from '@angular/core';
+import { By } from '@angular/platform-browser';
+
+class MockActivatedRoute extends ActivatedRoute {
+ constructor(params: Params) {
+ super();
+ this.queryParams = of(params);
+ }
+}
+
+class MockIconService {
+ classes = 'active-close';
+ loadIconDef() { }
+}
+
+class MockWebSocketService {
+ createWebSocket() { }
+ isConnected() { return false; }
+ unbindHandlers() { }
+ bindHandlers() { }
+}
+
+describe('PortdetailsComponent', () => {
+ let fs: FnService;
+ let ar: MockActivatedRoute;
+ let windowMock: Window;
+ let logServiceSpy: jasmine.SpyObj
+
+
+
+
+
+
+
+ {{detailsData.devId}} port {{detailsData.id}}+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/web/gui2/src/main/webapp/app/view/tunnel/tunnel/tunnel.component.spec.ts b/web/gui2/src/main/webapp/app/view/tunnel/tunnel/tunnel.component.spec.ts
new file mode 100644
index 0000000000..3b2611eaeb
--- /dev/null
+++ b/web/gui2/src/main/webapp/app/view/tunnel/tunnel/tunnel.component.spec.ts
@@ -0,0 +1,143 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the 'License');
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an 'AS IS' BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { TunnelComponent } from './tunnel.component';
+import { ActivatedRoute, Params } from '@angular/router';
+import { of } from 'rxjs';
+import { FnService } from '../../../fw/util/fn.service';
+import { LogService } from '../../../log.service';
+import { LoadingService } from '../../../fw/layer/loading.service';
+import { WebSocketService } from '../../../fw/remote/websocket.service';
+import { IconService } from '../../../fw/svg/icon.service';
+import { IconComponent } from '../../../fw/svg/icon/icon.component';
+import { DebugElement } from '@angular/core';
+import { By } from '@angular/platform-browser';
+
+class MockActivatedRoute extends ActivatedRoute {
+ constructor(params: Params) {
+ super();
+ this.queryParams = of(params);
+ }
+}
+
+class MockIconService {
+ loadIconDef() { }
+}
+
+class MockLoadingService {
+ startAnim() { }
+ stop() { }
+ waiting() { }
+}
+
+class MockWebSocketService {
+ createWebSocket() { }
+ isConnected() { return false; }
+ unbindHandlers() { }
+ bindHandlers() { }
+}
+
+/**
+ * ONOS GUI -- Tunnel View Module - Unit Tests
+ */
+describe('TunnelComponent', () => {
+
+ let fs: FnService;
+ let ar: MockActivatedRoute;
+ let windowMock: Window;
+ let logServiceSpy: jasmine.SpyObj
+
+ Tunnels ({{tableData.length}} total)+
+
+
+
+
+
+
+
+
+
+
|