Added back in Bazel tests for gui2-fw-lib and gui2-topo-lib
Also used a named path in typescript for gui2-fw-lib
Change-Id: I7233565e53b9b86e1766228ecc96b21ea6f7499d
diff --git a/web/gui2/src/main/webapp/BUILD.bazel b/web/gui2/src/main/webapp/BUILD.bazel
index 17eac76..966eb64 100644
--- a/web/gui2/src/main/webapp/BUILD.bazel
+++ b/web/gui2/src/main/webapp/BUILD.bazel
@@ -19,6 +19,7 @@
load("@build_bazel_rules_nodejs//:index.bzl", "pkg_web")
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("@npm//history-server:index.bzl", "history_server")
+load("@npm//html-insert-assets:index.bzl", "html_insert_assets")
load("@npm_angular_bazel//:index.bzl", "ng_module")
load("@npm_bazel_rollup//:index.bzl", "rollup_bundle")
load("@npm_bazel_terser//:index.bzl", "terser_minified")
@@ -26,7 +27,9 @@
#load("@npm_bazel_karma//:index.bzl", "ts_web_test_suite")
-exports_files(["WEB-INF/web.xml"])
+exports_files([
+ "WEB-INF/web.xml",
+])
# We don't import from these, but the generated ngfactory code will
NG_FACTORY_ADDED_IMPORTS = [
@@ -38,9 +41,10 @@
name = "gui2",
srcs = [
"environments/environment.prod.ts",
+ "onos.dev.ts",
"onos.prod.ts",
],
- tsconfig = "//:tsconfig.json",
+ tsconfig = "//web/gui2:tsconfig.json",
deps = NG_FACTORY_ADDED_IMPORTS + [
"//web/gui2/src/main/webapp/app:app",
"@npm//@angular/core",
@@ -98,7 +102,7 @@
# Include polyfills that will be requested by old browsers
# "@npm//:node_modules/systemjs/dist/system.js",
# "@npm//:node_modules/core-js/client/core.min.js",
- "index.html",
+ ":index.html",
],
# In production mode we serve some polyfills with script tags that have hard-coded paths in the index.html
# so we must serve them at that path, by stripping a prefix
@@ -120,10 +124,38 @@
],
)
+filegroup(
+ name = "rxjs_umd_modules",
+ srcs = [
+ ":rxjs_shims.js",
+ "@npm//:node_modules/rxjs/bundles/rxjs.umd.js",
+ ],
+)
+
+# Convert d3 to an AMD module so it can be loaded in the RequireJS test environment.
genrule(
- name = "d3-copy",
- srcs = ["@npm//:node_modules/d3/dist/d3.js"],
- outs = ["d3.js"],
- cmd = "cp $< $@",
- output_to_bindir = 1,
+ name = "d3_requirejs",
+ srcs = [
+ "@npm//:node_modules/d3/dist/d3.js",
+ ],
+ outs = [
+ "d3.js",
+ ],
+ cmd = """echo "define('d3', function(require, exports, module) {" > $@ \
+ && cat $< >> $@ \
+ && echo '});' >> $@""",
+)
+
+ts_library(
+ name = "initialize_testbed",
+ testonly = 1,
+ srcs = [
+ "initialize_testbed.ts",
+ ],
+ tsconfig = "//web/gui2:tsconfig.json",
+ deps = [
+ "@npm//@angular/core",
+ "@npm//@angular/platform-browser-dynamic",
+ "@npm//@types",
+ ],
)
diff --git a/web/gui2/src/main/webapp/app/BUILD.bazel b/web/gui2/src/main/webapp/app/BUILD.bazel
index 38cb9ae..26bd005 100644
--- a/web/gui2/src/main/webapp/app/BUILD.bazel
+++ b/web/gui2/src/main/webapp/app/BUILD.bazel
@@ -15,6 +15,8 @@
"""
load("@npm_angular_bazel//:index.bzl", "ng_module")
+load("@npm_bazel_karma//:index.bzl", "karma_web_test_suite")
+load("@npm_bazel_typescript//:index.bzl", "ts_library")
package(default_visibility = ["//:__subpackages__"])
@@ -41,7 +43,7 @@
"nav/nav.component.html",
"nav/nav.theme.css",
],
- tsconfig = "//:tsconfig.json",
+ tsconfig = "//web/gui2:tsconfig.json",
deps = NG_FACTORY_ADDED_IMPORTS + [
"//web/gui2-fw-lib",
"//web/gui2/src/main/webapp/app/view/apps:gui2-view-apps",
diff --git a/web/gui2/src/main/webapp/app/nav/nav.component.spec.ts b/web/gui2/src/main/webapp/app/nav/nav.component.spec.ts
index 7b3fbfa..126d4e2 100644
--- a/web/gui2/src/main/webapp/app/nav/nav.component.spec.ts
+++ b/web/gui2/src/main/webapp/app/nav/nav.component.spec.ts
@@ -28,7 +28,7 @@
IconService,
LionService,
LogService,
- NavService } from 'gui2-fw-lib';
+ NavService } from 'gui2-fw-lib/public_api';
import { NavComponent } from './nav.component';
class MockActivatedRoute extends ActivatedRoute {
diff --git a/web/gui2/src/main/webapp/app/nav/nav.component.ts b/web/gui2/src/main/webapp/app/nav/nav.component.ts
index 567b6c5..95808b2 100644
--- a/web/gui2/src/main/webapp/app/nav/nav.component.ts
+++ b/web/gui2/src/main/webapp/app/nav/nav.component.ts
@@ -19,8 +19,8 @@
import {
LionService,
LogService,
- NavService
-} from '../../../../../../gui2-fw-lib/public_api';
+ NavService,
+} from 'gui2-fw-lib/public_api';
/**
* ONOS GUI -- Navigation Module
diff --git a/web/gui2/src/main/webapp/app/onos.component.spec.ts b/web/gui2/src/main/webapp/app/onos.component.spec.ts
index 0801494..4937618 100644
--- a/web/gui2/src/main/webapp/app/onos.component.spec.ts
+++ b/web/gui2/src/main/webapp/app/onos.component.spec.ts
@@ -40,7 +40,7 @@
ThemeService,
WebSocketService,
WsOptions
-} from 'gui2-fw-lib';
+} from 'gui2-fw-lib/public_api';
class MockActivatedRoute extends ActivatedRoute {
constructor(params: Params) {
diff --git a/web/gui2/src/main/webapp/app/onos.component.ts b/web/gui2/src/main/webapp/app/onos.component.ts
index 4b27a3e..f12593d 100644
--- a/web/gui2/src/main/webapp/app/onos.component.ts
+++ b/web/gui2/src/main/webapp/app/onos.component.ts
@@ -24,7 +24,7 @@
WebSocketService,
WsOptions,
KeysService
-} from '../../../../../gui2-fw-lib/public_api';
+} from 'gui2-fw-lib/public_api';
import { OnosService, View } from './onos.service';
// secret sauce
diff --git a/web/gui2/src/main/webapp/app/onos.module.ts b/web/gui2/src/main/webapp/app/onos.module.ts
index 0e8b9ba..f7b1a3c 100644
--- a/web/gui2/src/main/webapp/app/onos.module.ts
+++ b/web/gui2/src/main/webapp/app/onos.module.ts
@@ -25,7 +25,7 @@
Gui2FwLibModule,
ConsoleLoggerService,
LogService
-} from '../../../../../gui2-fw-lib/public_api';
+} from 'gui2-fw-lib/public_api';
import { OnosService } from './onos.service';
/**
diff --git a/web/gui2/src/main/webapp/app/onos.service.spec.ts b/web/gui2/src/main/webapp/app/onos.service.spec.ts
index c9dfdb3..26e7193 100644
--- a/web/gui2/src/main/webapp/app/onos.service.spec.ts
+++ b/web/gui2/src/main/webapp/app/onos.service.spec.ts
@@ -15,7 +15,7 @@
*/
import { TestBed, inject } from '@angular/core/testing';
-import { LogService, ConsoleLoggerService } from 'gui2-fw-lib';
+import { LogService, ConsoleLoggerService } from 'gui2-fw-lib/public_api';
import { OnosService } from './onos.service';
/**
diff --git a/web/gui2/src/main/webapp/app/onos.service.ts b/web/gui2/src/main/webapp/app/onos.service.ts
index c64267e..ef34c22 100644
--- a/web/gui2/src/main/webapp/app/onos.service.ts
+++ b/web/gui2/src/main/webapp/app/onos.service.ts
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import {Inject, Injectable} from '@angular/core';
-import { LogService } from '../../../../../gui2-fw-lib/public_api';
+import { LogService } from 'gui2-fw-lib/public_api';
/**
* A structure of View elements for the OnosService
diff --git a/web/gui2/src/main/webapp/app/view/apps/BUILD.bazel b/web/gui2/src/main/webapp/app/view/apps/BUILD.bazel
index 472a086..9cfeb2a 100644
--- a/web/gui2/src/main/webapp/app/view/apps/BUILD.bazel
+++ b/web/gui2/src/main/webapp/app/view/apps/BUILD.bazel
@@ -33,6 +33,7 @@
"**/*.html",
]),
module_name = "gui2-view-apps",
+ tsconfig = "//web/gui2:tsconfig.json",
deps = [
"//web/gui2-fw-lib",
"@npm//@angular/animations",
diff --git a/web/gui2/src/main/webapp/app/view/apps/apps.module.ts b/web/gui2/src/main/webapp/app/view/apps/apps.module.ts
index 76215e5..cc34c58 100644
--- a/web/gui2/src/main/webapp/app/view/apps/apps.module.ts
+++ b/web/gui2/src/main/webapp/app/view/apps/apps.module.ts
@@ -19,7 +19,7 @@
import { RouterModule } from '@angular/router';
import { AppsComponent } from './apps/apps.component';
import { AppsDetailsComponent } from './appsdetails/appsdetails.component';
-import { Gui2FwLibModule } from '../../../../../../../gui2-fw-lib/public_api';
+import { Gui2FwLibModule } from 'gui2-fw-lib/public_api';
/**
* ONOS GUI -- Apps View Module
@@ -32,7 +32,6 @@
imports: [
CommonModule,
Gui2FwLibModule,
- RouterModule,
RouterModule.forChild([{path: '', component: AppsComponent}]),
FormsModule
],
diff --git a/web/gui2/src/main/webapp/app/view/apps/apps/apps.component.ts b/web/gui2/src/main/webapp/app/view/apps/apps/apps.component.ts
index e76bf64..7760d22 100644
--- a/web/gui2/src/main/webapp/app/view/apps/apps/apps.component.ts
+++ b/web/gui2/src/main/webapp/app/view/apps/apps/apps.component.ts
@@ -24,7 +24,7 @@
TableBaseImpl, TableResponse, SortDir,
UrlFnService,
WebSocketService
-} from '../../../../../../../../gui2-fw-lib/public_api';
+} from 'gui2-fw-lib/public_api';
const INSTALLED = 'INSTALLED';
const ACTIVE = 'ACTIVE';
diff --git a/web/gui2/src/main/webapp/app/view/apps/appsdetails/appsdetails.component.ts b/web/gui2/src/main/webapp/app/view/apps/appsdetails/appsdetails.component.ts
index b3bbdb8..bee217b 100644
--- a/web/gui2/src/main/webapp/app/view/apps/appsdetails/appsdetails.component.ts
+++ b/web/gui2/src/main/webapp/app/view/apps/appsdetails/appsdetails.component.ts
@@ -21,7 +21,7 @@
LogService,
DetailsPanelBaseImpl,
WebSocketService
-} from '../../../../../../../../gui2-fw-lib/public_api';
+} from 'gui2-fw-lib/public_api';
import { App, APPURLPREFIX, ICONURLSUFFIX } from '../apps/apps.component';
diff --git a/web/gui2/src/main/webapp/app/view/cluster/BUILD.bazel b/web/gui2/src/main/webapp/app/view/cluster/BUILD.bazel
index 5401cad..3dc548e 100644
--- a/web/gui2/src/main/webapp/app/view/cluster/BUILD.bazel
+++ b/web/gui2/src/main/webapp/app/view/cluster/BUILD.bazel
@@ -33,6 +33,7 @@
"**/*.html",
]),
module_name = "gui2-view-cluster",
+ tsconfig = "//web/gui2:tsconfig.json",
deps = [
"//web/gui2-fw-lib",
"@npm//@angular/animations",
diff --git a/web/gui2/src/main/webapp/app/view/cluster/cluster-details.directive.ts b/web/gui2/src/main/webapp/app/view/cluster/cluster-details.directive.ts
index 4ddcb02..7363788 100644
--- a/web/gui2/src/main/webapp/app/view/cluster/cluster-details.directive.ts
+++ b/web/gui2/src/main/webapp/app/view/cluster/cluster-details.directive.ts
@@ -23,7 +23,7 @@
LionService,
PanelService,
WebSocketService
-} from '../../../../../../../gui2-fw-lib/public_api';
+} from 'gui2-fw-lib/public_api';
import * as d3 from 'd3';
import {HostListener} from '@angular/core';
diff --git a/web/gui2/src/main/webapp/app/view/cluster/cluster.module.ts b/web/gui2/src/main/webapp/app/view/cluster/cluster.module.ts
index 50db1da..adf7d41 100644
--- a/web/gui2/src/main/webapp/app/view/cluster/cluster.module.ts
+++ b/web/gui2/src/main/webapp/app/view/cluster/cluster.module.ts
@@ -15,7 +15,7 @@
*/
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
-import { Gui2FwLibModule } from '../../../../../../../gui2-fw-lib/public_api';
+import { Gui2FwLibModule } from 'gui2-fw-lib/public_api';
import { ClusterComponent } from './cluster/cluster.component';
import { ClusterDetailsDirective } from './cluster-details.directive';
import {RouterModule} from '@angular/router';
@@ -24,7 +24,6 @@
imports: [
CommonModule,
Gui2FwLibModule,
- RouterModule,
RouterModule.forChild([{path: '', component: ClusterComponent}]),
],
declarations: [ClusterComponent, ClusterDetailsDirective]
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 a4d43b1..9b42c12 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
@@ -20,7 +20,7 @@
WebSocketService,
LionService,
SortDir, TableBaseImpl, TableResponse
-} from '../../../../../../../../gui2-fw-lib/public_api';
+} from 'gui2-fw-lib/public_api';
/**
* Model of the response from WebSocket
diff --git a/web/gui2/src/main/webapp/app/view/device/BUILD.bazel b/web/gui2/src/main/webapp/app/view/device/BUILD.bazel
index ac3eb0c..f821a4f 100644
--- a/web/gui2/src/main/webapp/app/view/device/BUILD.bazel
+++ b/web/gui2/src/main/webapp/app/view/device/BUILD.bazel
@@ -33,6 +33,7 @@
"**/*.html",
]),
module_name = "gui2-view-device",
+ tsconfig = "//web/gui2:tsconfig.json",
deps = [
"//web/gui2-fw-lib",
"@npm//@angular/animations",
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 a038ef5..535b8bb 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
@@ -15,9 +15,9 @@
*/
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
-import { Routes, RouterModule } from '@angular/router';
+import { RouterModule } from '@angular/router';
import { DeviceComponent } from './device/device.component';
-import { Gui2FwLibModule } from '../../../../../../../gui2-fw-lib/public_api';
+import { Gui2FwLibModule } from 'gui2-fw-lib/public_api';
import { FormsModule } from '@angular/forms';
import { DeviceDetailsComponent } from './devicedetails/devicedetails.component';
@@ -27,7 +27,6 @@
@NgModule({
imports: [
CommonModule,
- RouterModule,
RouterModule.forChild([{path: '', component: DeviceComponent}]),
Gui2FwLibModule,
FormsModule
diff --git a/web/gui2/src/main/webapp/app/view/device/device/device.component.ts b/web/gui2/src/main/webapp/app/view/device/device/device.component.ts
index 22322a6..c81f072 100644
--- a/web/gui2/src/main/webapp/app/view/device/device/device.component.ts
+++ b/web/gui2/src/main/webapp/app/view/device/device/device.component.ts
@@ -20,7 +20,7 @@
LogService,
WebSocketService,
SortDir, TableBaseImpl, TableResponse
-} from '../../../../../../../../gui2-fw-lib/public_api';
+} from 'gui2-fw-lib/public_api';
import { ActivatedRoute, Router } from '@angular/router';
diff --git a/web/gui2/src/main/webapp/app/view/device/devicedetails/devicedetails.component.ts b/web/gui2/src/main/webapp/app/view/device/devicedetails/devicedetails.component.ts
index 439c302..e0819bb 100644
--- a/web/gui2/src/main/webapp/app/view/device/devicedetails/devicedetails.component.ts
+++ b/web/gui2/src/main/webapp/app/view/device/devicedetails/devicedetails.component.ts
@@ -21,7 +21,7 @@
LogService,
DetailsPanelBaseImpl,
WebSocketService
-} from '../../../../../../../../gui2-fw-lib/public_api';
+} from 'gui2-fw-lib/public_api';
/**
* The details view when a device row is clicked from the Device view
diff --git a/web/gui2/src/main/webapp/app/view/flow/BUILD.bazel b/web/gui2/src/main/webapp/app/view/flow/BUILD.bazel
index 7c5bbf7..fe80c74 100644
--- a/web/gui2/src/main/webapp/app/view/flow/BUILD.bazel
+++ b/web/gui2/src/main/webapp/app/view/flow/BUILD.bazel
@@ -33,6 +33,7 @@
"**/*.html",
]),
module_name = "gui2-view-flow",
+ tsconfig = "//web/gui2:tsconfig.json",
deps = [
"//web/gui2-fw-lib",
"@npm//@angular/animations",
diff --git a/web/gui2/src/main/webapp/app/view/flow/flow.module.ts b/web/gui2/src/main/webapp/app/view/flow/flow.module.ts
index c51da09..19f7720 100644
--- a/web/gui2/src/main/webapp/app/view/flow/flow.module.ts
+++ b/web/gui2/src/main/webapp/app/view/flow/flow.module.ts
@@ -16,7 +16,7 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FlowComponent } from './flow/flow.component';
-import { Gui2FwLibModule } from '../../../../../../../gui2-fw-lib/public_api';
+import { Gui2FwLibModule } from 'gui2-fw-lib/public_api';
import { FormsModule } from '@angular/forms';
import { FlowDetailsComponent } from './flowdetails/flowdetails/flowdetails.component';
import {RouterModule} from '@angular/router';
@@ -28,7 +28,6 @@
imports: [
CommonModule,
Gui2FwLibModule,
- RouterModule,
RouterModule.forChild([{path: '', component: FlowComponent}]),
FormsModule
],
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 8c81bb3..84790db 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
@@ -21,7 +21,7 @@
WebSocketService,
LionService,
SortDir, TableBaseImpl, TableResponse
-} from '../../../../../../../../gui2-fw-lib/public_api';
+} from 'gui2-fw-lib/public_api';
import { ActivatedRoute } from '@angular/router';
/**
diff --git a/web/gui2/src/main/webapp/app/view/flow/flowdetails/flowdetails/flowdetails.component.ts b/web/gui2/src/main/webapp/app/view/flow/flowdetails/flowdetails/flowdetails.component.ts
index f9b3f4c..180bac9 100644
--- a/web/gui2/src/main/webapp/app/view/flow/flowdetails/flowdetails/flowdetails.component.ts
+++ b/web/gui2/src/main/webapp/app/view/flow/flowdetails/flowdetails/flowdetails.component.ts
@@ -20,7 +20,7 @@
LogService,
DetailsPanelBaseImpl,
WebSocketService
-} from '../../../../../../../../../gui2-fw-lib/public_api';
+} from 'gui2-fw-lib/public_api';
import { trigger, state, style, transition, animate } from '@angular/animations';
/**
diff --git a/web/gui2/src/main/webapp/app/view/group/BUILD.bazel b/web/gui2/src/main/webapp/app/view/group/BUILD.bazel
index 82ad14a..5eb3695 100644
--- a/web/gui2/src/main/webapp/app/view/group/BUILD.bazel
+++ b/web/gui2/src/main/webapp/app/view/group/BUILD.bazel
@@ -33,6 +33,7 @@
"**/*.html",
]),
module_name = "gui2-view-group",
+ tsconfig = "//web/gui2:tsconfig.json",
deps = [
"//web/gui2-fw-lib",
"@npm//@angular/animations",
diff --git a/web/gui2/src/main/webapp/app/view/group/group.module.ts b/web/gui2/src/main/webapp/app/view/group/group.module.ts
index 9ffee40..b7000db 100644
--- a/web/gui2/src/main/webapp/app/view/group/group.module.ts
+++ b/web/gui2/src/main/webapp/app/view/group/group.module.ts
@@ -16,14 +16,13 @@
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {GroupComponent} from './group/group.component';
-import { Gui2FwLibModule } from '../../../../../../../gui2-fw-lib/public_api';
+import { Gui2FwLibModule } from 'gui2-fw-lib/public_api';
import {FormsModule} from '@angular/forms';
import {RouterModule} from '@angular/router';
@NgModule({
imports: [
CommonModule,
- RouterModule,
RouterModule.forChild([{path: '', component: GroupComponent}]),
Gui2FwLibModule,
FormsModule,
diff --git a/web/gui2/src/main/webapp/app/view/group/group/group.component.ts b/web/gui2/src/main/webapp/app/view/group/group/group.component.ts
index fbb58ba..8d7b9f8 100644
--- a/web/gui2/src/main/webapp/app/view/group/group/group.component.ts
+++ b/web/gui2/src/main/webapp/app/view/group/group/group.component.ts
@@ -19,7 +19,7 @@
LogService,
WebSocketService,
SortDir, TableBaseImpl, TableResponse
-} from '../../../../../../../../gui2-fw-lib/public_api';
+} from 'gui2-fw-lib/public_api';
import { ActivatedRoute } from '@angular/router';
/**
diff --git a/web/gui2/src/main/webapp/app/view/host/BUILD.bazel b/web/gui2/src/main/webapp/app/view/host/BUILD.bazel
index 78f486f..df3f9be 100644
--- a/web/gui2/src/main/webapp/app/view/host/BUILD.bazel
+++ b/web/gui2/src/main/webapp/app/view/host/BUILD.bazel
@@ -32,7 +32,7 @@
"**/*.css",
"**/*.html",
]),
- module_name = "gui2-view-host",
+ tsconfig = "//web/gui2:tsconfig.json",
deps = [
"//web/gui2-fw-lib",
"@npm//@angular/animations",
diff --git a/web/gui2/src/main/webapp/app/view/host/host.module.ts b/web/gui2/src/main/webapp/app/view/host/host.module.ts
index 1873fce..33ad589 100644
--- a/web/gui2/src/main/webapp/app/view/host/host.module.ts
+++ b/web/gui2/src/main/webapp/app/view/host/host.module.ts
@@ -17,14 +17,13 @@
import { CommonModule } from '@angular/common';
import { HostComponent } from './host/host.component';
-import { Gui2FwLibModule } from '../../../../../../../gui2-fw-lib/public_api';
+import { Gui2FwLibModule } from 'gui2-fw-lib/public_api';
import { HostDetailsComponent } from './hostdetails/hostdetails.component';
import {RouterModule} from '@angular/router';
@NgModule({
imports: [
CommonModule,
- RouterModule,
RouterModule.forChild([{path: '', component: HostComponent}]),
Gui2FwLibModule
],
diff --git a/web/gui2/src/main/webapp/app/view/host/host/host.component.ts b/web/gui2/src/main/webapp/app/view/host/host/host.component.ts
index 22c0e58..f2ddaf5 100644
--- a/web/gui2/src/main/webapp/app/view/host/host/host.component.ts
+++ b/web/gui2/src/main/webapp/app/view/host/host/host.component.ts
@@ -19,7 +19,7 @@
LogService,
WebSocketService,
SortDir, TableBaseImpl, TableResponse
-} from '../../../../../../../../gui2-fw-lib/public_api';
+} from 'gui2-fw-lib/public_api';
interface HostTableResponse extends TableResponse {
hosts: Host[];
diff --git a/web/gui2/src/main/webapp/app/view/host/hostdetails/hostdetails.component.ts b/web/gui2/src/main/webapp/app/view/host/hostdetails/hostdetails.component.ts
index 50af4f6..945f723 100644
--- a/web/gui2/src/main/webapp/app/view/host/hostdetails/hostdetails.component.ts
+++ b/web/gui2/src/main/webapp/app/view/host/hostdetails/hostdetails.component.ts
@@ -21,7 +21,7 @@
LogService,
DetailsPanelBaseImpl,
WebSocketService
-} from '../../../../../../../../gui2-fw-lib/public_api';
+} from 'gui2-fw-lib/public_api';
/**
* The details view when a host row is clicked from the Host view
diff --git a/web/gui2/src/main/webapp/app/view/intent/BUILD.bazel b/web/gui2/src/main/webapp/app/view/intent/BUILD.bazel
index 81739e5..e8c5508 100644
--- a/web/gui2/src/main/webapp/app/view/intent/BUILD.bazel
+++ b/web/gui2/src/main/webapp/app/view/intent/BUILD.bazel
@@ -33,6 +33,7 @@
"**/*.html",
]),
module_name = "gui2-view-intent",
+ tsconfig = "//web/gui2:tsconfig.json",
deps = [
"//web/gui2-fw-lib",
"@npm//@angular/animations",
diff --git a/web/gui2/src/main/webapp/app/view/intent/intent.module.ts b/web/gui2/src/main/webapp/app/view/intent/intent.module.ts
index 49869ee..22fb932 100644
--- a/web/gui2/src/main/webapp/app/view/intent/intent.module.ts
+++ b/web/gui2/src/main/webapp/app/view/intent/intent.module.ts
@@ -17,14 +17,13 @@
import { CommonModule } from '@angular/common';
import { IntentComponent } from './intent/intent.component';
-import { Gui2FwLibModule } from '../../../../../../../gui2-fw-lib/public_api';
+import { Gui2FwLibModule } from 'gui2-fw-lib/public_api';
import { RouterModule } from '@angular/router';
@NgModule({
imports: [
CommonModule,
Gui2FwLibModule,
- RouterModule,
RouterModule.forChild([{path: '', component: IntentComponent}]),
],
declarations: [IntentComponent],
diff --git a/web/gui2/src/main/webapp/app/view/intent/intent/intent.component.ts b/web/gui2/src/main/webapp/app/view/intent/intent/intent.component.ts
index 0e9fc449..b45f652 100644
--- a/web/gui2/src/main/webapp/app/view/intent/intent/intent.component.ts
+++ b/web/gui2/src/main/webapp/app/view/intent/intent/intent.component.ts
@@ -19,7 +19,7 @@
LogService,
WebSocketService,
SortDir, TableBaseImpl, TableResponse
-} from '../../../../../../../../gui2-fw-lib/public_api';
+} from 'gui2-fw-lib/public_api';
const RESUBMITINTENT = 'resubmitIntent';
const REMOVEINTENT = 'removeIntent';
diff --git a/web/gui2/src/main/webapp/app/view/link/BUILD.bazel b/web/gui2/src/main/webapp/app/view/link/BUILD.bazel
index 5625ec4..f7c458d 100644
--- a/web/gui2/src/main/webapp/app/view/link/BUILD.bazel
+++ b/web/gui2/src/main/webapp/app/view/link/BUILD.bazel
@@ -33,6 +33,7 @@
"**/*.html",
]),
module_name = "gui2-view-link",
+ tsconfig = "//web/gui2:tsconfig.json",
deps = [
"//web/gui2-fw-lib",
"@npm//@angular/animations",
diff --git a/web/gui2/src/main/webapp/app/view/link/link.module.ts b/web/gui2/src/main/webapp/app/view/link/link.module.ts
index 383e881..4c1e020 100644
--- a/web/gui2/src/main/webapp/app/view/link/link.module.ts
+++ b/web/gui2/src/main/webapp/app/view/link/link.module.ts
@@ -16,13 +16,12 @@
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {LinkComponent} from './link/link.component';
-import {Gui2FwLibModule} from '../../../../../../../gui2-fw-lib/public_api';
+import {Gui2FwLibModule} from 'gui2-fw-lib/public_api';
import {RouterModule} from '@angular/router';
@NgModule({
imports: [
CommonModule,
- RouterModule,
RouterModule.forChild([{path: '', component: LinkComponent}]),
Gui2FwLibModule
],
diff --git a/web/gui2/src/main/webapp/app/view/link/link/link.component.ts b/web/gui2/src/main/webapp/app/view/link/link/link.component.ts
index d59ac18..90c0e64 100644
--- a/web/gui2/src/main/webapp/app/view/link/link/link.component.ts
+++ b/web/gui2/src/main/webapp/app/view/link/link/link.component.ts
@@ -19,7 +19,7 @@
LogService,
WebSocketService,
SortDir, TableBaseImpl, TableResponse
-} from '../../../../../../../../gui2-fw-lib/public_api';
+} from 'gui2-fw-lib/public_api';
/**
* Model of the response from WebSocket
diff --git a/web/gui2/src/main/webapp/app/view/meter/BUILD.bazel b/web/gui2/src/main/webapp/app/view/meter/BUILD.bazel
index b4607f3..01f2f95 100644
--- a/web/gui2/src/main/webapp/app/view/meter/BUILD.bazel
+++ b/web/gui2/src/main/webapp/app/view/meter/BUILD.bazel
@@ -33,6 +33,7 @@
"**/*.html",
]),
module_name = "gui2-view-meter",
+ tsconfig = "//web/gui2:tsconfig.json",
deps = [
"//web/gui2-fw-lib",
"@npm//@angular/animations",
diff --git a/web/gui2/src/main/webapp/app/view/meter/meter.module.ts b/web/gui2/src/main/webapp/app/view/meter/meter.module.ts
index d5244c9..5bebc19 100644
--- a/web/gui2/src/main/webapp/app/view/meter/meter.module.ts
+++ b/web/gui2/src/main/webapp/app/view/meter/meter.module.ts
@@ -15,7 +15,7 @@
*/
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
-import {Gui2FwLibModule} from '../../../../../../../gui2-fw-lib/public_api';
+import {Gui2FwLibModule} from 'gui2-fw-lib/public_api';
import {MeterComponent} from './meter/meter.component';
import {FormsModule} from '@angular/forms';
import {RouterModule} from '@angular/router';
@@ -24,7 +24,6 @@
imports: [
CommonModule,
Gui2FwLibModule,
- RouterModule,
RouterModule.forChild([{path: '', component: MeterComponent}]),
FormsModule
],
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 62501bf..8d9f0b0 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
@@ -19,7 +19,7 @@
LogService,
WebSocketService,
SortDir, TableBaseImpl, TableResponse
-} from '../../../../../../../../gui2-fw-lib/public_api';
+} from 'gui2-fw-lib/public_api';
import { ActivatedRoute } from '@angular/router';
/**
diff --git a/web/gui2/src/main/webapp/app/view/partition/BUILD.bazel b/web/gui2/src/main/webapp/app/view/partition/BUILD.bazel
index 7c86a08..80cbe05 100644
--- a/web/gui2/src/main/webapp/app/view/partition/BUILD.bazel
+++ b/web/gui2/src/main/webapp/app/view/partition/BUILD.bazel
@@ -33,6 +33,7 @@
"**/*.html",
]),
module_name = "gui2-view-partition",
+ tsconfig = "//web/gui2:tsconfig.json",
deps = [
"//web/gui2-fw-lib",
"@npm//@angular/animations",
diff --git a/web/gui2/src/main/webapp/app/view/partition/partition.module.ts b/web/gui2/src/main/webapp/app/view/partition/partition.module.ts
index 0f3c852..e7b8069 100644
--- a/web/gui2/src/main/webapp/app/view/partition/partition.module.ts
+++ b/web/gui2/src/main/webapp/app/view/partition/partition.module.ts
@@ -15,7 +15,7 @@
*/
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
-import {Gui2FwLibModule} from '../../../../../../../gui2-fw-lib/public_api';
+import {Gui2FwLibModule} from 'gui2-fw-lib/public_api';
import { PartitionComponent } from './partition/partition.component';
import {RouterModule} from '@angular/router';
@@ -24,7 +24,6 @@
imports: [
CommonModule,
Gui2FwLibModule,
- RouterModule,
RouterModule.forChild([{path: '', component: PartitionComponent}]),
],
declarations: [PartitionComponent]
diff --git a/web/gui2/src/main/webapp/app/view/partition/partition/partition.component.ts b/web/gui2/src/main/webapp/app/view/partition/partition/partition.component.ts
index dd2a509..0bf87d0 100644
--- a/web/gui2/src/main/webapp/app/view/partition/partition/partition.component.ts
+++ b/web/gui2/src/main/webapp/app/view/partition/partition/partition.component.ts
@@ -19,7 +19,7 @@
LogService,
WebSocketService,
SortDir, TableBaseImpl
-} from '../../../../../../../../gui2-fw-lib/public_api';
+} from 'gui2-fw-lib/public_api';
import { ActivatedRoute } from '@angular/router';
/**
diff --git a/web/gui2/src/main/webapp/app/view/pipeconf/BUILD.bazel b/web/gui2/src/main/webapp/app/view/pipeconf/BUILD.bazel
index ecd43ea..16250bb 100644
--- a/web/gui2/src/main/webapp/app/view/pipeconf/BUILD.bazel
+++ b/web/gui2/src/main/webapp/app/view/pipeconf/BUILD.bazel
@@ -33,6 +33,7 @@
"**/*.html",
]),
module_name = "gui2-view-pipeconf",
+ tsconfig = "//web/gui2:tsconfig.json",
deps = [
"//web/gui2-fw-lib",
"@npm//@angular/animations",
diff --git a/web/gui2/src/main/webapp/app/view/pipeconf/pipeconf.module.ts b/web/gui2/src/main/webapp/app/view/pipeconf/pipeconf.module.ts
index f2481f9..3e0c5c6 100644
--- a/web/gui2/src/main/webapp/app/view/pipeconf/pipeconf.module.ts
+++ b/web/gui2/src/main/webapp/app/view/pipeconf/pipeconf.module.ts
@@ -18,14 +18,13 @@
import {CommonModule} from '@angular/common';
import {PipeconfComponent} from './pipeconf/pipeconf.component';
import {PipeconfDetailsComponent} from './pipeconfdetails/pipeconfdetails.component';
-import { Gui2FwLibModule } from '../../../../../../../gui2-fw-lib/public_api';
+import { Gui2FwLibModule } from 'gui2-fw-lib/public_api';
import {FormsModule} from '@angular/forms';
import {RouterModule} from '@angular/router';
@NgModule({
imports: [
CommonModule,
- RouterModule,
RouterModule.forChild([{path: '', component: PipeconfComponent}]),
Gui2FwLibModule,
FormsModule
diff --git a/web/gui2/src/main/webapp/app/view/pipeconf/pipeconf/pipeconf.component.ts b/web/gui2/src/main/webapp/app/view/pipeconf/pipeconf/pipeconf.component.ts
index d5aa2d3..50141c7 100644
--- a/web/gui2/src/main/webapp/app/view/pipeconf/pipeconf/pipeconf.component.ts
+++ b/web/gui2/src/main/webapp/app/view/pipeconf/pipeconf/pipeconf.component.ts
@@ -20,7 +20,7 @@
LogService, SortDir,
TableBaseImpl,
WebSocketService
-} from '../../../../../../../../gui2-fw-lib/public_api';
+} from 'gui2-fw-lib/public_api';
import {ActivatedRoute, Router} from '@angular/router';
const pipeconfReq = 'pipeconfRequest';
diff --git a/web/gui2/src/main/webapp/app/view/pipeconf/pipeconfdetails/pipeconfdetails.component.ts b/web/gui2/src/main/webapp/app/view/pipeconf/pipeconfdetails/pipeconfdetails.component.ts
index 9057521..e5539f8 100644
--- a/web/gui2/src/main/webapp/app/view/pipeconf/pipeconfdetails/pipeconfdetails.component.ts
+++ b/web/gui2/src/main/webapp/app/view/pipeconf/pipeconfdetails/pipeconfdetails.component.ts
@@ -26,7 +26,7 @@
FnService,
IconService,
LogService, WebSocketService
-} from '../../../../../../../../gui2-fw-lib/public_api';
+} from 'gui2-fw-lib/public_api';
import {PipeconfAction, PipeconfTable} from '../pipeconf/pipeconf.component';
import {animate, state, style, transition, trigger} from '@angular/animations';
diff --git a/web/gui2/src/main/webapp/app/view/port/BUILD.bazel b/web/gui2/src/main/webapp/app/view/port/BUILD.bazel
index aa6c632..8b15b6f 100644
--- a/web/gui2/src/main/webapp/app/view/port/BUILD.bazel
+++ b/web/gui2/src/main/webapp/app/view/port/BUILD.bazel
@@ -33,6 +33,7 @@
"**/*.html",
]),
module_name = "gui2-view-port",
+ tsconfig = "//web/gui2:tsconfig.json",
deps = [
"//web/gui2-fw-lib",
"@npm//@angular/animations",
diff --git a/web/gui2/src/main/webapp/app/view/port/port.module.ts b/web/gui2/src/main/webapp/app/view/port/port.module.ts
index eab8095..1cb44b4 100644
--- a/web/gui2/src/main/webapp/app/view/port/port.module.ts
+++ b/web/gui2/src/main/webapp/app/view/port/port.module.ts
@@ -16,7 +16,7 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { PortComponent } from './port/port.component';
-import { Gui2FwLibModule } from '../../../../../../../gui2-fw-lib/public_api';
+import { Gui2FwLibModule } from 'gui2-fw-lib/public_api';
import { FormsModule } from '@angular/forms';
import { PortDetailsComponent } from './portdetails/portdetails.component';
import {RouterModule} from '@angular/router';
@@ -25,7 +25,6 @@
imports: [
CommonModule,
Gui2FwLibModule,
- RouterModule,
RouterModule.forChild([{path: '', component: PortComponent}]),
FormsModule
],
diff --git a/web/gui2/src/main/webapp/app/view/port/port/port.component.ts b/web/gui2/src/main/webapp/app/view/port/port/port.component.ts
index c850d2a..a0482ae 100644
--- a/web/gui2/src/main/webapp/app/view/port/port/port.component.ts
+++ b/web/gui2/src/main/webapp/app/view/port/port/port.component.ts
@@ -20,7 +20,7 @@
PrefsService,
WebSocketService,
SortDir, TableBaseImpl, TableResponse
-} from '../../../../../../../../gui2-fw-lib/public_api';
+} from 'gui2-fw-lib/public_api';
import { ActivatedRoute } from '@angular/router';
/**
diff --git a/web/gui2/src/main/webapp/app/view/port/portdetails/portdetails.component.ts b/web/gui2/src/main/webapp/app/view/port/portdetails/portdetails.component.ts
index 30d59f1..d2479ac5 100644
--- a/web/gui2/src/main/webapp/app/view/port/portdetails/portdetails.component.ts
+++ b/web/gui2/src/main/webapp/app/view/port/portdetails/portdetails.component.ts
@@ -21,7 +21,7 @@
LogService,
DetailsPanelBaseImpl,
WebSocketService
-} from '../../../../../../../../gui2-fw-lib/public_api';
+} from 'gui2-fw-lib/public_api';
/**
* The details view when a port row is clicked from the Port view
diff --git a/web/gui2/src/main/webapp/app/view/processor/BUILD.bazel b/web/gui2/src/main/webapp/app/view/processor/BUILD.bazel
index feb6ae6..5ea3000 100644
--- a/web/gui2/src/main/webapp/app/view/processor/BUILD.bazel
+++ b/web/gui2/src/main/webapp/app/view/processor/BUILD.bazel
@@ -33,6 +33,7 @@
"**/*.html",
]),
module_name = "gui2-view-processor",
+ tsconfig = "//web/gui2:tsconfig.json",
deps = [
"//web/gui2-fw-lib",
"@npm//@angular/animations",
diff --git a/web/gui2/src/main/webapp/app/view/processor/processor.module.ts b/web/gui2/src/main/webapp/app/view/processor/processor.module.ts
index e6d8a21..d73fbfc 100644
--- a/web/gui2/src/main/webapp/app/view/processor/processor.module.ts
+++ b/web/gui2/src/main/webapp/app/view/processor/processor.module.ts
@@ -15,14 +15,13 @@
*/
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
-import { Gui2FwLibModule } from '../../../../../../../gui2-fw-lib/public_api';
+import { Gui2FwLibModule } from 'gui2-fw-lib/public_api';
import { ProcessorComponent } from './processor/processor.component';
import {RouterModule} from '@angular/router';
@NgModule({
imports: [
CommonModule,
- RouterModule,
RouterModule.forChild([{path: '', component: ProcessorComponent}]),
Gui2FwLibModule
],
diff --git a/web/gui2/src/main/webapp/app/view/processor/processor/processor.component.ts b/web/gui2/src/main/webapp/app/view/processor/processor/processor.component.ts
index 5083dcd..af63504 100644
--- a/web/gui2/src/main/webapp/app/view/processor/processor/processor.component.ts
+++ b/web/gui2/src/main/webapp/app/view/processor/processor/processor.component.ts
@@ -19,7 +19,7 @@
LogService,
WebSocketService,
TableBaseImpl
-} from '../../../../../../../../gui2-fw-lib/public_api';
+} from 'gui2-fw-lib/public_api';
import { ActivatedRoute } from '@angular/router';
/**
diff --git a/web/gui2/src/main/webapp/app/view/settings/BUILD.bazel b/web/gui2/src/main/webapp/app/view/settings/BUILD.bazel
index 0802afe..f4a2f6d 100644
--- a/web/gui2/src/main/webapp/app/view/settings/BUILD.bazel
+++ b/web/gui2/src/main/webapp/app/view/settings/BUILD.bazel
@@ -33,6 +33,7 @@
"**/*.html",
]),
module_name = "gui2-view-settings",
+ tsconfig = "//web/gui2:tsconfig.json",
deps = [
"//web/gui2-fw-lib",
"@npm//@angular/animations",
diff --git a/web/gui2/src/main/webapp/app/view/settings/settings.module.ts b/web/gui2/src/main/webapp/app/view/settings/settings.module.ts
index 7e89942..1c66849 100644
--- a/web/gui2/src/main/webapp/app/view/settings/settings.module.ts
+++ b/web/gui2/src/main/webapp/app/view/settings/settings.module.ts
@@ -17,14 +17,13 @@
import { CommonModule } from '@angular/common';
import { SettingsComponent } from './settings/settings.component';
-import { Gui2FwLibModule } from '../../../../../../../gui2-fw-lib/public_api';
+import { Gui2FwLibModule } from 'gui2-fw-lib/public_api';
import { SettingsDetailsComponent } from './settingsdetails/settingsdetails.component';
import {RouterModule} from '@angular/router';
@NgModule({
imports: [
CommonModule,
- RouterModule,
RouterModule.forChild([{path: '', component: SettingsComponent}]),
Gui2FwLibModule
],
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 67fd073..fd6429b 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
@@ -19,7 +19,7 @@
LogService,
WebSocketService,
SortDir, TableBaseImpl, TableResponse
-} from '../../../../../../../../gui2-fw-lib/public_api';
+} from 'gui2-fw-lib/public_api';
/**
* Model of the data returned through the Web Socket about settings.
diff --git a/web/gui2/src/main/webapp/app/view/settings/settingsdetails/settingsdetails.component.ts b/web/gui2/src/main/webapp/app/view/settings/settingsdetails/settingsdetails.component.ts
index ba2ce78..f0fd6e9 100644
--- a/web/gui2/src/main/webapp/app/view/settings/settingsdetails/settingsdetails.component.ts
+++ b/web/gui2/src/main/webapp/app/view/settings/settingsdetails/settingsdetails.component.ts
@@ -19,7 +19,7 @@
LogService,
DetailsPanelBaseImpl,
WebSocketService
-} from '../../../../../../../../gui2-fw-lib/public_api';
+} from 'gui2-fw-lib/public_api';
import { trigger, state, style, transition, animate } from '@angular/animations';
import { Settings } from '../settings/settings.component';
diff --git a/web/gui2/src/main/webapp/app/view/tunnel/BUILD.bazel b/web/gui2/src/main/webapp/app/view/tunnel/BUILD.bazel
index b63d67d..4cc24e3 100644
--- a/web/gui2/src/main/webapp/app/view/tunnel/BUILD.bazel
+++ b/web/gui2/src/main/webapp/app/view/tunnel/BUILD.bazel
@@ -33,6 +33,7 @@
"**/*.html",
]),
module_name = "gui2-view-tunnel",
+ tsconfig = "//web/gui2:tsconfig.json",
deps = [
"//web/gui2-fw-lib",
"@npm//@angular/animations",
diff --git a/web/gui2/src/main/webapp/app/view/tunnel/tunnel.module.ts b/web/gui2/src/main/webapp/app/view/tunnel/tunnel.module.ts
index 0c50567..48f5cdb 100644
--- a/web/gui2/src/main/webapp/app/view/tunnel/tunnel.module.ts
+++ b/web/gui2/src/main/webapp/app/view/tunnel/tunnel.module.ts
@@ -17,13 +17,12 @@
import {CommonModule} from '@angular/common';
import {TunnelComponent} from './tunnel/tunnel.component';
-import { Gui2FwLibModule } from '../../../../../../../gui2-fw-lib/public_api';
+import { Gui2FwLibModule } from 'gui2-fw-lib/public_api';
import {RouterModule} from '@angular/router';
@NgModule({
imports: [
CommonModule,
- RouterModule,
RouterModule.forChild([{path: '', component: TunnelComponent}]),
Gui2FwLibModule
],
diff --git a/web/gui2/src/main/webapp/app/view/tunnel/tunnel/tunnel.component.ts b/web/gui2/src/main/webapp/app/view/tunnel/tunnel/tunnel.component.ts
index 6e5556d..93f2735 100644
--- a/web/gui2/src/main/webapp/app/view/tunnel/tunnel/tunnel.component.ts
+++ b/web/gui2/src/main/webapp/app/view/tunnel/tunnel/tunnel.component.ts
@@ -19,7 +19,7 @@
LogService,
WebSocketService,
SortDir, TableBaseImpl, TableResponse
-} from '../../../../../../../../gui2-fw-lib/public_api';
+} from 'gui2-fw-lib/public_api';
/**
* Model of the response from WebSocket
diff --git a/web/gui2/src/main/webapp/initialize_testbed.ts b/web/gui2/src/main/webapp/initialize_testbed.ts
new file mode 100644
index 0000000..68a9b1c
--- /dev/null
+++ b/web/gui2/src/main/webapp/initialize_testbed.ts
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2020-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.
+ */
+
+/**
+ * @fileoverview Provides a script to initialize TestBed before tests are run.
+ * This file should be included in the "runtime_deps" of a "karma_web_test_suite"
+ * rule.
+ */
+import {TestBed} from '@angular/core/testing';
+import {BrowserDynamicTestingModule, platformBrowserDynamicTesting} from '@angular/platform-browser-dynamic/testing';
+
+TestBed.initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());
diff --git a/web/gui2/src/main/webapp/onos.dev.ts b/web/gui2/src/main/webapp/onos.dev.ts
new file mode 100644
index 0000000..aa063b6
--- /dev/null
+++ b/web/gui2/src/main/webapp/onos.dev.ts
@@ -0,0 +1,23 @@
+/*
+ * Copyright 2020-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.
+ */
+
+/**
+ * Used to launch the application under Bazel development mode.
+ */
+import {platformBrowser} from '@angular/platform-browser';
+import {OnosModule} from './app/onos.module';
+
+platformBrowser().bootstrapModule(OnosModule);
diff --git a/web/gui2/src/main/webapp/rxjs_shims.js b/web/gui2/src/main/webapp/rxjs_shims.js
new file mode 100644
index 0000000..2c80665
--- /dev/null
+++ b/web/gui2/src/main/webapp/rxjs_shims.js
@@ -0,0 +1,44 @@
+/**
+ * @license
+ * Copyright Google Inc. All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+
+/**
+ * @fileoverview these provide named UMD modules so that we can bundle
+ * the application along with rxjs using the concatjs bundler.
+ */
+
+// rxjs/operators
+(function(factory) {
+ if (typeof module === 'object' && typeof module.exports === 'object') {
+ var v = factory(require, exports);
+ if (v !== undefined) module.exports = v;
+ } else if (typeof define === 'function' && define.amd) {
+ define('rxjs/operators', ['exports', 'rxjs'], factory);
+ }
+})(function(exports, rxjs) {
+ 'use strict';
+ Object.keys(rxjs.operators).forEach(function(key) {
+ exports[key] = rxjs.operators[key];
+ });
+ Object.defineProperty(exports, '__esModule', {value: true});
+});
+
+// rxjs/testing
+(function(factory) {
+ if (typeof module === 'object' && typeof module.exports === 'object') {
+ var v = factory(require, exports);
+ if (v !== undefined) module.exports = v;
+ } else if (typeof define === 'function' && define.amd) {
+ define('rxjs/testing', ['exports', 'rxjs'], factory);
+ }
+})(function(exports, rxjs) {
+ 'use strict';
+ Object.keys(rxjs.testing).forEach(function(key) {
+ exports[key] = rxjs.testing[key];
+ });
+ Object.defineProperty(exports, '__esModule', {value: true});
+});