GUI2 Framework as a standalone NPM Library
There are a few changes going on here
1) The fw part of GUI has been moved out in to its own project
a) several files are renamed (files 21-83)
b) the project has its own BUILD file (file 5)
c) there are a few files created by Angular CLI here - mostly script generated (files 7-20)
d) package-lock.json is a big generated file that has to be versioned (file 13)
2) The view in the main GUI2 project now refer to this library (see BUILD file 110)
a) some useless files were removed (files 115 - 139)
b) several files are changed to update references (files 140-202)
c) this breaks the BUCK build so I've removed the BUCK file and references to it (file 109)
Change-Id: I48bc3253edfcf5947f1582731ba739a1296012f5
diff --git a/web/gui2/BUCK b/web/gui2/BUCK
deleted file mode 100644
index 4a42328..0000000
--- a/web/gui2/BUCK
+++ /dev/null
@@ -1,156 +0,0 @@
-NODE_VERSION = "v8.11.1"
-
-COMPILE_DEPS = [
- '//lib:CORE_DEPS',
- '//lib:JACKSON',
- '//lib:KRYO',
- '//lib:javax.ws.rs-api',
- '//lib:servlet-api',
- '//lib:jetty-websocket',
- '//lib:jetty-util',
- '//lib:jersey-media-multipart',
- '//lib:org.apache.karaf.shell.console',
- '//cli:onos-cli',
- '//lib:jersey-server',
- '//incubator/api:onos-incubator-api',
- '//incubator/net:onos-incubator-net',
- '//utils/rest:onlab-rest',
- '//core/store/serializers:onos-core-serializers',
- ':node-release-' + NODE_VERSION,
- ':node-bin-' + NODE_VERSION,
- '//web/gui2:onos-web-gui2-build',
-]
-
-TEST_DEPS = [
- '//lib:TEST',
- '//core/api:onos-api-tests',
- '//drivers/default:onos-drivers-default',
-]
-
-include_defs('//bucklets/node.bucklet')
-
-fetch_node(version = NODE_VERSION)
-
-genrule(
- name = 'onos-web-gui2-build',
- srcs = glob([
- '**/*.json',
- 'src/main/webapp/**/*.ts',
- 'src/main/webapp/**/*.html',
- 'src/main/webapp/**/*.css',
- 'src/main/webapp/**/*.png',
- '*.js',
- 'e2e/**/*'
- ], excludes = [
- 'dist/**/*',
- 'node_modules/**/*',
- 'src/main/webapp/dist/**/*'
- ]),
- bash =
-#To avoid any older 'NodeJS' installations it is necessary to use only the one
-# associated with this project - Angular 6 won't work on older releases
- 'export PATH=$(location :node-bin-' + NODE_VERSION + ')/bin:$PATH; '
- + 'echo $PATH;'
- + '$(location :node-bin-' + NODE_VERSION + ')/bin/node -v;'
- + 'ORIGPATH="$SRCDIR";'
- + 'cd $(location :node-bin-' + NODE_VERSION + ')/bin &&'
- + 'ln -sf ../lib/node_modules/npm/bin/npm-cli.js npm5 &&'
- + 'cd $ORIGPATH &&'
-# The symlink to npm is not always created properly by the BUCK job that
-# untars it. It's safer to have our own symlink 'npm5'
- + 'npm5 -v;'
- + 'npm5 install -g @angular/cli@6.0.0 2>&1;'
- + 'npm5 install 2>&1;'
- + 'ng -v;'
-# Build it in production mode - optimization is turned off because of Angular CLI 6.0.x bug https://github.com/angular/angular-cli/issues/7799
- + 'ng build --extract-css --prod --optimization=false --preserve-symlinks --base-href /onos/ui2/dist/ --deploy-url /onos/ui2/dist/ --output-path="$OUT" 2>&1',
- out = 'dist',
- visibility = [ 'PUBLIC' ],
-)
-
-genrule(
- name = 'onos-web-gui2-test',
- srcs = [],
- bash =
- 'export PATH=$(location :node-bin-' + NODE_VERSION + ')/bin:$PATH; '
- + 'ORIGPATH="$SRCDIR";'
- + 'ORIGOUTPUT=\$(echo $ORIGPATH|cut -d\'_\' -f 1 );'
- + 'cd $(location :onos-web-gui2-build)/../../onos-web-gui2-build__srcs;'
- # The sym linked karma.conf.js will mean that 'karma-jasmine' won't be found
- + 'cp karma.conf.js karma.conflocal.js;'
- + 'pwd > "$OUT";'
- + 'npm5 -v >> "$OUT";'
- + 'ng -v >> "$OUT";'
- + 'if [ -f /usr/bin/chromium-browser ]; then export CHROME_BIN=/usr/bin/chromium-browser; fi;'
- + 'echo $CHROME_BIN >> "$OUT";'
- # No point using PhantonJS as the browser because it's not compatible with ES6
- # Install either chrome or chromium-browser on the machine
- + 'ng test --preserve-symlinks --karma-config=karma.conflocal.js --code-coverage --browsers=ChromeHeadless --watch=false >> "$OUT" 2>&1 || '
- + 'if [ $? -eq 0 ]; then echo "Successfully ran tests";'
- + 'else '
- + ' if grep -q CHROME_BIN $ORIGOUTPUT/onos-web-gui2-test-log.txt ; then '
- + ' echo "Warning: Step onos-web-gui2-test (test of Angular code) skipped because no binary for ChromeHeadless browser was found on your platform." >&2;'
- + ' echo "Install Google Chrome or Chromium Browser to allow this step to run." >&2;'
- + ' else '
- + ' echo "Error running \'ng test\' on \'//web/gui2:onos-web-gui2-test\'. See $ORIGOUTPUT/onos-web-gui2-test-log.txt for more details" >&2;'
- + ' tail -n 100 $OUT >&2;'
- + ' exit 1;'
- + ' fi;'
- + 'fi;',
- out = 'onos-web-gui2-test-log.txt',
-)
-
-genrule(
- name = 'onos-web-gui2-lint',
- srcs = [],
- bash =
- 'export PATH=$(location :node-bin-' + NODE_VERSION + ')/bin:$PATH; '
- + 'cd $(location :onos-web-gui2-build)/../../onos-web-gui2-build__srcs;'
- + 'ng lint >> "$OUT" 2>&1 || '
- + 'if [ $? -eq 0 ]; then echo "Successfully ran lint";'
- + 'else '
- + ' cat $OUT >&2;'
- + ' exit 1;'
- + 'fi;',
- out = 'onos-web-gui2-lint-log.txt',
-)
-
-genrule(
- name = 'onos-web-gui2-compodoc',
- srcs = [],
- bash =
- 'export PATH=$(location :node-bin-' + NODE_VERSION + ')/bin:$PATH; '
- + 'cd $(location :onos-web-gui2-build) && cd ../.. && cd onos-web-gui2-build__srcs;'
- + 'pwd;'
- + 'npm5 -v;'
- + 'npm5 install -g @compodoc/compodoc 2>&1;'
- + 'npm5 run compodoc -- -V;'
-# TODO This does not pick up on sym linked files - issue raised with authors
- + 'npm5 run compodoc -- -d "$OUT"',
- out = 'documentation',
-)
-
-osgi_jar_with_tests (
- name = 'onos-gui2',
- deps = COMPILE_DEPS,
- test_deps = TEST_DEPS,
- resources = [
- ':onos-web-gui2-build'
- ],
- resources_root = '.',
- test_resources = [
- ':onos-web-gui2-test',
- ':onos-web-gui2-lint'
- ],
- test_resources_root = '.',
- web_context = '/onos/ui2',
- do_javadocs = False,
-)
-
-onos_app (
- title = 'ONOS GUI v2 Application',
- category = 'GUI',
- url = 'http://onosproject.org',
- description = 'ONOS GUI v2 based on Angular 6',
- included_bundles = ['//web/gui2:onos-gui2'],
-)
diff --git a/web/gui2/BUILD b/web/gui2/BUILD
index fec16c8..1cf4bdb 100644
--- a/web/gui2/BUILD
+++ b/web/gui2/BUILD
@@ -98,44 +98,14 @@
)
"""
- Install npm packages listed in package.json in web/gui2
- See bazel-genfiles/web/gui2/onos-gui2-npm-install.log for details of the 'npm install'
-"""
-
-genrule(
- name = "_onos-gui2-npm-install",
- srcs = [
- "@nodejs//:bin/npm",
- "@nodejs//:bin/node",
- "@nodejs//:bin/node.js",
- "@nodejs//:bin/nodejs/bin/node",
- "@nodejs//:bin/nodejs/bin/npm",
- ":_root_level_files",
- ],
- outs = [
- "onos-gui2-npm-install.jar",
- "onos-gui2-npm-install.log",
- ],
- cmd = " ROOT=`pwd` &&" +
- " export HOME=. &&" +
- " export XDG_CONFIG_HOME=$(@D)/config &&" + # npm config cache to the sandbox
- " export BABEL_DISABLE_CACHE=1 &&" + # turn off babel cache
- ' if [[ ! -z $${HTTP_PROXY-} ]]; then NPM_ARGS="--proxy $$HTTP_PROXY --without-ssl --insecure"; else NPM_ARGS=""; fi &&' +
- " NPM=$(location @nodejs//:bin/npm) &&" +
- " export PATH=$$ROOT/$$(dirname $${NPM}):$$PATH &&" +
- " mkdir -p web/gui2 &&" +
- " cd web/gui2 &&" +
- " npm -v > $$ROOT/$(location onos-gui2-npm-install.log) 2>&1 &&" +
- " npm $$NPM_ARGS install --no-cache >> $$ROOT/$(location onos-gui2-npm-install.log) 2>&1 &&" +
- " jar Mcf $$ROOT/$(location onos-gui2-npm-install.jar) . &&" +
- " touch $$ROOT/$(location onos-gui2-npm-install.log)", # to get the log always as the 2nd file
- message = "NodeJS npm install in web/gui2",
- visibility = ["//visibility:public"],
-)
-
-"""
Run ng build to create outputs in production mode
See bazel-genfiles/web/gui2/onos-gui2-ng-build-prod.log for details of the Angular CLI output
+
+ To avoid the overhead of having several "npm install" invocations, we just do
+ it once in the //web/gui2-fw-lib which is really the core for the whole Angular 6
+ structure in ONOS. This copies files in to node_modules, but because the gui2-fw-lib
+ has not been generated at that time we copy it in separately below with the 'tar' cmd
+ and then 'mv'
"""
genrule(
@@ -146,7 +116,10 @@
"@nodejs//:bin/node.js",
"@nodejs//:bin/nodejs/bin/node",
"@nodejs//:bin/nodejs/bin/npm",
- ":_onos-gui2-npm-install",
+ "//web/gui2-fw-lib:onos-gui2-fw-npm-install",
+ "//web/gui2-fw-lib:onos-gui2-fw-ng-build",
+ "//web/gui2-fw-lib:gui2_fw_lib_ext_css",
+ ":_root_level_files",
":_web_app_all",
],
outs = [
@@ -157,17 +130,24 @@
" export HOME=. &&" +
" export XDG_CONFIG_HOME=$(@D)/config &&" +
" NODE=$(location @nodejs//:bin/node) &&" +
- " INSTALL_FILES=($(locations :_onos-gui2-npm-install)) &&" + # An array of filenames - sorted by time created
+ " INSTALL_FILES=($(locations //web/gui2-fw-lib:onos-gui2-fw-npm-install)) &&" + # An array of filenames - sorted by time created
+ " FWLIB_FILES=($(locations //web/gui2-fw-lib:onos-gui2-fw-ng-build)) &&" + # An array of filenames - sorted by time created
" mkdir -p web/gui2 && cd web/gui2 &&" +
" jar xf ../../$(location :_web_app_all) &&" +
" jar xf $$ROOT/$${INSTALL_FILES[0]} &&" +
+ " tar xf $$ROOT/$${FWLIB_FILES[0]} &&" +
+ " mv package/ node_modules/gui2-fw-lib/ &&" +
+ " mkdir -p src/main/webapp/app/fw &&" +
+ " (cd src/main/webapp/app/fw &&" +
+ " jar xf $$ROOT/$(location //web/gui2-fw-lib:gui2_fw_lib_ext_css)) &&" +
" chmod +x $$ROOT/web/gui2/node_modules/@angular/cli/bin/ng &&" +
" export PATH=$$ROOT/$$(dirname $${NODE}):$$ROOT/web/gui2/node_modules/@angular/cli/bin:$$PATH &&" +
" node -v > ../../$(location onos-gui2-ng-build-prod.log) &&" +
" npm -v >> ../../$(location onos-gui2-ng-build-prod.log) &&" +
" ng -v >> ../../$(location onos-gui2-ng-build-prod.log) &&" +
# Build it in production mode - optimization is turned off because of Angular CLI 6.0.x bug https://github.com/angular/angular-cli/issues/7799
- " ng build --extract-css --prod --optimization=false --preserve-symlinks --base-href /onos/ui2/ --deploy-url /onos/ui2/ >> $$ROOT/$(location onos-gui2-ng-build-prod.log) 2>&1 &&" +
+ " ng build --extract-css --prod --optimization=false --preserve-symlinks" +
+ " --base-href /onos/ui2/ --deploy-url /onos/ui2/ >> $$ROOT/$(location onos-gui2-ng-build-prod.log) 2>&1 &&" +
" cd src/main/webapp/dist && jar Mcf $$ROOT/$(location onos-gui2-ng-build.jar) .",
message = "Angular CLI 6 build",
)
@@ -186,7 +166,9 @@
"@nodejs//:bin/node.js",
"@nodejs//:bin/nodejs/bin/node",
"@nodejs//:bin/nodejs/bin/npm",
- ":_onos-gui2-npm-install",
+ "//web/gui2-fw-lib:onos-gui2-fw-npm-install",
+ "//web/gui2-fw-lib:onos-gui2-fw-ng-build",
+ "//web/gui2-fw-lib:gui2_fw_lib_ext_css",
":_web_app_all",
":_web_app_tests",
":_angular_all",
@@ -200,13 +182,19 @@
" export HOME=. &&" +
" export XDG_CONFIG_HOME=$(@D)/config &&" +
" NODE=$(location @nodejs//:bin/node) &&" +
- " INSTALL_FILES=($(locations :_onos-gui2-npm-install)) &&" + # An array of filenames - sorted by time created
+ " INSTALL_FILES=($(locations //web/gui2-fw-lib:onos-gui2-fw-npm-install)) &&" + # An array of filenames - sorted by time created
+ " FWLIB_FILES=($(locations //web/gui2-fw-lib:onos-gui2-fw-ng-build)) &&" + # An array of filenames - sorted by time created
" mkdir -p web/gui2 &&" +
" cd web/gui2 &&" +
" jar xf ../../$(location :_angular_all) &&" +
" jar xf ../../$(location :_web_app_all) &&" +
" jar xf ../../$(location :_web_app_tests) &&" +
" jar xf $$ROOT/$${INSTALL_FILES[0]} &&" +
+ " tar xf $$ROOT/$${FWLIB_FILES[0]} &&" +
+ " mv package/ node_modules/gui2-fw-lib/ &&" +
+ " mkdir -p src/main/webapp/app/fw &&" +
+ " (cd src/main/webapp/app/fw &&" +
+ " jar xf $$ROOT/$(location //web/gui2-fw-lib:gui2_fw_lib_ext_css)) &&" +
" chmod +x $$ROOT/web/gui2/node_modules/@angular/cli/bin/ng &&" +
" export PATH=$$ROOT/$$(dirname $${NODE}):$$ROOT/web/gui2/node_modules/@angular/cli/bin:$$PATH &&" +
" node -v > ../../$(location onos-gui2-ng-ver.log) &&" +
diff --git a/web/gui2/karma.conf.js b/web/gui2/karma.conf.js
index f3b73b4..f43983a 100644
--- a/web/gui2/karma.conf.js
+++ b/web/gui2/karma.conf.js
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
+
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
diff --git a/web/gui2/package-lock.json b/web/gui2/package-lock.json
index 2c1ad19..6e7c6ab 100644
--- a/web/gui2/package-lock.json
+++ b/web/gui2/package-lock.json
@@ -8073,6 +8073,13 @@
"integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=",
"dev": true
},
+ "gui2-fw-lib": {
+ "version": "file:../gui2-fw-lib/dist/gui2-fw-lib/gui2-fw-lib-0.0.1.tgz",
+ "integrity": "sha512-Dab+l5aV2IBjZr2pieVcuZBRiWUFpwcJdM1WSTErdKE4BrXk2GKbYbmaPwJoVX8XnYlHXFYhmli2jyqn/RC4CQ==",
+ "requires": {
+ "tslib": "1.9.0"
+ }
+ },
"handle-thing": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-1.2.5.tgz",
diff --git a/web/gui2/package.json b/web/gui2/package.json
index f122bb7..3e88605 100644
--- a/web/gui2/package.json
+++ b/web/gui2/package.json
@@ -24,6 +24,7 @@
"@angular/router": "^6.0.0",
"core-js": "^2.5.4",
"d3": "^5.2.0",
+ "gui2-fw-lib": "file:../gui2-fw-lib/dist/gui2-fw-lib/gui2-fw-lib-0.14.0.tgz",
"rxjs": "^6.0.0",
"zone.js": "^0.8.26"
},
diff --git a/web/gui2/protractor.conf.js b/web/gui2/protractor.conf.js
index 7ee3b5e..9479928 100644
--- a/web/gui2/protractor.conf.js
+++ b/web/gui2/protractor.conf.js
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
+
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
diff --git a/web/gui2/src/main/webapp/app/README.txt b/web/gui2/src/main/webapp/app/README.txt
deleted file mode 100644
index 820f36e..0000000
--- a/web/gui2/src/main/webapp/app/README.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-# Main ONOS UI Web Application
-
-../index.html is the main launch point for the application.
-
-fw/ contains framework related code
-
-view/ contains view related code
-
-Device View - Shows the registered devices and navigates to/from port, flow, group, meter view
- DeviceDetails view on device row selection
- Added search option based on device id, name, etc.
- Details panel view on row selection of port and flow view
-
- Navigation to pipeconf view on device view isn't implemented yet
- Editing friendly name into the details panel isn't implemented yet
-
-Host View - Shows the hosts attached with the registered devices
- HostDetails view on host row selection
- Editing friendly name into the details panel isn't implemented yet
-
-Link View - Shows the links between the devices
-
-Tunnel View - Shows the tunnels created between two end-points
\ No newline at end of file
diff --git a/web/gui2/src/main/webapp/app/consolelogger.service.ts b/web/gui2/src/main/webapp/app/consolelogger.service.ts
deleted file mode 100644
index a682fb3..0000000
--- a/web/gui2/src/main/webapp/app/consolelogger.service.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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 { Injectable } from '@angular/core';
-import { environment } from '../environments/environment';
-import { Logger } from './log.service';
-
-export let isDebugMode: boolean = !environment.production;
-
-const noop = (): any => undefined;
-
-/**
- * ONOS GUI -- LogService
- * Inspired by https://robferguson.org/blog/2017/09/09/a-simple-logging-service-for-angular-4/
- */
-@Injectable({
- providedIn: 'root',
-})
-export class ConsoleLoggerService implements Logger {
-
- get debug() {
- if (isDebugMode) {
- return console.debug.bind(console);
- } else {
- return noop;
- }
- }
-
- get info() {
- if (isDebugMode) {
- return console.info.bind(console);
- } else {
- return noop;
- }
- }
-
- get warn() {
- return console.warn.bind(console);
- }
-
- get error() {
- return console.error.bind(console);
- }
-
- invokeConsoleMethod(type: string, args?: any): void {
- const logFn: Function = (console)[type] || console.log || noop;
- logFn.apply(console, [args]);
- }
-}
diff --git a/web/gui2/src/main/webapp/app/detectbrowser.directive.ts b/web/gui2/src/main/webapp/app/detectbrowser.directive.ts
deleted file mode 100644
index a65dec7..0000000
--- a/web/gui2/src/main/webapp/app/detectbrowser.directive.ts
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright 2014-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 { Inject } from '@angular/core';
-import { Directive } from '@angular/core';
-import { FnService } from './fw/util/fn.service';
-import { LogService } from './log.service';
-import { OnosService } from './onos.service';
-
-/**
- * ONOS GUI -- Detect Browser Directive
- */
-@Directive({
- selector: '[onosDetectBrowser]'
-})
-export class DetectBrowserDirective {
- constructor(
- private fs: FnService,
- private log: LogService,
- private onos: OnosService,
- @Inject('Window') private w: Window
- ) {
- const body: HTMLBodyElement = document.getElementsByTagName('body')[0];
-// let body = d3.select('body');
- let browser = '';
- if (fs.isChrome()) {
- browser = 'chrome';
- } else if (fs.isChromeHeadless()) {
- browser = 'chromeheadless';
- } else if (fs.isSafari()) {
- browser = 'safari';
- } else if (fs.isFirefox()) {
- browser = 'firefox';
- } else {
- this.log.warn('Unknown browser. ',
- 'Vendor:', this.w.navigator.vendor,
- 'Agent:', this.w.navigator.userAgent);
- return;
- }
- body.classList.add(browser);
-// body.classed(browser, true);
- this.onos.browser = browser;
-
- if (fs.isMobile()) {
- body.classList.add('mobile');
- this.onos.mobile = true;
- }
-
- this.log.debug('Detected browser is', fs.cap(browser));
- }
-}
diff --git a/web/gui2/src/main/webapp/app/fw/layer/confirm/confirm.component.css b/web/gui2/src/main/webapp/app/fw/layer/confirm/confirm.component.css
deleted file mode 100644
index b097534..0000000
--- a/web/gui2/src/main/webapp/app/fw/layer/confirm/confirm.component.css
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 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.
- */
-
-/*
- ONOS GUI -- Confirm Component (layout) -- CSS file
- */
-#app-dialog {
- top: 140px;
- padding: 12px;
-}
-
-#app-dialog h3 {
- display: inline-block;
- font-weight: bold;
- font-size: 18pt;
-}
-
-#app-dialog p {
- font-size: 12pt;
-}
-
-#app-dialog p.strong {
- font-weight: bold;
- padding: 8px;
- text-align: center;
-}
diff --git a/web/gui2/src/main/webapp/app/fw/layer/confirm/confirm.component.html b/web/gui2/src/main/webapp/app/fw/layer/confirm/confirm.component.html
deleted file mode 100644
index a8e2489..0000000
--- a/web/gui2/src/main/webapp/app/fw/layer/confirm/confirm.component.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!--
-~ 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.
--->
-<div id="app-dialog" class="floatpanel dialog" [@confirmDlgState]="message!==''">
- <h3> {{ lionFn('dlg_confirm_action') }} </h3>
- <p>{{ message }}</p>
- <p *ngIf="warning" class="warning strong">{{ warning }}</p>
- <div tabindex="10" class="dialog-button" (click)="choice(true)">OK</div>
- <div tabindex="11" class="dialog-button" (click)="choice(false)">Cancel</div>
-</div>
\ No newline at end of file
diff --git a/web/gui2/src/main/webapp/app/fw/layer/confirm/confirm.component.spec.ts b/web/gui2/src/main/webapp/app/fw/layer/confirm/confirm.component.spec.ts
deleted file mode 100644
index bf13589..0000000
--- a/web/gui2/src/main/webapp/app/fw/layer/confirm/confirm.component.spec.ts
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * 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 { BrowserAnimationsModule } from '@angular/platform-browser/animations';
-import { DebugElement } from '@angular/core';
-import { By } from '@angular/platform-browser';
-import { LionService } from '../../../fw/util/lion.service';
-
-import { ConsoleLoggerService } from '../../../consolelogger.service';
-import { LogService } from '../../../log.service';
-import { ConfirmComponent } from './confirm.component';
-
-/**
- * ONOS GUI -- Layer -- Confirm Component - Unit Tests
- */
-describe('ConfirmComponent', () => {
- let log: LogService;
- let component: ConfirmComponent;
- let fixture: ComponentFixture<ConfirmComponent>;
- const bundleObj = {
- 'core.view.App': {
- test: 'test1'
- }
- };
- const mockLion = (key) => {
- return bundleObj[key] || '%' + key + '%';
- };
-
- beforeEach(async(() => {
- log = new ConsoleLoggerService();
- TestBed.configureTestingModule({
- imports: [ BrowserAnimationsModule ],
- declarations: [ ConfirmComponent ],
- providers: [
- { provide: LogService, useValue: log },
- {
- provide: LionService, useFactory: (() => {
- return {
- bundle: ((bundleId) => mockLion),
- ubercache: new Array(),
- loadCbs: new Map<string, () => void>([])
- };
- })
- },
- ]
- });
- }));
-
- beforeEach(() => {
- fixture = TestBed.createComponent(ConfirmComponent);
- component = fixture.debugElement.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-
- it('should have a h3 inside a div#app-dialog', () => {
- const appDe: DebugElement = fixture.debugElement;
- const divDe = appDe.query(By.css('div#app-dialog h3'));
- const div: HTMLElement = divDe.nativeElement;
- expect(div.textContent).toEqual(' %dlg_confirm_action% ');
- });
-
- it('should have a div.dialog-button inside a div#app-dialog', () => {
- const appDe: DebugElement = fixture.debugElement;
- const divDe = appDe.query(By.css('div#app-dialog div.dialog-button'));
- const div: HTMLElement = divDe.nativeElement;
- // It selects the first one
- expect(div.textContent).toEqual('OK');
- });
-});
diff --git a/web/gui2/src/main/webapp/app/fw/layer/confirm/confirm.component.ts b/web/gui2/src/main/webapp/app/fw/layer/confirm/confirm.component.ts
deleted file mode 100644
index 5c5bad2..0000000
--- a/web/gui2/src/main/webapp/app/fw/layer/confirm/confirm.component.ts
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * 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 { Component, Input, Output, EventEmitter } from '@angular/core';
-import { trigger, state, style, animate, transition } from '@angular/animations';
-import { LogService } from '../../../log.service';
-import { LionService } from '../../../fw/util/lion.service';
-
-/**
- * ONOS GUI -- Layer -- Confirm Component
- *
- * Replaces Flash Service in old GUI.
- * Provides a mechanism to present a confirm dialog to the screen
- *
- * To use add an element to the template like
- * <onos-confirm message="Performing something dangerous. Would you like to proceed"></onos-flash>
- *
- * An event is raised with either OK or Cancel
- */
-@Component({
- selector: 'onos-confirm',
- templateUrl: './confirm.component.html',
- styleUrls: [
- './confirm.component.css',
- './confirm.theme.css',
- '../dialog.css',
- '../dialog.theme.css',
- '../../widget/panel.css',
- '../../widget/panel-theme.css'
- ],
- animations: [
- trigger('confirmDlgState', [
- state('true', style({
- transform: 'translateX(-100%)',
- opacity: '100'
- })),
- state('false', style({
- transform: 'translateX(0%)',
- opacity: '0'
- })),
- transition('0 => 1', animate('100ms ease-in')),
- transition('1 => 0', animate('100ms ease-out'))
- ])
- ]
-})
-export class ConfirmComponent {
-
- lionFn; // Function
-
- @Input() message: string;
- @Input() warning: string;
- @Output() chosen: EventEmitter<boolean> = new EventEmitter();
-
- constructor(
- private log: LogService,
- private lion: LionService,
- ) {
- this.log.debug('ConfirmComponent constructed');
- this.doLion();
- }
-
- /**
- * When OK or Cancel is pressed, send an event to parent with choice
- */
- choice(chosen: boolean): void {
- this.chosen.emit(chosen);
- }
-
- /**
- * Read the LION bundle for App to get confirm dialouge header
- */
- doLion() {
- this.lionFn = this.lion.bundle('core.view.App');
- }
-}
diff --git a/web/gui2/src/main/webapp/app/fw/layer/confirm/confirm.theme.css b/web/gui2/src/main/webapp/app/fw/layer/confirm/confirm.theme.css
deleted file mode 100644
index db97648..0000000
--- a/web/gui2/src/main/webapp/app/fw/layer/confirm/confirm.theme.css
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * 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.
- */
-
-/*
- ONOS GUI -- Confirm Component (theme) -- CSS file
- */
-/* temporarily removed .light */
-#app-dialog p.strong {
- color: white;
- background-color: #ce5b58;
-}
-
-#app-dialog.floatpanel.dialog {
- background-color: #ffffff;
-}
-
-#app-dialog p.strong {
- color: white;
- background-color: #ce5b58;
-}
diff --git a/web/gui2/src/main/webapp/app/fw/layer/dialog.css b/web/gui2/src/main/webapp/app/fw/layer/dialog.css
deleted file mode 100644
index fdb33d1..0000000
--- a/web/gui2/src/main/webapp/app/fw/layer/dialog.css
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2016-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.
- */
-
-/*
- ONOS GUI -- Dialog Service (layout) -- CSS file
- */
-
-.dialog h2 {
- margin: 0;
- word-wrap: break-word;
- display: inline-block;
- width: 210px;
- vertical-align: middle;
-}
-
-.dialog .dialog-button {
- display: inline-block;
- cursor: pointer;
- height: 20px;
- padding: 6px 8px 2px 8px;
- margin: 4px;
- float: right;
-}
diff --git a/web/gui2/src/main/webapp/app/fw/layer/dialog.service.ts b/web/gui2/src/main/webapp/app/fw/layer/dialog.service.ts
deleted file mode 100644
index 378cd9b..0000000
--- a/web/gui2/src/main/webapp/app/fw/layer/dialog.service.ts
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2016-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 { Injectable } from '@angular/core';
-
-import { FnService } from '../util/fn.service';
-import { KeyService } from '../util/key.service';
-import { LogService } from '../../log.service';
-
-/**
- * ONOS GUI -- Layer -- Dialog Service
- *
- * Builds on the panel service to provide dialog functionality.
- */
-@Injectable({
- providedIn: 'root',
-})
-export class DialogService {
-
- constructor(
- private fs: FnService,
- private ks: KeyService,
- private log: LogService,
- ) {
- this.log.debug('DialogService constructed');
- }
-
- createDiv() {
- }
-
-}
diff --git a/web/gui2/src/main/webapp/app/fw/layer/dialog.theme.css b/web/gui2/src/main/webapp/app/fw/layer/dialog.theme.css
deleted file mode 100644
index dfcc3cc..0000000
--- a/web/gui2/src/main/webapp/app/fw/layer/dialog.theme.css
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2016-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.
- */
-
-/*
- ONOS GUI -- Dialog Service (theme) -- CSS file
- */
-
-/* temporarily removed .light */
-.dialog .dialog-button {
- background-color: #518ecc;
- color: white;
-}
-
-
-/* ========== DARK Theme ========== */
-
-.dark .dialog .dialog-button {
- background-color: #345e85;
- color: #cccccd;
-}
diff --git a/web/gui2/src/main/webapp/app/fw/layer/editabletext.service.ts b/web/gui2/src/main/webapp/app/fw/layer/editabletext.service.ts
deleted file mode 100644
index 068e0cc..0000000
--- a/web/gui2/src/main/webapp/app/fw/layer/editabletext.service.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2017-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 { Injectable } from '@angular/core';
-import { KeyService } from '../util/key.service';
-import { LogService } from '../../log.service';
-import { WebSocketService } from '../remote/websocket.service';
-
-/**
- * ONOS GUI -- Layer -- Editable Text Service
- */
-@Injectable()
-export class EditableTextService {
-
- constructor(
- private ks: KeyService,
- private log: LogService,
- private wss: WebSocketService
- ) {
- this.log.debug('EditableTextService constructed');
- }
-
-}
diff --git a/web/gui2/src/main/webapp/app/fw/layer/flash/flash.component.css b/web/gui2/src/main/webapp/app/fw/layer/flash/flash.component.css
deleted file mode 100644
index 66b8f3b..0000000
--- a/web/gui2/src/main/webapp/app/fw/layer/flash/flash.component.css
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * 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.
- */
-
-/*
- ONOS GUI -- Flash Component (layout) -- CSS file
- */
-
-#flash {
- position: fixed;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- z-index: 1400;
-}
-
-#flash.warning div#flashBox {
- border: 2px solid #222222;
- border-radius: 10px;
- background: #FFFFFF;
- padding: 10px;
-}
-
-#flash div#flashBox {
- background: #CCCCCC;
- border-radius: 10px;
- padding: 1px;
-}
-
-#flash div#flashBox div.dialog-button {
- transform :translateY(-32px);
-}
-
-#flash.warning p#flashText {
- stroke: #FF0000;
- color: #FF0000;
- text-anchor: middle;
- alignment-baseline: middle;
- text-align: center;
- font-size: 16pt;
- border-radius: 10px;
- background: #FFFFFF;
- padding: 10px;
-}
-
-#flash p#flashText {
- stroke: none;
- color: #222222;
- text-anchor: middle;
- alignment-baseline: middle;
- text-align: center;
- font-size: 16pt;
- border-radius: 10px;
- background: #CCCCCC;
- padding: 5px;
-}
diff --git a/web/gui2/src/main/webapp/app/fw/layer/flash/flash.component.html b/web/gui2/src/main/webapp/app/fw/layer/flash/flash.component.html
deleted file mode 100644
index 46b6de9..0000000
--- a/web/gui2/src/main/webapp/app/fw/layer/flash/flash.component.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!--
-~ 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.
--->
-<div id="flash" class="dialog" [ngClass]="warning?'warning':''" [@flashState]="visible">
- <div id="flashBox" *ngIf="visible">
- <p id="flashText">{{ message }}</p>
- <div class="dialog-button" *ngIf="dwell>1200" (click)="closeNow()">Dismiss</div>
- </div>
-</div>
\ No newline at end of file
diff --git a/web/gui2/src/main/webapp/app/fw/layer/flash/flash.component.spec.ts b/web/gui2/src/main/webapp/app/fw/layer/flash/flash.component.spec.ts
deleted file mode 100644
index 14efa19..0000000
--- a/web/gui2/src/main/webapp/app/fw/layer/flash/flash.component.spec.ts
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * 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 { BrowserAnimationsModule } from '@angular/platform-browser/animations';
-import { DebugElement } from '@angular/core';
-import { By } from '@angular/platform-browser';
-
-import { ConsoleLoggerService } from '../../../consolelogger.service';
-import { LogService } from '../../../log.service';
-import { FlashComponent } from './flash.component';
-
-/**
- * ONOS GUI -- Layer -- Flash Component - Unit Tests
- */
-describe('FlashComponent', () => {
- let log: LogService;
- let component: FlashComponent;
- let fixture: ComponentFixture<FlashComponent>;
-
- beforeEach(async(() => {
- log = new ConsoleLoggerService();
- TestBed.configureTestingModule({
- imports: [ BrowserAnimationsModule ],
- declarations: [ FlashComponent ],
- providers: [
- { provide: LogService, useValue: log },
- ]
- });
- }));
-
- beforeEach(() => {
- fixture = TestBed.createComponent(FlashComponent);
- component = fixture.debugElement.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-
-// it('should have a div#flash', () => {
-// component.enabled = true;
-// const appDe: DebugElement = fixture.debugElement;
-// const divDe = appDe.query(By.css('div#flash'));
-// expect(divDe).toBeTruthy();
-// });
-});
diff --git a/web/gui2/src/main/webapp/app/fw/layer/flash/flash.component.ts b/web/gui2/src/main/webapp/app/fw/layer/flash/flash.component.ts
deleted file mode 100644
index df08a96..0000000
--- a/web/gui2/src/main/webapp/app/fw/layer/flash/flash.component.ts
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * 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 { Component, Input, Output, OnChanges, SimpleChange, EventEmitter } from '@angular/core';
-import { LogService } from '../../../log.service';
-import { trigger, state, style, animate, transition } from '@angular/animations';
-
-/**
- * ONOS GUI -- Layer -- Flash Component
- *
- * Replaces Flash Service in old GUI.
- * Provides a mechanism to flash short informational messages to the screen
- * to alert the user of something, e.g. "Hosts visible" or "Hosts hidden".
- *
- * It can be used in a warning mode, where text will appear in red
- * The dwell time (milliseconds) can be controlled or the default is 1200ms
- *
- * To use add an element to the template like
- * <onos-flash message="Hosts visible" dwell="2000" warning="true"></onos-flash>
- * This whole element can be disabled until needed with an ngIf, but if this is done
- * the animated fade-in and fade-out will not happen
- * There is also a (closed) event that tells you when the message is closed, or
- * fades-out
- */
-@Component({
- selector: 'onos-flash',
- templateUrl: './flash.component.html',
- styleUrls: [
- './flash.component.css',
- '../dialog.css',
- '../dialog.theme.css',
- ],
- animations: [
- trigger('flashState', [
- state('false', style({
-// transform: 'translateY(-400%)',
- opacity: '0.0',
- })),
- state('true', style({
-// transform: 'translateY(0%)',
- opacity: '1.0',
- })),
- transition('0 => 1', animate('200ms ease-in')),
- transition('1 => 0', animate('200ms ease-out'))
- ])
- ]
-})
-export class FlashComponent implements OnChanges {
- @Input() message: string;
- @Input() dwell: number = 1200; // milliseconds
- @Input() warning: boolean = false;
- @Output() closed: EventEmitter<boolean> = new EventEmitter();
-
- public visible: boolean = false;
-
- /**
- * Flash a message up for 1200ms then disappear again.
- * See animation parameter for the ease in and ease out params
- */
- ngOnChanges(changes: {[propertyName: string]: SimpleChange}) {
- if (changes['message'] && this.message && this.message !== '') {
- this.visible = true;
-
- setTimeout(() => {
- this.visible = false;
- this.closed.emit(false);
- }, this.dwell);
- }
- }
-
- /**
- * The message will flash up for 'dwell' milliseconds
- * If dwell is > 2000ms, then there will be a button that allows it to be dismissed now
- */
- closeNow() {
- this.visible = false;
- this.closed.emit(false);
- }
-}
diff --git a/web/gui2/src/main/webapp/app/fw/layer/layer.module.ts b/web/gui2/src/main/webapp/app/fw/layer/layer.module.ts
deleted file mode 100644
index 21806c5..0000000
--- a/web/gui2/src/main/webapp/app/fw/layer/layer.module.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2015-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 { NgModule } from '@angular/core';
-import { CommonModule } from '@angular/common';
-
-import { ConfirmComponent } from './confirm/confirm.component';
-import { FlashComponent } from './flash/flash.component';
-import { DialogService } from './dialog.service';
-import { EditableTextService } from './editabletext.service';
-import { LoadingService } from './loading.service';
-import { QuickHelpService } from './quickhelp.service';
-import { VeilComponent } from './veil/veil.component';
-
-/**
- * ONOS GUI -- Layers Module
- */
-@NgModule({
- exports: [
- ConfirmComponent,
- FlashComponent,
- VeilComponent
- ],
- imports: [
- CommonModule
- ],
- declarations: [
- ConfirmComponent,
- FlashComponent,
- VeilComponent
- ],
- providers: [
- ]
-})
-export class LayerModule { }
diff --git a/web/gui2/src/main/webapp/app/fw/layer/loading.service.css b/web/gui2/src/main/webapp/app/fw/layer/loading.service.css
deleted file mode 100644
index b787f3b..0000000
--- a/web/gui2/src/main/webapp/app/fw/layer/loading.service.css
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2015-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.
- */
-
-/*
- ONOS GUI -- Loading Service -- CSS file
- */
-
-#loading-anim {
- position: fixed;
- top: 50%;
- left: 50%;
- -webkit-transform: translate(-50%, -50%);
- transform: translate(-50%, -50%);
-}
diff --git a/web/gui2/src/main/webapp/app/fw/layer/loading.service.ts b/web/gui2/src/main/webapp/app/fw/layer/loading.service.ts
deleted file mode 100644
index 3e6d48b..0000000
--- a/web/gui2/src/main/webapp/app/fw/layer/loading.service.ts
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright 2015-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 { Injectable } from '@angular/core';
-import { FnService } from '../util/fn.service';
-import { LogService } from '../../log.service';
-import { ThemeService } from '../util/theme.service';
-import { WebSocketService } from '../remote/websocket.service';
-import * as d3 from 'd3';
-
-const id = 'loading-anim';
-const dir = 'data/img/loading/';
-const pfx = '/load-';
-const nImgs = 16;
-const speed = 100;
-const waitDelay = 500;
-
-
-/**
- * ONOS GUI -- Layer -- Loading Service
- *
- * Provides a mechanism to start/stop the loading animation, center screen.
- */
-@Injectable({
- providedIn: 'root',
-})
-export class LoadingService {
- images: any[] = [];
- idx = 0;
- img: any;
- theme: string;
- task: any;
- wait: number;
-
- constructor(
- private fs: FnService,
- private log: LogService,
- private ts: ThemeService,
- private wss: WebSocketService
- ) {
- this.preloadImages();
- this.log.debug('LoadingService constructed');
- }
-
- dbg(...args) {
- this.fs.debug(this.constructor.name, args);
- }
-
- preloadImages() {
- let idx: number;
-
- this.dbg('preload images start...');
- for (idx = 1; idx <= nImgs ; idx++) {
- this.addImg('light', idx);
- this.addImg('dark', idx);
- }
- this.dbg('preload images DONE!', this.images);
- }
-
- addImg(theme: string, idx: number) {
- const img = new Image();
- img.src = this.fname(idx, theme);
- this.images.push(img);
- }
-
- fname(i: number, theme: string) {
- const z = i > 9 ? '' : '0';
- return dir + theme + pfx + z + i + '.png';
- }
-
- nextFrame() {
- this.idx = this.idx === 16 ? 1 : this.idx + 1;
- this.img.attr('src', this.fname(this.idx, this.theme));
- }
-
- // start displaying 'loading...' animation (idempotent)
- startAnim() {
- this.dbg('start ANIMATION');
- this.theme = this.ts.getTheme();
- let div = d3.select('#' + id);
- if (div.empty()) {
- div = d3.select('body')
- .append('div')
- .attr('id', id);
- this.img = div
- .append('img')
- .attr('src', this.fname(1, this.theme));
- this.idx = 1;
- this.task = setInterval(() => this.nextFrame(), speed);
- }
- }
-
- // stop displaying 'loading...' animation (idempotent)
- stopAnim() {
- this.dbg('*stop* ANIMATION');
- if (this.task) {
- clearInterval(this.task);
- this.task = null;
- }
- d3.select('#' + id).remove();
- }
-
- // schedule function to start animation in the future
- start() {
- this.dbg('start (schedule)');
- this.wait = setTimeout(this.startAnim(), waitDelay);
- }
-
- // cancel future start, if any; stop the animation
- stop() {
- if (this.wait) {
- this.dbg('start CANCELED');
- clearTimeout(this.wait);
- this.wait = null;
- }
- this.stopAnim();
- }
-
- // return true if start() has been called but not stop()
- waiting(): boolean {
- return !!this.wait;
- }
-
-
-}
diff --git a/web/gui2/src/main/webapp/app/fw/layer/panel.service.ts b/web/gui2/src/main/webapp/app/fw/layer/panel.service.ts
deleted file mode 100644
index 9854c15..0000000
--- a/web/gui2/src/main/webapp/app/fw/layer/panel.service.ts
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * 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 {Injectable} from '@angular/core';
-import {FnService} from '../util/fn.service';
-import {LogService} from '../../log.service';
-import {ThemeService} from '../util/theme.service';
-import {WebSocketService} from '../remote/websocket.service';
-import * as d3 from 'd3';
-
-let fs;
-
-const defaultSettings = {
- edge: 'right',
- width: 200,
- margin: 20,
- hideMargin: 20,
- xtnTime: 750,
- fade: true,
-};
-
-let panels,
- panelLayer;
-
-function init() {
- panelLayer = d3.select('div#floatpanels');
- panelLayer.text('');
- panels = {};
-}
-
-// helpers for panel
-function noop() {
-}
-
-function margin(p: any) {
- return p.settings.margin;
-}
-
-function hideMargin(p: any) {
- return p.settings.hideMargin;
-}
-
-function noPx(p: any, what: any) {
- return Number(p.el.style(what).replace(/px$/, ''));
-}
-
-function widthVal(p: any) {
- return noPx(p, 'width');
-}
-
-function heightVal(p: any) {
- return noPx(p, 'height');
-}
-
-function pxShow(p: any) {
- return margin(p) + 'px';
-}
-
-function pxHide(p: any) {
- return (-hideMargin(p) - widthVal(p) - (noPx(p, 'padding') * 2)) + 'px';
-}
-
-function makePanel(id: any, settings: any) {
- const p = {
- id: id,
- settings: settings,
- on: false,
- el: null,
- },
- api = {
- show: showPanel,
- hide: hidePanel,
- toggle: togglePanel,
- empty: emptyPanel,
- append: appendPanel,
- width: panelWidth,
- height: panelHeight,
- bbox: panelBBox,
- isVisible: panelIsVisible,
- classed: classed,
- el: panelEl,
- };
-
- p.el = panelLayer.append('div')
- .attr('id', id)
- .attr('class', 'floatpanel')
- .style('opacity', 0);
-
- // has to be called after el is set
- p.el.style(p.settings.edge, pxHide(p));
- panelWidth(p.settings.width);
- if (p.settings.height) {
- panelHeight(p.settings.height);
- }
-
- panels[id] = p;
-
- function showPanel(cb: any) {
- const endCb = fs.isF(cb) || noop;
- p.on = true;
- p.el.transition().duration(p.settings.xtnTime)
- .style(p.settings.edge, pxShow(p))
- .style('opacity', 1);
- }
-
- function hidePanel(cb: any) {
- const endCb = fs.isF(cb) || noop,
- endOpacity = p.settings.fade ? 0 : 1;
- p.on = false;
- p.el.transition().duration(p.settings.xtnTime)
- .style(p.settings.edge, pxHide(p))
- .style('opacity', endOpacity);
- }
-
- function togglePanel(cb: any) {
- if (p.on) {
- hidePanel(cb);
- } else {
- showPanel(cb);
- }
- return p.on;
- }
-
- function emptyPanel() {
- return p.el.text('');
- }
-
- function appendPanel(what: any) {
- return p.el.append(what);
- }
-
- function panelWidth(w: any) {
- if (w === undefined) {
- return widthVal(p);
- }
- p.el.style('width', w + 'px');
- }
-
- function panelHeight(h: any) {
- if (h === undefined) {
- return heightVal(p);
- }
- p.el.style('height', h + 'px');
- }
-
- function panelBBox() {
- return p.el.node().getBoundingClientRect();
- }
-
- function panelIsVisible() {
- return p.on;
- }
-
- function classed(cls: any, bool: any) {
- return p.el.classed(cls, bool);
- }
-
- function panelEl() {
- return p.el;
- }
-
- return api;
-}
-
-function removePanel(id: any) {
- panelLayer.select('#' + id).remove();
- delete panels[id];
-}
-
-@Injectable({
- providedIn: 'root',
-})
-
-export class PanelService {
- constructor(private funcs: FnService,
- private log: LogService,
- private ts: ThemeService,
- private wss: WebSocketService) {
- fs = this.funcs;
- init();
- }
-
- createPanel(id: any, opts: any) {
- const settings = Object.assign({}, defaultSettings, opts);
- if (!id) {
- this.log.warn('createPanel: no ID given');
- return null;
- }
- if (panels[id]) {
- this.log.warn('Panel with ID "' + id + '" already exists');
- return null;
- }
- if (fs.debugOn('widget')) {
- this.log.debug('creating panel:', id, settings);
- }
- return makePanel(id, settings);
- }
-
- destroyPanel(id: any) {
- if (panels[id]) {
- if (fs.debugOn('widget')) {
- this.log.debug('destroying panel:', id);
- }
- removePanel(id);
- } else {
- if (fs.debugOn('widget')) {
- this.log.debug('no panel to destroy:', id);
- }
- }
- }
-}
diff --git a/web/gui2/src/main/webapp/app/fw/layer/quickhelp.service.ts b/web/gui2/src/main/webapp/app/fw/layer/quickhelp.service.ts
deleted file mode 100644
index b515180..0000000
--- a/web/gui2/src/main/webapp/app/fw/layer/quickhelp.service.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright 2015-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 { Injectable } from '@angular/core';
-import { FnService } from '../util/fn.service';
-import { LionService } from '../util/lion.service';
-import { LogService } from '../../log.service';
-import { SvgUtilService } from '../svg/svgutil.service';
-
-/**
- * ONOS GUI -- Layer -- Quick Help Service
- *
- * Provides a mechanism to display key bindings and mouse gesture notes.
- */
-@Injectable({
- providedIn: 'root',
-})
-export class QuickHelpService {
-
- constructor(
- private fs: FnService,
- private ls: LionService,
- private log: LogService,
- private sus: SvgUtilService
- ) {
- this.log.debug('QuickhelpService constructed');
- }
-
-}
diff --git a/web/gui2/src/main/webapp/app/fw/layer/veil/veil.component.css b/web/gui2/src/main/webapp/app/fw/layer/veil/veil.component.css
deleted file mode 100644
index 851d6e3..0000000
--- a/web/gui2/src/main/webapp/app/fw/layer/veil/veil.component.css
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2015-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.
- */
-
-/*
- ONOS GUI -- Veil Service (layout) -- CSS file
- */
-
-#veil {
- z-index: 5000;
- display: block;
- position: absolute;
- top: 0;
- left: 0;
- padding: 60px;
-}
-
-#veil p {
- display: block;
- text-align: left;
- font-size: 14pt;
- font-style: italic;
-}
diff --git a/web/gui2/src/main/webapp/app/fw/layer/veil/veil.component.html b/web/gui2/src/main/webapp/app/fw/layer/veil/veil.component.html
deleted file mode 100644
index 79d202b..0000000
--- a/web/gui2/src/main/webapp/app/fw/layer/veil/veil.component.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<div id="veil" *ngIf="enabled">
- <p *ngFor="let msg of messages">{{ msg }}</p>
- <svg [attr.width]="fs.windowSize().width" [attr.height]="fs.windowSize().height">
- <use [attr.width]="birdDim" [attr.height]="birdDim" class="glyph"
- style="opacity: 0.2;"
- xlink:href = "#bird" [attr.transform]="trans"/>
-
- </svg>
-</div>
\ No newline at end of file
diff --git a/web/gui2/src/main/webapp/app/fw/layer/veil/veil.component.spec.ts b/web/gui2/src/main/webapp/app/fw/layer/veil/veil.component.spec.ts
deleted file mode 100644
index 79e4153..0000000
--- a/web/gui2/src/main/webapp/app/fw/layer/veil/veil.component.spec.ts
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright 2015-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.
- */
-
-/*
- ONOS GUI -- Layer -- Veil Service - Unit Tests
- */
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-import { ActivatedRoute, Params } from '@angular/router';
-
-import { VeilComponent } from './veil.component';
-import { ConsoleLoggerService } from '../../../consolelogger.service';
-import { FnService } from '../../util/fn.service';
-import { LogService } from '../../../log.service';
-import { KeyService } from '../../util/key.service';
-import { GlyphService } from '../../svg/glyph.service';
-import { of } from 'rxjs';
-
-class MockActivatedRoute extends ActivatedRoute {
- constructor(params: Params) {
- super();
- this.queryParams = of(params);
- }
-}
-
-class MockKeyService {}
-
-class MockGlyphService {}
-
-describe('VeilComponent', () => {
- let fs: FnService;
- let ar: MockActivatedRoute;
- let windowMock: Window;
- let logServiceSpy: jasmine.SpyObj<LogService>;
-
- beforeEach(async(() => {
- const logSpy = jasmine.createSpyObj('LogService', ['info', 'debug', 'warn', 'error']);
- ar = new MockActivatedRoute({});
- windowMock = <any>{
- location: <any> {
- hostname: 'foo'
- }
- };
- fs = new FnService(ar, logSpy, windowMock);
-
- TestBed.configureTestingModule({
- declarations: [ VeilComponent ],
- providers: [
- { provide: FnService, useValue: fs },
- { provide: LogService, useValue: logSpy },
- { provide: KeyService, useClass: MockKeyService },
- { provide: GlyphService, useClass: MockGlyphService },
- { provide: 'Window', useValue: windowMock },
- ]
- });
- logServiceSpy = TestBed.get(LogService);
- }));
-
- it('should create', () => {
- const fixture = TestBed.createComponent(VeilComponent);
- const component = fixture.componentInstance;
- expect(component).toBeTruthy();
- });
-});
diff --git a/web/gui2/src/main/webapp/app/fw/layer/veil/veil.component.theme.css b/web/gui2/src/main/webapp/app/fw/layer/veil/veil.component.theme.css
deleted file mode 100644
index 7a3bded..0000000
--- a/web/gui2/src/main/webapp/app/fw/layer/veil/veil.component.theme.css
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright 2016-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.
- */
-
-/*
- ONOS GUI -- Veil Service (theme) -- CSS file
- */
-
-.light, #veil {
- background-color: rgba(0,0,0,0.75);
-}
-.dark, #veil {
- background-color: rgba(64,64,64,0.75);
-}
-
-#veil p {
- color: #ddd;
-}
-
-#veil svg .glyph {
- fill: #222;
-}
diff --git a/web/gui2/src/main/webapp/app/fw/layer/veil/veil.component.ts b/web/gui2/src/main/webapp/app/fw/layer/veil/veil.component.ts
deleted file mode 100644
index cea6bed..0000000
--- a/web/gui2/src/main/webapp/app/fw/layer/veil/veil.component.ts
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright 2015-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 { Component, OnInit } from '@angular/core';
-import { FnService } from '../../util/fn.service';
-import { GlyphService } from '../../svg/glyph.service';
-import { KeyService } from '../../util/key.service';
-import { LogService } from '../../../log.service';
-import { SvgUtilService } from '../../svg/svgutil.service';
-import { WebSocketService } from '../../remote/websocket.service';
-
-const BIRD = 'bird';
-
-/**
- * ONOS GUI -- Layer -- Veil Component
- *
- * Provides a mechanism to display an overlaying div with information.
- * Used mainly for web socket connection interruption.
- *
- * It can be added to an component's template as follows:
- * <onos-veil #veil></onos-veil>
- * <p (click)="veil.show(['t1','t2','t3'])">Test Veil</p>
- */
-@Component({
- selector: 'onos-veil',
- templateUrl: './veil.component.html',
- styleUrls: ['./veil.component.css', './veil.component.theme.css']
-})
-export class VeilComponent implements OnInit {
- ww: number;
- wh: number;
- birdSvg: string;
- birdDim: number;
- enabled: boolean = false;
- trans: string;
- messages: string[] = [];
- veilStyle: string;
-
- constructor(
- private fs: FnService,
- private gs: GlyphService,
- private ks: KeyService,
- private log: LogService,
- private sus: SvgUtilService,
- private wss: WebSocketService
- ) {
- const wSize = this.fs.windowSize();
- this.ww = wSize.width;
- this.wh = wSize.height;
- const shrink = this.wh * 0.3;
- this.birdDim = this.wh - shrink;
- const birdCenter = (this.ww - this.birdDim) / 2;
- this.trans = this.sus.translate([birdCenter, shrink / 2]);
-
- this.log.debug('VeilComponent with ' + BIRD + ' constructed');
- }
-
- ngOnInit() {
- }
-
- // msg should be an array of strings
- show(msgs: string[]): void {
- this.messages = msgs;
- this.enabled = true;
-// this.ks.enableKeys(false);
- }
-
- hide(): void {
- this.veilStyle = 'display: none';
-// this.ks.enableKeys(true);
- }
-
-
-}
diff --git a/web/gui2/src/main/webapp/app/fw/mast/mast.module.ts b/web/gui2/src/main/webapp/app/fw/mast/mast.module.ts
deleted file mode 100644
index 99c986d..0000000
--- a/web/gui2/src/main/webapp/app/fw/mast/mast.module.ts
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2014-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 { NgModule } from '@angular/core';
-import { CommonModule } from '@angular/common';
-import { SvgModule } from '../svg/svg.module';
-
-import { MastComponent } from './mast/mast.component';
-
-import { MastService } from './mast.service';
-
-/**
- * ONOS GUI -- Masthead Module
- */
-@NgModule({
- imports: [
- CommonModule,
- SvgModule // For the IconComponent
- ],
- declarations: [
- MastComponent
- ],
- exports: [
- MastComponent
- ],
- providers: [
- MastService
- ]
-})
-export class MastModule { }
diff --git a/web/gui2/src/main/webapp/app/fw/mast/mast.service.ts b/web/gui2/src/main/webapp/app/fw/mast/mast.service.ts
deleted file mode 100644
index 34a3d8b..0000000
--- a/web/gui2/src/main/webapp/app/fw/mast/mast.service.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright 2014-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 { Injectable } from '@angular/core';
-import { FnService } from '../util/fn.service';
-import { LogService } from '../../log.service';
-
-const PADMOBILE = 16;
-
-/**
- * ONOS GUI -- Masthead Service
- */
-@Injectable()
-export class MastService {
-
- public mastHeight = 48;
-
- constructor(
- private fs: FnService,
- private log: LogService
- ) {
- if (this.fs.isMobile()) {
- this.mastHeight += PADMOBILE;
- }
-
- this.log.debug('MastService constructed');
- }
-
-}
diff --git a/web/gui2/src/main/webapp/app/fw/mast/mast/mast.component.css b/web/gui2/src/main/webapp/app/fw/mast/mast/mast.component.css
deleted file mode 100644
index 5b2d464..0000000
--- a/web/gui2/src/main/webapp/app/fw/mast/mast/mast.component.css
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Copyright 2014-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.
- */
-
-/*
- ONOS GUI -- Masthead (layout) -- CSS file
- */
-#mast-top-block {
- display: block;
- z-index: -1;
- height: 48px;
- width: 100%;
-}
-
-#mast {
- position: absolute;
- width: 100%;
- top: 0px;
- height: 48px;
- padding: 0;
- z-index: 10000;
-}
-
-#mast a:hover {
- text-decoration: none;
-}
-
-html[data-platform='iPad'] #mast {
- padding-top: 16px;
-}
-
-#mast .nav-menu-button {
- display: inline-block;
- vertical-align: middle;
- text-align: center;
- line-height: 48px;
- padding: 0 12px;
- cursor: pointer; cursor: hand;
- /* Needed to removed 3px space at the bottom of img tags */
- font-size: 0;
-}
-
-#mast .nav-menu-button img {
- width: 25px;
- vertical-align: middle;
-}
-
-#mast .logo {
- height: 47px;
- width: 511px;
- vertical-align: bottom;
-}
-
-#mast-right {
- display: inline-block;
- float: right;
- position: relative;
- top: 0;
- padding-right: 15px;
- line-height: 48px;
-}
-
-/*
- MAST HEAD DROPDOWN MENU
-*/
-
-#mast-right div.ctrl-btns {
- float: right;
-}
-
-#mast-right div.icon {
- box-sizing: border-box;
- position: relative;
- height: 48px;
- width: 48px;
- padding: 9px;
-}
-
-#mast .dropdown-parent {
- position: relative;
- float: right;
-}
-
-#mast .dropdown-parent i.dropdown-icon {
- display: inline-block;
- height: 7px;
- width: 9px;
- margin-left: 10px;
- background: url('/data/img/dropdown-icon.png') no-repeat;
-}
-
-#mast .dropdown {
- position: absolute;
- top: 40px;
- right: -8px;
- display: none;
- min-width: 100px;
- line-height: 16px;
- font-size: 12pt;
- z-index: 1000;
-}
-
-#mast .dropdown a {
- text-decoration: none;
- font-size: 12px;
- display: block;
- padding: 8px 16px 6px 12px;
-}
-
-#mast .dropdown-parent:hover .dropdown {
- display: block;
-}
-
-#mast .dropdown-parent:hover i.dropdown-icon {
- background-position-x: -14px
-}
-
-html[data-platform='iPad'] #mast .dropdown {
- top: 57px;
-}
diff --git a/web/gui2/src/main/webapp/app/fw/mast/mast/mast.component.html b/web/gui2/src/main/webapp/app/fw/mast/mast/mast.component.html
deleted file mode 100644
index 72242ba..0000000
--- a/web/gui2/src/main/webapp/app/fw/mast/mast/mast.component.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<!--
-~ Copyright 2014-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.
--->
-<div id="mast-top-block"></div>
-<!-- The mast-top-block is an inline display element that pushes any
- subsequent elements down the page. It has a height of 48px
- The mast block overlays the mast-top-block. It is is positioned
- absolutely so that the nav component can slide in behind it when
- not shown -->
-<div id="mast" align="left">
- <span class="nav-menu-button clickable" (click)="ns.toggleNav()">
- <img src="data/img/nav-menu-mojo.png"/>
- </span>
- <img class="logo" src="data/img/masthead-logo-mojo.png">
- <div id="mast-right">
- <nav>
- <div class="dropdown-parent">
- <a class="clickable user-menu__name">{{ username }} <i class="dropdown-icon"></i></a>
- <div class="dropdown">
- <a href="rs/logout"> {{ lionFn('logout') }} </a>
- </div>
- </div>
- <div class="ctrl-btns">
- <div class="active clickable icon" (click)="directTo()">
- <onos-icon iconId="query" iconSize="32" toolTip="{{ lionFn('tt_help') }}"></onos-icon>
- </div>
- </div>
- </nav>
-
- </div>
-</div>
\ No newline at end of file
diff --git a/web/gui2/src/main/webapp/app/fw/mast/mast/mast.component.spec.ts b/web/gui2/src/main/webapp/app/fw/mast/mast/mast.component.spec.ts
deleted file mode 100644
index 3d061a5..0000000
--- a/web/gui2/src/main/webapp/app/fw/mast/mast/mast.component.spec.ts
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright 2015-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 { DebugElement } from '@angular/core';
-import { By } from '@angular/platform-browser';
-
-import { LogService } from '../../../log.service';
-import { ConsoleLoggerService } from '../../../consolelogger.service';
-import { MastComponent } from './mast.component';
-import { IconComponent } from '../../svg/icon/icon.component';
-import { LionService } from '../../util/lion.service';
-import { IconService } from '../../svg/icon.service';
-import { NavService } from '../../nav/nav.service';
-import { WebSocketService } from '../../remote/websocket.service';
-
-class MockNavService {}
-
-class MockIconService {
- loadIconDef() {}
-}
-
-class MockWebSocketService {
- createWebSocket() {}
- isConnected() { return false; }
- unbindHandlers() {}
- bindHandlers() {}
-}
-
-/**
- * ONOS GUI -- Masthead Controller - Unit Tests
- */
-describe('MastComponent', () => {
- let log: LogService;
- let windowMock: Window;
- let component: MastComponent;
- let fixture: ComponentFixture<MastComponent>;
- const bundleObj = {
- 'core.view.App': {
- test: 'test1',
- tt_help: 'Help!'
- }
- };
- const mockLion = (key) => {
- return bundleObj[key] || '%' + key + '%';
- };
-
- beforeEach(async(() => {
- log = new ConsoleLoggerService();
- windowMock = <any>{
- location: <any> {
- hostname: 'foo',
- pathname: 'apps',
- host: 'foo',
- port: '80',
- protocol: 'http',
- search: { debug: 'true'},
- href: 'ws://foo:123/onos/ui/websock/path',
- absUrl: 'ws://foo:123/onos/ui/websock/path'
- }
- };
-
- TestBed.configureTestingModule({
- declarations: [ MastComponent, IconComponent ],
- providers: [
- { provide: LogService, useValue: log },
- { provide: NavService, useClass: MockNavService },
- { provide: LionService, useFactory: (() => {
- return {
- bundle: ((bundleId) => mockLion),
- ubercache: new Array(),
- loadCbs: new Map<string, () => void>([])
- };
- })
- },
- { provide: IconService, useClass: MockIconService },
- { provide: WebSocketService, useClass: MockWebSocketService },
- { provide: 'Window', useValue: windowMock }
- ]
- })
- .compileComponents();
- }));
-
- beforeEach(() => {
- fixture = TestBed.createComponent(MastComponent);
- component = fixture.debugElement.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-
- it('should have a div#mast-top-block', () => {
- const appDe: DebugElement = fixture.debugElement;
- const divDe = appDe.query(By.css('div#mast-top-block'));
- expect(divDe).toBeTruthy();
- });
-
- it('should have a span.nav-menu-button inside a div#mast', () => {
- const appDe: DebugElement = fixture.debugElement;
- const divDe = appDe.query(By.css('div#mast span.nav-menu-button'));
- expect(divDe).toBeTruthy();
- });
-
- it('should have a div.dropdown-parent inside a div#mast-right inside a div#mast', () => {
- const appDe: DebugElement = fixture.debugElement;
- const divDe = appDe.query(By.css('div#mast div#mast-right div.dropdown-parent'));
- const div: HTMLElement = divDe.nativeElement;
- expect(div.textContent).toEqual(' %logout% ');
- });
-
- it('should have an onos-icon inside a div#mast-right inside a div#mast', () => {
- const appDe: DebugElement = fixture.debugElement;
- const divDe = appDe.query(By.css('div#mast div#mast-right div.ctrl-btns div.active onos-icon'));
- expect(divDe).toBeTruthy();
- });
-
-});
diff --git a/web/gui2/src/main/webapp/app/fw/mast/mast/mast.component.ts b/web/gui2/src/main/webapp/app/fw/mast/mast/mast.component.ts
deleted file mode 100644
index 2cb110f..0000000
--- a/web/gui2/src/main/webapp/app/fw/mast/mast/mast.component.ts
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright 2014-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 { Component, Input, OnInit, OnDestroy, Inject } from '@angular/core';
-import { LionService } from '../../util/lion.service';
-import { LogService } from '../../../log.service';
-import { NavService } from '../../nav/nav.service';
-
-/**
- * ONOS GUI -- Masthead Component
- */
-@Component({
- selector: 'onos-mast',
- templateUrl: './mast.component.html',
- styleUrls: ['./mast.component.css', './mast.theme.css']
-})
-export class MastComponent implements OnInit, OnDestroy {
- @Input() username: string;
-
- lionFn; // Function
- viewMap = new Map<string, string>([]); // A map of app names
-
- constructor(
- private lion: LionService,
- private log: LogService,
- public ns: NavService,
- @Inject('Window') private window: Window,
- ) {
- this.viewMap.set('apps', 'https://wiki.onosproject.org/display/ONOS/GUI+Application+View');
- this.viewMap.set('device', 'https://wiki.onosproject.org/display/ONOS/GUI+Device+View');
- this.viewMap.set('', 'https://wiki.onosproject.org/display/ONOS/The+ONOS+Web+GUI');
- }
-
- ngOnInit() {
- if (this.lion.ubercache.length === 0) {
- this.lionFn = this.dummyLion;
- this.lion.loadCbs.set('mast', () => this.doLion());
- this.log.debug('LION not available when MastComponent initialized');
- } else {
- this.doLion();
- }
- this.log.debug('MastComponent initialized');
- }
-
- /**
- * Nav component should never be closed, but in case it does, it's
- * safer to tidy up after itself
- */
- ngOnDestroy() {
- this.lion.loadCbs.delete('mast');
- }
-
- /**
- * Read the LION bundle for App and set up the lionFn
- */
- doLion() {
- this.lionFn = this.lion.bundle('core.fw.Mast');
- if (this.username === undefined) {
- this.username = this.lionFn('unknown_user');
- }
- }
-
- /**
- * A dummy implementation of the lionFn until the response is received and the LION
- * bundle is received from the WebSocket
- */
- dummyLion(key: string): string {
- return '%' + key + '%';
- }
-
- directTo() {
- const curId = this.window.location.pathname.replace('/', '');
- let helpUrl: string = this.viewMap.get(curId);
- if (helpUrl === undefined) {
- helpUrl = this.viewMap.get('');
- this.log.warn('No help file linked for view:', curId);
- }
- this.window.open(helpUrl);
- }
-}
diff --git a/web/gui2/src/main/webapp/app/fw/mast/mast/mast.theme.css b/web/gui2/src/main/webapp/app/fw/mast/mast/mast.theme.css
deleted file mode 100644
index 6b92beb..0000000
--- a/web/gui2/src/main/webapp/app/fw/mast/mast/mast.theme.css
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2016-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.
- */
-
-/*
- ONOS GUI -- Masthead (theme) -- CSS file
- */
-
-#mast {
- background-color: #231f20;
-}
-
-#mast .nav-menu-button:hover {
- background-color: #888;
-}
-
-#mast-right a {
- color: #009fdb;
-}
-
-#mast nav {
- color: #009fdb;
-}
-
-/* Theme styles for drop down menu */
-
-#mast .dropdown {
- background-color: #231f20;
- border: 1px solid #dddddd;
-}
-
-#mast .dropdown a {
- color: #009fdb;
- border-bottom: solid #444 1px;
-}
-
-#mast .dropdown a:hover {
- color: #fff;
-}
diff --git a/web/gui2/src/main/webapp/app/fw/nav/nav.module.ts b/web/gui2/src/main/webapp/app/fw/nav/nav.module.ts
deleted file mode 100644
index 65f222d..0000000
--- a/web/gui2/src/main/webapp/app/fw/nav/nav.module.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2015-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 { NgModule } from '@angular/core';
-import { CommonModule } from '@angular/common';
-import { RouterModule, Routes } from '@angular/router';
-import { SvgModule } from '../svg/svg.module';
-import { OnosRoutingModule } from '../../onos-routing.module';
-
-import { NavComponent } from './nav/nav.component';
-import { NavService } from './nav.service';
-
-/**
- * ONOS GUI -- Navigation Module
- */
-@NgModule({
- imports: [
- CommonModule,
- OnosRoutingModule,
- RouterModule,
- SvgModule
- ],
- declarations: [
- NavComponent
- ],
- exports: [
- NavComponent
- ],
- providers: [
- NavService
- ]
-})
-export class NavModule { }
diff --git a/web/gui2/src/main/webapp/app/fw/nav/nav.service.ts b/web/gui2/src/main/webapp/app/fw/nav/nav.service.ts
deleted file mode 100644
index 22a903e..0000000
--- a/web/gui2/src/main/webapp/app/fw/nav/nav.service.ts
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2015-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 { Injectable } from '@angular/core';
-import { FnService } from '../util/fn.service';
-import { LogService } from '../../log.service';
-
-/**
- * ONOS GUI -- Navigation Service
- */
-@Injectable()
-export class NavService {
- public showNav = false;
-
- constructor(
- private _fn_: FnService,
- private log: LogService
- ) {
- this.log.debug('NavService constructed');
- }
-
- hideNav() {
- this.showNav = !this.showNav;
- if (!this.showNav) {
- this.log.debug('Hiding Nav menu');
- }
- }
-
- toggleNav() {
- this.showNav = !this.showNav;
- if (this.showNav) {
- this.log.debug('Showing Nav menu');
- } else {
- this.log.debug('Hiding Nav menu');
- }
- }
-
-}
diff --git a/web/gui2/src/main/webapp/app/fw/remote/rest.service.ts b/web/gui2/src/main/webapp/app/fw/remote/rest.service.ts
deleted file mode 100644
index 6fec638..0000000
--- a/web/gui2/src/main/webapp/app/fw/remote/rest.service.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2015-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 { Injectable } from '@angular/core';
-import { FnService } from '../util/fn.service';
-import { LogService } from '../../log.service';
-import { UrlFnService } from './urlfn.service';
-
-/**
- * ONOS GUI -- Remote Communications Module -- REST Service
- */
-@Injectable({
- providedIn: 'root',
-})
-export class RestService {
-
- constructor(
- private fs: FnService,
- private log: LogService,
- private ufs: UrlFnService
- ) {
- this.log.debug('RestService constructed');
- }
-
-}
diff --git a/web/gui2/src/main/webapp/app/fw/remote/urlfn.service.spec.ts b/web/gui2/src/main/webapp/app/fw/remote/urlfn.service.spec.ts
deleted file mode 100644
index 2b07f1c..0000000
--- a/web/gui2/src/main/webapp/app/fw/remote/urlfn.service.spec.ts
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright 2015-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 { TestBed, inject } from '@angular/core/testing';
-
-import { LogService } from '../../log.service';
-import { ConsoleLoggerService } from '../../consolelogger.service';
-import { UrlFnService } from './urlfn.service';
-import { FnService } from '../util/fn.service';
-import { ActivatedRoute, Params } from '@angular/router';
-import { of } from 'rxjs';
-
-class MockActivatedRoute extends ActivatedRoute {
- constructor(params: Params) {
- super();
- this.queryParams = of(params);
- }
-}
-
-/**
- * ONOS GUI -- Remote -- General Functions - Unit Tests
- */
-describe('UrlFnService', () => {
- let log: LogService;
- let ufs: UrlFnService;
- let fs: FnService;
- let ar: MockActivatedRoute;
- let windowMock: Window;
-
- beforeEach(() => {
- log = new ConsoleLoggerService();
- ar = new MockActivatedRoute({'debug': 'TestService'});
- windowMock = <any>{
- location: <any> {
- hostname: '',
- host: '',
- port: '',
- protocol: '',
- search: { debug: 'true'},
- href: ''
- }
- };
-
- fs = new FnService(ar, log, windowMock);
-
- TestBed.configureTestingModule({
- providers: [UrlFnService,
- { provide: LogService, useValue: log },
- { provide: 'Window', useFactory: (() => windowMock ) },
- ]
- });
-
- ufs = TestBed.get(UrlFnService);
- });
-
- function setLoc(prot: string, h: string, p: string, ctx: string = '') {
- windowMock.location.host = h;
- windowMock.location.hostname = h;
- windowMock.location.port = p;
- windowMock.location.protocol = prot;
- windowMock.location.href = prot + '://' + h + ':' + p +
- ctx + '/onos/ui/';
- }
-
- it('should define UrlFnService', () => {
- expect(ufs).toBeDefined();
- });
-
- it('should define api functions', () => {
- expect(fs.areFunctions(ufs, [
- 'rsUrl', 'wsUrl', 'urlBase', 'httpPrefix',
- 'wsPrefix', 'matchSecure'
- ])).toBeTruthy();
- });
-
- it('should return the correct (http) RS url', () => {
- setLoc('http', 'foo', '123');
- expect(ufs.rsUrl('path')).toEqual('http://foo:123/onos/ui/rs/path');
- });
-
- it('should return the correct (https) RS url', () => {
- setLoc('https', 'foo', '123');
- expect(ufs.rsUrl('path')).toEqual('https://foo:123/onos/ui/rs/path');
- });
-
- it('should return the correct (ws) WS url', () => {
- setLoc('http', 'foo', '123');
- expect(ufs.wsUrl('path')).toEqual('ws://foo:123/onos/ui/websock/path');
- });
-
- it('should return the correct (wss) WS url', () => {
- setLoc('https', 'foo', '123');
- expect(ufs.wsUrl('path')).toEqual('wss://foo:123/onos/ui/websock/path');
- });
-
- it('should allow us to define an alternate WS port', () => {
- setLoc('http', 'foo', '123');
- expect(ufs.wsUrl('xyyzy', '456')).toEqual('ws://foo:456/onos/ui/websock/xyyzy');
- });
-
- it('should allow us to define an alternate host', () => {
- setLoc('http', 'foo', '123');
- expect(ufs.wsUrl('core', '456', 'bar')).toEqual('ws://bar:456/onos/ui/websock/core');
- });
-
- it('should allow us to inject an app context', () => {
- setLoc('http', 'foo', '123', '/my/app');
- expect(ufs.wsUrl('path')).toEqual('ws://foo:123/my/app/onos/ui/websock/path');
- });
-
-});
diff --git a/web/gui2/src/main/webapp/app/fw/remote/urlfn.service.ts b/web/gui2/src/main/webapp/app/fw/remote/urlfn.service.ts
deleted file mode 100644
index 363663a..0000000
--- a/web/gui2/src/main/webapp/app/fw/remote/urlfn.service.ts
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * 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 { Injectable, Inject } from '@angular/core';
-import { LogService } from '../../log.service';
-
-const UICONTEXT = '/onos/ui/';
-const RSSUFFIX = UICONTEXT + 'rs/';
-const WSSUFFIX = UICONTEXT + 'websock/';
-
-/**
- * ONOS GUI -- Remote -- General Purpose URL Functions
- */
-@Injectable({
- providedIn: 'root',
-})
-export class UrlFnService {
- constructor(
- private log: LogService,
- @Inject('Window') private w: Window
- ) {
- this.log.debug('UrlFnService constructed');
- }
-
- matchSecure(protocol: string): string {
- const p: string = this.w.location.protocol;
- const secure: boolean = (p === 'https' || p === 'wss');
- return secure ? protocol + 's' : protocol;
- }
-
- /* A little bit of funky here. It is possible that ONOS sits
- * behind a proxy and has an app prefix, e.g.
- * http://host:port/my/app/onos/ui...
- * This bit of regex grabs everything after the host:port and
- * before the UICONTEXT (/onos/ui/) and uses that as an app
- * prefix by inserting it back into the WS URL.
- * If no prefix, then no insert.
- */
- urlBase(protocol: string, port: string = '', host: string = ''): string {
- const match = this.w.location.href.match('.*//[^/]+/(.+)' + UICONTEXT);
- const appPrefix = match ? '/' + match[1] : '';
-
- return this.matchSecure(protocol) +
- '://' +
- (host === '' ? this.w.location.hostname : host) +
- ':' +
- (port === '' ? this.w.location.port : port) +
- appPrefix;
- }
-
- httpPrefix(suffix: string): string {
- return this.urlBase('http') + suffix;
- }
-
- wsPrefix(suffix: string, wsport: string, host: string): string {
- return this.urlBase('ws', wsport, host) + suffix;
- }
-
- rsUrl(path: string): string {
- return this.httpPrefix(RSSUFFIX) + path;
- }
-
- wsUrl(path: string, wsport?: string, host?: string): string {
- return this.wsPrefix(WSSUFFIX, wsport, host) + path;
- }
-}
diff --git a/web/gui2/src/main/webapp/app/fw/remote/websocket.service.spec.ts b/web/gui2/src/main/webapp/app/fw/remote/websocket.service.spec.ts
deleted file mode 100644
index 57d8d34..0000000
--- a/web/gui2/src/main/webapp/app/fw/remote/websocket.service.spec.ts
+++ /dev/null
@@ -1,278 +0,0 @@
-/*
- * Copyright 2015-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 { TestBed, inject } from '@angular/core/testing';
-
-import { LogService } from '../../log.service';
-import { WebSocketService, WsOptions, Callback, EventType } from './websocket.service';
-import { FnService } from '../util/fn.service';
-import { GlyphService } from '../svg/glyph.service';
-import { ActivatedRoute, Params } from '@angular/router';
-import { UrlFnService } from './urlfn.service';
-import { WSock } from './wsock.service';
-import { of } from 'rxjs';
-
-class MockActivatedRoute extends ActivatedRoute {
- constructor(params: Params) {
- super();
- this.queryParams = of(params);
- }
-}
-
-class MockGlyphService {}
-
-/**
- * ONOS GUI -- Remote -- Web Socket Service - Unit Tests
- */
-describe('WebSocketService', () => {
- let wss: WebSocketService;
- let fs: FnService;
- let ar: MockActivatedRoute;
- let windowMock: Window;
- let logServiceSpy: jasmine.SpyObj<LogService>;
-
- const noop = () => ({});
- const send = jasmine.createSpy('send')
- .and.callFake((ev) => ev);
- const mockWebSocket = {
- send: send,
- onmessage: (msgEvent) => ({}),
- onopen: () => ({}),
- onclose: () => ({}),
- };
-
- beforeEach(() => {
- const logSpy = jasmine.createSpyObj('LogService', ['info', 'debug', 'warn', 'error']);
- ar = new MockActivatedRoute({'debug': 'txrx'});
-
- windowMock = <any>{
- location: <any> {
- hostname: 'foo',
- host: 'foo',
- port: '80',
- protocol: 'http',
- search: { debug: 'true'},
- href: 'ws://foo:123/onos/ui/websock/path',
- absUrl: 'ws://foo:123/onos/ui/websock/path'
- }
- };
- fs = new FnService(ar, logSpy, windowMock);
-
- TestBed.configureTestingModule({
- providers: [WebSocketService,
- { provide: FnService, useValue: fs },
- { provide: LogService, useValue: logSpy },
- { provide: GlyphService, useClass: MockGlyphService },
- { provide: UrlFnService, useValue: new UrlFnService(logSpy, windowMock) },
- { provide: 'Window', useFactory: (() => windowMock ) },
- { provide: WSock, useFactory: (() => {
- return {
- newWebSocket: (() => mockWebSocket)
- };
- })
- }
- ]
- });
-
- wss = TestBed.get(WebSocketService);
- logServiceSpy = TestBed.get(LogService);
- });
-
- it('should define WebSocketService', () => {
- expect(wss).toBeDefined();
- });
-
- it('should define api functions', () => {
- expect(fs.areFunctions(wss, ['bootstrap', 'error',
- 'handleOpen', 'handleMessage', 'handleClose',
- 'findGuiSuccessor', 'informListeners', 'send',
- 'noHandlersWarn', 'resetState',
- 'createWebSocket', 'bindHandlers', 'unbindHandlers',
- 'addOpenListener', 'removeOpenListener', 'sendEvent',
- 'setVeilDelegate', 'setLoadingDelegate', 'isConnected',
- 'closeWebSocket', 'isHandling'
- ])).toBeTruthy();
- });
-
- it('should use the appropriate URL, createWebsocket', () => {
- const url = wss.createWebSocket();
- expect(url).toEqual('ws://foo:80/onos/ui/websock/core');
- });
-
- it('should use the appropriate URL with modified port, createWebsocket',
- () => {
- const url = wss.createWebSocket(<WsOptions>{ wsport: 1243 });
- expect(url).toEqual('ws://foo:1243/onos/ui/websock/core');
- });
-
- it('should verify websocket event handlers, createWebsocket', () => {
- wss.createWebSocket({ wsport: 1234 });
- expect(fs.isF(mockWebSocket.onopen)).toBeTruthy();
- expect(fs.isF(mockWebSocket.onmessage)).toBeTruthy();
- expect(fs.isF(mockWebSocket.onclose)).toBeTruthy();
- });
-
- it('should invoke listener callbacks when websocket is up, handleOpen',
- () => {
- let num = 0;
- function incrementNum(host: string, url: string) {
- expect(host).toEqual('foo');
- num++;
- }
- wss.addOpenListener(incrementNum);
- wss.createWebSocket({ wsport: 1234 });
-
- mockWebSocket.onopen();
- expect(num).toBe(1);
- });
-
- it('should send pending events, handleOpen', () => {
- const fakeEvent = {
- event: 'mockEv',
- payload: { mock: 'thing' }
- };
- wss.sendEvent(fakeEvent.event, fakeEvent.payload);
- // on opening the socket, a single authentication event should have
- // been sent already...
- expect(mockWebSocket.send.calls.count()).toEqual(1);
-
- wss.createWebSocket({ wsport: 1234 });
- mockWebSocket.onopen();
- expect(mockWebSocket.send).toHaveBeenCalledWith(JSON.stringify(fakeEvent));
- });
-
- it('should handle an incoming bad JSON message, handleMessage', () => {
- const badMsg = {
- data: 'bad message'
- };
- wss.createWebSocket({ wsport: 1234 });
- expect(mockWebSocket.onmessage(badMsg)).toBeNull();
- expect(logServiceSpy.error).toHaveBeenCalled();
- });
-
- it('should verify message was handled, handleMessage', () => {
- let num = 0;
- function fakeHandler(data1: Object) { num++; }
- const data = JSON.stringify(<EventType>{
- event: 'mockEvResp',
- payload: {}
- });
- const event = {
- data: data
- };
-
- wss.createWebSocket({ wsport: 1234 });
- wss.bindHandlers(new Map<string, (data) => void>([
- ['mockEvResp', (data2) => fakeHandler(data2)]
- ]));
- expect(mockWebSocket.onmessage(event)).toBe(undefined);
- expect(num).toBe(1);
- });
-
- it('should warn if there is an unhandled event, handleMessage', () => {
- const data = { foo: 'bar', bar: 'baz'};
- const dataString = JSON.stringify(data);
- const badEv = {
- data: dataString
- };
- wss.createWebSocket({ wsport: 1234 });
- mockWebSocket.onmessage(badEv);
- expect(logServiceSpy.warn).toHaveBeenCalledWith('Unhandled event:', data);
- });
-
- it('should not warn if valid input, bindHandlers', () => {
- expect(wss.bindHandlers(new Map<string, (data) => void>([
- ['test', noop ],
- ['bar', noop ]
- ]))).toBe(undefined);
-
- expect(logServiceSpy.warn).not.toHaveBeenCalled();
- });
-
- it('should warn if no arguments, bindHandlers', () => {
- expect(wss.bindHandlers(
- new Map<string, (data) => void>([])
- )).toBeNull();
- expect(logServiceSpy.warn).toHaveBeenCalledWith(
- 'WSS.bindHandlers(): no event handlers'
- );
- });
-
- it('should warn if duplicate handlers were given, bindHandlers',
- () => {
- wss.bindHandlers(
- new Map<string, (data) => void>([
- ['noop', noop ]
- ])
- );
- expect(wss.bindHandlers(
- new Map<string, (data) => void>([
- ['noop', noop ]
- ])
- )).toBe(undefined);
- expect(logServiceSpy.warn).toHaveBeenCalledWith('duplicate bindings ignored:',
- ['noop']);
- });
-
- it('should warn if no arguments, unbindHandlers', () => {
- expect(wss.unbindHandlers([])).toBeNull();
- expect(logServiceSpy.warn).toHaveBeenCalledWith(
- 'WSS.unbindHandlers(): no event handlers'
- );
- });
- // Note: cannot test unbindHandlers' forEach due to it using closure variable
-
- it('should not warn if valid argument, addOpenListener', () => {
- let o = wss.addOpenListener(noop);
- expect(o.id === 1);
- expect(o.cb === noop);
- expect(logServiceSpy.warn).not.toHaveBeenCalled();
- o = wss.addOpenListener(noop);
- expect(o.id === 2);
- expect(o.cb === noop);
- expect(logServiceSpy.warn).not.toHaveBeenCalled();
- });
-
- it('should log error if callback not a function, addOpenListener',
- () => {
- const o = wss.addOpenListener(null);
- expect(o.id === 1);
- expect(o.cb === null);
- expect(o.error === 'No callback defined');
- expect(logServiceSpy.error).toHaveBeenCalledWith(
- 'WSS.addOpenListener(): callback not a function'
- );
- });
-
- it('should not warn if valid listener object, removeOpenListener', () => {
- expect(wss.removeOpenListener(<Callback>{
- id: 1,
- error: 'error',
- cb: noop
- })).toBe(undefined);
- expect(logServiceSpy.warn).not.toHaveBeenCalled();
- });
-
- it('should warn if listener is invalid, removeOpenListener', () => {
- expect(wss.removeOpenListener(<Callback>{})).toBeNull();
- expect(logServiceSpy.warn).toHaveBeenCalledWith(
- 'WSS.removeOpenListener(): invalid listener', {}
- );
- });
-
- // Note: handleClose is not currently tested due to all work it does relies
- // on closure variables that cannot be mocked
-
-});
diff --git a/web/gui2/src/main/webapp/app/fw/remote/websocket.service.ts b/web/gui2/src/main/webapp/app/fw/remote/websocket.service.ts
deleted file mode 100644
index 42eb42e..0000000
--- a/web/gui2/src/main/webapp/app/fw/remote/websocket.service.ts
+++ /dev/null
@@ -1,465 +0,0 @@
-/*
- * Copyright 2015-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 { Injectable, Inject } from '@angular/core';
-import { FnService } from '../util/fn.service';
-import { GlyphService } from '../svg/glyph.service';
-import { LogService } from '../../log.service';
-import { UrlFnService } from './urlfn.service';
-import { VeilComponent } from '../layer/veil/veil.component';
-import { WSock } from './wsock.service';
-
-/**
- * Event Type structure for the WebSocketService
- */
-export interface EventType {
- event: string;
- payload: Object;
-}
-
-export interface Callback {
- id: number;
- error: string;
- cb(host: string, url: string): void;
-}
-
-interface ClusterNode {
- id: string;
- ip: string;
- m_uiAttached: boolean;
-}
-
-interface Bootstrap {
- user: string;
- clusterNodes: ClusterNode[];
- glyphs: any[]; // TODO: narrow this down to a known type
-}
-
-interface ErrorData {
- message: string;
-}
-
-export interface WsOptions {
- wsport: number;
-}
-
-/**
- * ONOS GUI -- Remote -- Web Socket Service
- *
- * To see debug messages add ?debug=txrx to the URL
- */
-@Injectable({
- providedIn: 'root',
-})
-export class WebSocketService {
- // internal state
- private webSockOpts: WsOptions; // web socket options
- private ws: WebSocket = null; // web socket reference
- private wsUp: boolean = false; // web socket is good to go
-
- // A map of event handler bindings - names and functions (that accept data and return void)
- private handlers = new Map<string, (data: any) => void>([]);
- private pendingEvents: EventType[] = []; // events TX'd while socket not up
- private host: string; // web socket host
- private url; // web socket URL
- private clusterNodes: ClusterNode[] = []; // ONOS instances data for failover
- private clusterIndex = -1; // the instance to which we are connected
- private glyphs = [];
- private connectRetries: number = 0; // limit our attempts at reconnecting
-
- // A map of registered Callbacks for websocket open()
- private openListeners = new Map<number, Callback>([]);
- private nextListenerId: number = 1; // internal ID for open listeners
- private loggedInUser = null; // name of logged-in user
- private lcd: any; // The loading component delegate
- private vcd: any; // The veil component delegate
-
- /**
- * built-in handler for the 'boostrap' event
- */
- private bootstrap(data: Bootstrap) {
- this.loggedInUser = data.user;
-
- this.clusterNodes = data.clusterNodes;
- this.clusterNodes.forEach((d, i) => {
- if (d.m_uiAttached) {
- this.clusterIndex = i;
- this.log.info('Connected to cluster node ' + d.ip);
- // TODO: add connect info to masthead somewhere
- }
- });
- this.glyphs = data.glyphs;
- const glyphsMap = new Map<string, string>([]);
- this.glyphs.forEach((d, i) => {
- glyphsMap.set('_' + d.id, d.viewbox);
- glyphsMap.set(d.id, d.path);
- this.gs.registerGlyphs(glyphsMap);
- });
- }
-
- private error(data: ErrorData) {
- const m: string = data.message || 'error from server';
- this.log.error(m, data);
-
- // Unrecoverable error - throw up the veil...
- if (this.vcd) {
- this.vcd.show([
- 'Oops!',
- 'Server reports error...',
- m,
- ]);
- }
- }
-
- constructor(
- private fs: FnService,
- private gs: GlyphService,
- private log: LogService,
- private ufs: UrlFnService,
- private wsock: WSock,
- @Inject('Window') private window: Window
- ) {
- this.log.debug(window.location.hostname);
-
- // Bind the boot strap event by default
- this.bindHandlers(new Map<string, (data) => void>([
- ['bootstrap', (data) => this.bootstrap(data)],
- ['error', (data) => this.error(data)]
- ]));
-
- this.log.debug('WebSocketService constructed');
- }
-
-
- // ==========================
- // === Web socket callbacks
-
- /**
- * Called when WebSocket has just opened
- *
- * Lift the Veil if it is displayed
- * If there are any events pending, send them
- * Mark the WSS as up and inform any listeners for this open event
- */
- handleOpen(): void {
- this.log.info('Web socket open - ', this.url);
- // Hide the veil
- if (this.vcd) {
- this.vcd.hide();
- }
-
- if (this.fs.debugOn('txrx')) {
- this.log.debug('Sending ' + this.pendingEvents.length + ' pending event(s)...');
- }
- this.pendingEvents.forEach((ev) => {
- this.send(ev);
- });
- this.pendingEvents = [];
-
- this.connectRetries = 0;
- this.wsUp = true;
- this.informListeners(this.host, this.url);
- }
-
- /**
- * Function called when WebSocket send a message
- */
- handleMessage(msgEvent: MessageEvent): void {
- let ev: EventType;
- let h;
- try {
- ev = JSON.parse(msgEvent.data);
- } catch (e) {
- this.log.error('Message.data is not valid JSON', msgEvent.data, e);
- return null;
- }
- if (this.fs.debugOn('txrx')) {
- this.log.debug(' << *Rx* ', ev.event, ev.payload);
- }
- h = this.handlers.get(ev.event);
- if (h) {
- try {
- h(ev.payload);
- } catch (e) {
- this.log.error('Problem handling event:', ev, e);
- return null;
- }
- } else {
- this.log.warn('Unhandled event:', ev);
- }
- }
-
- /**
- * Called by the WebSocket if it is closed from the server end
- *
- * If the loading component is shown, call stop() on it
- * Try to find another node in the cluster to connect to
- * If this is not possible then show the Veil Component
- */
- handleClose(): void {
- this.log.warn('Web socket closed');
- if (this.lcd) {
- this.lcd.stop();
- }
- this.wsUp = false;
- let gsucc;
-
- if (gsucc = this.findGuiSuccessor()) {
- this.url = this.createWebSocket(this.webSockOpts, gsucc);
- } else {
- // If no controllers left to contact, show the Veil...
- if (this.vcd) {
- this.vcd.show([
- 'Oops!', // TODO: Localize this
- 'Web-socket connection to server closed...',
- 'Try refreshing the page.',
- ]);
- }
- }
- }
-
- // ==============================
- // === Private Helper Functions
-
- /**
- * Find the next node in the ONOS cluster.
- *
- * This is used if the WebSocket connection closes because a
- * node in the cluster ges down - fail over should be automatic
- */
- findGuiSuccessor(): string {
- const ncn = this.clusterNodes.length;
- let ip: string;
- let node;
-
- while (this.connectRetries < ncn && !ip) {
- this.connectRetries++;
- this.clusterIndex = (this.clusterIndex + 1) % ncn;
- node = this.clusterNodes[this.clusterIndex];
- ip = node && node.ip;
- }
-
- return ip;
- }
-
- /**
- * When the WebSocket is opened, inform any listeners that registered
- * for that event
- */
- informListeners(host: string, url: string): void {
- for (const [key, cb] of this.openListeners.entries()) {
- cb.cb(host, url);
- }
- }
-
- send(ev: EventType): void {
- if (this.fs.debugOn('txrx')) {
- this.log.debug(' *Tx* >> ', ev.event, ev.payload);
- }
- this.ws.send(JSON.stringify(ev));
- }
-
- /**
- * Check if there are no WSS event handlers left
- */
- noHandlersWarn(handlers: Map<string, Object>, caller: string): boolean {
- if (!handlers || handlers.size === 0) {
- this.log.warn('WSS.' + caller + '(): no event handlers');
- return true;
- }
- return false;
- }
-
- /* ===================
- * === API Functions
- */
-
- /**
- * Required for unit tests to set to known state
- */
- resetState(): void {
- this.webSockOpts = undefined;
- this.ws = null;
- this.wsUp = false;
- this.host = undefined;
- this.url = undefined;
- this.pendingEvents = [];
- this.handlers.clear();
- this.clusterNodes = [];
- this.clusterIndex = -1;
- this.glyphs = [];
- this.connectRetries = 0;
- this.openListeners.clear();
- this.nextListenerId = 1;
-
- }
-
- /*
- * Currently supported opts:
- * wsport: web socket port (other than default 8181)
- * host: if defined, is the host address to use
- */
- createWebSocket(opts?: WsOptions, host?: string) {
- this.webSockOpts = opts; // preserved for future calls
- this.host = host === undefined ? this.window.location.host : host;
- this.url = this.ufs.wsUrl('core', opts === undefined ? '' : opts['wsport'].toString(), host);
-
- this.log.debug('Attempting to open websocket to: ' + this.url);
- this.ws = this.wsock.newWebSocket(this.url);
- if (this.ws) {
- // fat arrow => syntax means that the 'this' context passed will
- // be of WebSocketService, not the WebSocket
- this.ws.onopen = (() => this.handleOpen());
- this.ws.onmessage = ((msgEvent) => this.handleMessage(msgEvent));
- this.ws.onclose = (() => this.handleClose());
- const authToken = this.window['onosAuth'];
- this.log.debug('Auth Token for opening WebSocket', authToken);
- this.sendEvent('authentication', { token: authToken });
- }
- // Note: Wsock logs an error if the new WebSocket call fails
- return this.url;
- }
-
- /**
- * Tell the WebSocket to close - this should call the handleClose() method
- */
- closeWebSocket() {
- this.ws.close();
- }
-
-
- /**
- * Binds the message handlers to their message type (event type) as
- * specified in the given map. Note that keys are the event IDs; values
- * are either:
- * * the event handler function, or
- * * an API object which has an event handler for the key
- */
- bindHandlers(handlerMap: Map<string, (data) => void>): void {
- const dups: string[] = [];
-
- if (this.noHandlersWarn(handlerMap, 'bindHandlers')) {
- return null;
- }
- for (const [eventId, api] of handlerMap) {
- this.log.debug('Adding handler for ', eventId);
- const fn = this.fs.isF(api) || this.fs.isF(api[eventId]);
- if (!fn) {
- this.log.warn(eventId + ' handler not a function');
- return;
- }
-
- if (this.handlers.get(eventId)) {
- dups.push(eventId);
- } else {
- this.handlers.set(eventId, fn);
- }
- }
- if (dups.length) {
- this.log.warn('duplicate bindings ignored:', dups);
- }
- }
-
- /**
- * Unbinds the specified message handlers.
- * Expected that the same map will be used, but we only care about keys
- */
- unbindHandlers(handlerIds: string[]): void {
- if ( handlerIds.length === 0 ) {
- this.log.warn('WSS.unbindHandlers(): no event handlers');
- return null;
- }
- for (const eventId of handlerIds) {
- this.handlers.delete(eventId);
- }
- }
-
- isHandling(handlerId: string): boolean {
- return this.handlers.get(handlerId) !== undefined;
- }
-
- /**
- * Add a listener function for listening for WebSocket opening.
- * The function must give a host and url and return void
- */
- addOpenListener(callback: (host: string, url: string) => void ): Callback {
- const id: number = this.nextListenerId++;
- const cb = this.fs.isF(callback);
- const o: Callback = <Callback>{ id: id, cb: cb };
-
- if (cb) {
- this.openListeners.set(id, o);
- } else {
- this.log.error('WSS.addOpenListener(): callback not a function');
- o.error = 'No callback defined';
- }
- return o;
- }
-
- /**
- * Remove a listener of WebSocket opening
- */
- removeOpenListener(lsnr: Callback): void {
- const id = this.fs.isO(lsnr) && lsnr.id;
- let o;
-
- if (!id) {
- this.log.warn('WSS.removeOpenListener(): invalid listener', lsnr);
- return null;
- }
- o = this.openListeners[id];
-
- if (o) {
- this.openListeners.delete(id);
- }
- }
-
- /**
- * Formulates an event message and sends it via the web-socket.
- * If the websocket is not up yet, we store it in a pending list.
- */
- sendEvent(evType: string, payload: Object ): void {
- const ev = <EventType> {
- event: evType,
- payload: payload
- };
-
- if (this.wsUp) {
- this.send(ev);
- } else {
- this.pendingEvents.push(ev);
- }
- }
-
- /**
- * Binds the veil service as a delegate.
- */
- setVeilDelegate(vd: VeilComponent): void {
- this.vcd = vd;
- }
-
- /**
- * Binds the loading service as a delegate
- */
- setLoadingDelegate(ld: any): void {
- // TODO - Investigate changing Loading Service to LoadingComponent
- this.log.debug('Loading delegate set', ld);
- this.lcd = ld;
- }
-
- isConnected(): boolean {
- return this.wsUp;
- }
-}
diff --git a/web/gui2/src/main/webapp/app/fw/remote/wsock.service.ts b/web/gui2/src/main/webapp/app/fw/remote/wsock.service.ts
deleted file mode 100644
index 86e0625..0000000
--- a/web/gui2/src/main/webapp/app/fw/remote/wsock.service.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2015-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 { Injectable } from '@angular/core';
-import { LogService } from '../../log.service';
-
-/**
- * ONOS GUI -- Remote -- Web Socket Wrapper Service
- *
- * This service provided specifically so that it can be mocked in unit tests.
- */
-@Injectable({
- providedIn: 'root',
-})
-export class WSock {
-
- constructor(
- private log: LogService,
- ) {
- this.log.debug('WSockService constructed');
- }
-
-
- newWebSocket(url) {
- let ws = null;
- try {
- ws = new WebSocket(url);
- } catch (e) {
- this.log.error('Unable to create web socket:', e);
- }
- return ws;
- }
-
-}
diff --git a/web/gui2/src/main/webapp/app/fw/svg/geodata.service.ts b/web/gui2/src/main/webapp/app/fw/svg/geodata.service.ts
deleted file mode 100644
index 2594a1d..0000000
--- a/web/gui2/src/main/webapp/app/fw/svg/geodata.service.ts
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright 2015-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 { Injectable } from '@angular/core';
-import { FnService } from '../util/fn.service';
-import { LogService } from '../../log.service';
-
-/**
- * ONOS GUI -- SVG -- GeoData Service
- *
- * The GeoData Service facilitates the fetching and caching of TopoJSON data
- * from the server, as well as providing a way of creating a path generator
- * for that data, to be used to render the map in an SVG layer.
- *
- * A TopoData object can be fetched by ID. IDs that start with an asterisk
- * identify maps bundled with the GUI. IDs that do not start with an
- * asterisk are assumed to be URLs to externally provided data.
- *
- * var topodata = GeoDataService.fetchTopoData('*continental-us');
- *
- * The path generator can then be created for that data-set:
- *
- * var gen = GeoDataService.createPathGenerator(topodata, opts);
- *
- * opts is an optional argument that allows the override of default settings:
- * {
- * objectTag: 'states',
- * projection: d3.geo.mercator(),
- * logicalSize: 1000,
- * mapFillScale: .95
- * };
- *
- * The returned object (gen) comprises transformed data (TopoJSON -> GeoJSON),
- * the D3 path generator function, and the settings used ...
- *
- * {
- * geodata: { ... },
- * pathgen: function (...) { ... },
- * settings: { ... }
- * }
- */
-@Injectable()
-export class GeoDataService {
-
- constructor(
- private fn: FnService,
-// private http: HttpService,
- private log: LogService
- ) {
- this.log.debug('GeoDataService constructed');
- }
-
-}
diff --git a/web/gui2/src/main/webapp/app/fw/svg/glyph.service.ts b/web/gui2/src/main/webapp/app/fw/svg/glyph.service.ts
deleted file mode 100644
index 0c1eff3..0000000
--- a/web/gui2/src/main/webapp/app/fw/svg/glyph.service.ts
+++ /dev/null
@@ -1,206 +0,0 @@
-/*
- * Copyright 2015-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 { Injectable } from '@angular/core';
-import { FnService } from '../util/fn.service';
-import { LogService } from '../../log.service';
-import * as gds from './glyphdata.service';
-import * as d3 from 'd3';
-import { SvgUtilService } from './svgutil.service';
-
-// constants
-const msgGS = 'GlyphService.';
-const rg = 'registerGlyphs(): ';
-const rgs = 'registerGlyphSet(): ';
-
-/**
- * ONOS GUI -- SVG -- Glyph Service
- */
-@Injectable()
-export class GlyphService {
- // internal state
- glyphs = d3.map();
- api: Object;
-
- constructor(
- private fs: FnService,
- // private gd: GlyphDataService,
- private log: LogService,
- private sus: SvgUtilService
- ) {
- this.clear();
- this.init();
- this.api = {
- registerGlyphs: this.registerGlyphs,
- registerGlyphSet: this.registerGlyphSet,
- ids: this.ids,
- glyph: this.glyph,
- glyphDefined: this.glyphDefined,
- loadDefs: this.loadDefs,
- addGlyph: this.addGlyph,
- };
- this.log.debug('GlyphService constructed');
- }
-
- warn(msg: string): void {
- this.log.warn(msgGS + msg);
- }
-
- addToMap(key, value, vbox, overwrite: boolean, dups) {
- if (!overwrite && this.glyphs.get(key)) {
- dups.push(key);
- } else {
- this.glyphs.set(key, { id: key, vb: vbox, d: value });
- }
- }
-
- reportDups(dups: string[], which: string): boolean {
- const ok: boolean = (dups.length === 0);
- const msg = 'ID collision: ';
-
- if (!ok) {
- dups.forEach((id) => {
- this.warn(which + msg + '"' + id + '"');
- });
- }
- return ok;
- }
-
- reportMissVb(missing: string[], which: string): boolean {
- const ok: boolean = (missing.length === 0);
- const msg = 'Missing viewbox property: ';
-
- if (!ok) {
- missing.forEach((vbk) => {
- this.warn(which + msg + '"' + vbk + '"');
- });
- }
- return ok;
- }
-
- clear() {
- // start with a fresh map
- this.glyphs = d3.map();
- }
-
- init() {
- this.log.info('Registering glyphs');
- this.registerGlyphs(gds.logos);
- this.registerGlyphSet(gds.glyphDataSet);
- this.registerGlyphSet(gds.badgeDataSet);
- this.registerGlyphs(gds.spriteData);
- this.registerGlyphSet(gds.mojoDataSet);
- this.registerGlyphs(gds.extraGlyphs);
- }
-
- registerGlyphs(data: Map<string, string>, overwrite: boolean = false): boolean {
- const dups: string[] = [];
- const missvb: string[] = [];
- for (const [key, value] of data.entries()) {
- const vbk = '_' + key;
- const vb = data.get(vbk);
-
- if (key[0] !== '_') {
- if (!vb) {
- missvb.push(vbk);
- continue;
- }
- this.addToMap(key, value, vb, overwrite, dups);
- }
- }
- return this.reportDups(dups, rg) && this.reportMissVb(missvb, rg);
- }
-
- registerGlyphSet(data: Map<string, string>, overwrite: boolean = false): boolean {
- const dups: string[] = [];
- const vb: string = data.get('_viewbox');
-
- if (!vb) {
- this.warn(rgs + 'no "_viewbox" property found');
- return false;
- }
-
- for (const [key, value] of data.entries()) {
- // angular.forEach(data, function (value, key) {
- if (key[0] !== '_') {
- this.addToMap(key, value, vb, overwrite, dups);
- }
- }
- return this.reportDups(dups, rgs);
- }
-
- ids() {
- return this.glyphs.keys();
- }
-
- glyph(id) {
- return this.glyphs.get(id);
- }
-
- glyphDefined(id) {
- return this.glyphs.has(id);
- }
-
-
- /**
- * Load definitions of a glyph
- *
- * Note: defs should be a D3 selection of a single <defs> element
- */
- loadDefs(defs, glyphIds: string[], noClear: boolean) {
- const list = this.fs.isA(glyphIds) || this.ids();
-
- if (!noClear) {
- // remove all existing content
- defs.html(null);
- }
-
- // load up the requested glyphs
- list.forEach((id) => {
- const g = this.glyph(id);
- if (g) {
- if (noClear) {
- // quick exit if symbol is already present
- // TODO: check if this should be a continue or break instead
- if (defs.select('symbol#' + g.id).size() > 0) {
- return;
- }
- }
- defs.append('symbol')
- .attr('id', g.id)
- .attr('viewBox', g.vb)
- .append('path')
- .attr('d', g.d);
- }
- });
- }
-
- addGlyph(elem: any, glyphId: string, size: number, overlay: any, trans: any) {
- const sz = size || 40,
- ovr = !!overlay,
- xns = this.fs.isA(trans),
- atr = {
- width: sz,
- height: sz,
- 'class': 'glyph',
- 'xlink:href': '#' + glyphId,
- };
-
- if (xns) {
- atr.class = this.sus.translate(trans);
- }
- return elem.append('use').attr(atr).classed('overlay', ovr);
- }
-}
diff --git a/web/gui2/src/main/webapp/app/fw/svg/glyphdata.service.ts b/web/gui2/src/main/webapp/app/fw/svg/glyphdata.service.ts
deleted file mode 100644
index 6001807..0000000
--- a/web/gui2/src/main/webapp/app/fw/svg/glyphdata.service.ts
+++ /dev/null
@@ -1,1324 +0,0 @@
-/*
- * Copyright 2016-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 { Injectable } from '@angular/core';
-import { LogService } from '../../log.service';
-
-
-// --- ONOS logo glyph ------------------------------------
-
-export const logos = new Map<string, string>([
- [ '_bird', '352 224 113 112'],
- [ 'bird', 'M427.7,300.4 c-6.9,0.6-13.1,5-19.2,7.1c-18.1,6.2-33.9,' +
- '9.1-56.5,4.7c24.6,17.2,36.6,13,63.7,0.1c-0.5,0.6-0.7,1.3-1.3,' +
- '1.9c1.4-0.4,2.4-1.7,3.4-2.2c-0.4,0.7-0.9,1.5-1.4,1.9c2.2-0.6,' +
- '3.7-2.3,5.9-3.9c-2.4,2.1-4.2,5-6,8c-1.5,2.5-3.1,4.8-5.1,6.9c-1,' +
- '1-1.9,1.9-2.9,2.9c-1.4,1.3-2.9,2.5-5.1,2.9c1.7,0.1,3.6-0.3,6.5' +
- '-1.9c-1.6,2.4-7.1,6.2-9.9,7.2c10.5-2.6,19.2-15.9,25.7-18c18.3' +
- '-5.9,13.8-3.4,27-14.2c1.6-1.3,3-1,5.1-0.8c1.1,0.1,2.1,0.3,3.2,' +
- '0.5c0.8,0.2,1.4,0.4,2.2,0.8l1.8,0.9c-1.9-4.5-2.3-4.1-5.9-6c-2.3' +
- '-1.3-3.3-3.8-6.2-4.9c-7.1-2.6-11.9,11.7-11.7-5c0.1-8,4.2-14.4,' +
- '6.4-22c1.1-3.8,2.3-7.6,2.4-11.5c0.1-2.3,0-4.7-0.4-7c-2-11.2-8.4' +
- '-21.5-19.7-24.8c-1-0.3-1.1-0.3-0.9,0c9.6,17.1,7.2,38.3,3.1,54.2' +
- 'C429.9,285.5,426.7,293.2,427.7,300.4z'],
- [ '_cord', '0 0 110 110'],
- [ 'cord', 'M92.5,62.3l-33,33,2.5,2.5c4.1,4.1,7.4,3.6,11.2-.1L95.9,75' +
- 'l-4.5-4.5,4.7-4.7-3.6-3.6Z' +
- 'm2.6,7L98.4,66l3.3,3.3-3.3,3.3-3.3-3.3Z' +
- 'M94.5,60l4.9-4.9,4.9,4.9-4.9,4.9Z' +
- 'M36.2,36.1L18.6,53.8c-7.8,7.8-5.8,17.4-2.4,22l-2.2-2.2' +
- 'c-10.6-10.6-11.2-20,0-31.2L28.2,28.1L31.3,25l8,8-3.1,3.1Z' +
- 'M55.5,55.4l3.6-3.6L66.9,44l-8-8l-2.5,2.5-5.2,5.2l-3.6,3.6' +
- 'L33.2,61.6C22,72.7,22.5,82.2,33.2,92.8L35.4,95' +
- 'c-3.4-4.5-5.4-14.1,2.4-22L55.5,55.4Z' +
- 'M50.7,21.7l-8-8L35,21.2l8,8,7.6-7.6Z' +
- 'M62.8,9.6L55.4,17l-8-8,7.4-7.4,8,8Z' +
- 'm0.7,18.3-7.6,7.6-8-8,7.6-7.6,8,8Z' +
- 'm26.1-6.6-8.1,8.1-8-8,8.1-8.1,8,8Z' +
- 'M79.3,31.5l-7.4,7.4-8-8,7.4-7.4,8,8Z' +
- 'M45.7,45.6L54.3,37l-8-8-8.6,8.6L23.4,51.8' +
- 'C12.2,63,12.8,72.4,23.4,83l2.2,2.2c-3.4-4.5-5.4-14.1,2.4-22Z' +
- 'M34.9,80.7l20.6,20.5c2,2,4.6,4.1,7.9,3.2-2.9,2.9-8.9,1.7-11.9-1.3' +
- 'L35.1,86.8,35,86.6H34.9l-0.8-.8' +
- 'a15,15,0,0,1,.1-1.9,14.7,14.7,0,0,1,.7-3.2Z' +
- 'm-0.6,7.4a21.3,21.3,0,0,0,5.9,11.7l5.7,5.7' +
- 'c3,3,9,4.1,11.9,1.3-3.3.9-5.9-1.2-7.9-3.2L34.3,88.1Z' +
- 'm3.5-12.4a16.6,16.6,0,0,0-2.3,3.6L57,100.8' +
- 'c3,3,9,4.1,11.9,1.3-3.3.9-5.9-1.2-7.9-3.2Z'],
-]);
-
-
-// --- Core glyphs ------------------------------------
-
-// NOTE: when adding glyphs, please also update GlyphConstants class.
-const tableFrame = 'M6.3,5.3h8.5v14.2h-8.5z' +
- 'M95.3,5.3h8.5v14.2h-8.5z' +
- 'M18.5,5.3h15.6v14.2h-15.6z' +
- 'M37.9,5.3h15.6v14.2h-15.6z' +
- 'M57,5.3h15.6v14.2h-15.6z' +
- 'M76.1,5.3h15.6v14.2h-15.6z' +
- 'M6.3,23.9h97.5v80.75h-97.5z';
-
-const rSquare = 'M10,20a10,10,0,0,1,10-10h70a10,10,0,0,1,10,10v70a10,10,' +
- '0,0,1-10,10h-70a10,10,0,0,1-10-10z';
-
-const octagon = 'M10,35l25-25h40l25,25v40l-25,25h-40l-25-25z';
-
-const circle = 'M10,55A45,45,0,0,1,100,55A45,45,0,0,1,10,55';
-
-const arrowsLR = 'M58,26l12,0,0-8,18,13-18,13,0-8-12,0z' +
- 'M58,60l12,0,0-8,18,13-18,13,0-8-12,0z' +
- 'M52,40l-12,0,0-8-18,13,18,13,0-8,12,0z' +
- 'M52,74l-12,0,0-8-18,13,18,13,0-8,12,0z';
-
-const arrowsInHOutV = 'M20,50l12,0,0-8,18,13-18,13,0-8-12,0z' +
- 'M90,50l-12,0,0-8-18,13,18,13,0-8,12,0z' +
- 'M50,47l0-12-8,0,13-18,13,18-8,0,0,12z' +
- 'M50,63l0,12-8,0,13,18,13-18-8,0,0-12z';
-
-const laser = 'M47.2,68.4L31.1,84.5,25.6,79,41.7,62.9Z' +
- 'M76.3,30.6A3.4,3.4,0,0,0,72.9,34a3.3,3.3,0,0,0,.3,1.3L44.7,63.7' +
- 'l1.7,1.7L74.8,37a3.2,3.2,0,0,0,1.5.4A3.4,3.4,0,1,0,76.3,30.6Z' +
- 'm0.9-2.9V23.8a0.8,0.8,0,0,0-.8-0.8H76.1a0.8,0.8,0,0,0-.8.8v3.9' +
- 'a0.8,0.8,0,0,0,.8.8h0.3A0.8,0.8,0,0,0,77.2,27.7Z' +
- 'm3.5,3.2,3.6-3.6a0.9,0.9,0,0,0,0-1.2H84.3a0.9,0.9,0,0,0-1.2,0' +
- 'l-3.6,3.6a0.9,0.9,0,0,0,0,1.2h0.1A0.9,0.9,0,0,0,80.7,30.9Z' +
- 'm1.8,4h3.9a0.8,0.8,0,0,0,.8-0.8V33.7a0.8,0.8,0,0,0-.8-0.8H82.6' +
- 'a0.8,0.8,0,0,0-.8.8V34A0.8,0.8,0,0,0,82.6,34.8Z' +
- 'm-16.3.1h3.9a0.8,0.8,0,0,0,.8-0.8V33.8a0.8,0.8,0,0,0-.8-0.8' +
- 'H66.2a0.8,0.8,0,0,0-.8.8v0.3A0.8,0.8,0,0,0,66.2,34.9Z' +
- 'm6.8-5.2-3.8-3.8a0.9,0.9,0,0,0-1.3,0a0.9,0.9,0,0,0,0,1.3' +
- 'L71.8,31A0.9,0.9,0,0,0,73,31A0.9,0.9,0,0,0,73.1,29.7Z' +
- 'M84.8,40.9L80.9,37a0.9,0.9,0,0,0-1.3,0a0.9,0.9,0,0,0,0,1.3' +
- 'l3.9,3.9a0.9,0.9,0,0,0,1.3,0A0.9,0.9,0,0,0,84.8,40.9Z' +
- 'm-7.6,3.2V40.2a0.8,0.8,0,0,0-.8-0.8H76.2a0.8,0.8,0,0,0-.8.8' +
- 'v3.9a0.8,0.8,0,0,0,.8.8h0.3A0.8,0.8,0,0,0,77.3,44.1Z';
-
-const fiberStar = 'M89,60V57H70.6a15,15,0,0,1-3.2,7.6l13,12.9L82.8,75v7.5' +
- 'H75.2l2.2-2.2-12.8-13A14.9,14.9,0,0,1,57,70.6V89h3.1l-5.3,5.4' +
- 'L49.4,89H53V70.6a13.2,13.2,0,0,1-8-3.2l-13.1,13,2.3,2.3H26.5' +
- 'V75.1l2.3,2.3,13-12.8A15,15,0,0,1,38.7,57H21v3l-5.4-5.4L21,49.3' +
- 'V53H38.7a13.1,13.1,0,0,1,3.2-8l-13-13.1-2.2,2.1V26.4h7.5l-2.4,2.4' +
- 'L45,41.8a13.2,13.2,0,0,1,8-3.2V21H49.4l5.4-5.4L60.1,21H57V38.6' +
- 'a14.9,14.9,0,0,1,7.6,3.2l12.9-13-2.4-2.3h7.5v7.6l-2.3-2.3L67.4,45' +
- 'a13.1,13.1,0,0,1,3.2,8H89V49.3l5.4,5.3Z';
-
-export const glyphDataSet = new Map<string, string>([
- ['_viewbox', '0 0 110 110'],
-
- ['uiAttached', 'M91.9,16.7H18.1A5.3,5.3,0,0,0,12.8,22V68' +
- 'a5.3,5.3,0,0,0,5.3,5.3H91.9A5.3,5.3,0,0,0,97.2,68V22' +
- 'A5.3,5.3,0,0,0,91.9,16.7ZM91.6,65.2H18.4V22.3H91.6V65.2Z' +
- 'M71.5,87.5h3.8v5.9h-40.6v-5.9h3.8v-1.7h5.4v-9.7h22.3v9.7h5.3v1.7z'],
-
- // Small dot
- ['unknown', 'M35,40a5,5,0,0,1,5-5h30a5,5,0,0,1,5,5v30a5,5,0,0,1-5,5' +
- 'h-30a5,5,0,0,1-5-5z'],
-
- // Question mark for unknown device types
- ['query', 'M51.4,69.9c0-0.9,0-1.6,0-2.1c0-2.7,0.4-5.1,1.2-7.1' +
- 'c0.6-1.5,1.5-3,2.8-4.5c0.9-1.1,2.6-2.7,5.1-4.8c2.4-2.1,4-3.8,' +
- '4.8-5.1 c0.7-1.3,1.1-2.6,1.1-4.1c0-2.7-1.1-5.1-3.2-7.1c-2.1-2' +
- '-4.8-3.1-7.9-3.1c-3,0-5.5,0.9-7.5,2.8c-2,1.9-3.3,4.8-4,8.7l-7.2' +
- '-0.8 c0.7-5.3,2.6-9.3,5.8-12.1c3.2-2.8,7.5-4.2,12.8-4.2c5.6,0,' +
- '10.1,1.5,13.4,4.5c3.3,3,5,6.7,5,10.9c0,2.5-0.6,4.8-1.8,6.8 ' +
- 's-3.5,4.6-6.9,7.6c-2.3,2-3.8,3.5-4.5,4.4c-0.7,1-1.2,2-1.6,3.3' +
- 'c-0.3,1.2-0.5,3.2-0.6,6H51.4z M51,83.8v-7.9h8v7.9H51z'],
-
-
- // --- ONOS cluster node ---
- ['node', 'M15,100a5,5,0,0,1-5-5v-65a5,5,0,0,1,5-5h80a5,5,0,0,1,5,5' +
- 'v65a5,5,0,0,1-5,5zM14,22.5l11-11a10,3,0,0,1,10-2h40a10,3,0,0,1,' +
- '10,2l11,11zM16,35a5,5,0,0,1,10,0a5,5,0,0,1-10,0z'],
-
-
- // --- DEVICES ---
- // See Device.DeviceType enum for the following...
-
- // NOTE: 'other' should map to 'unknown' (.) above
-
- // deprecated glyphs -- using Mojo Designs below -- m_*
- ['switch', rSquare + arrowsLR],
-
- ['router', circle + arrowsInHOutV],
-
- ['roadm', octagon + arrowsLR],
-
- ['otn', rSquare + laser],
-
- ['roadm_otn', octagon + laser],
-
- ['fiber_switch', rSquare + fiberStar],
-
- ['microwave', 'M85,71.2c-8.9,10.5-29.6,8.7-45.3-3.5C23.9,55.4,19.8,' +
- '37,28.6,26.5C29.9,38.6,71.5,69.9,85,71.2z M92.7,76.2M16.2,15 ' +
- 'M69.5,100.7v-4c0-1.4-1.2-2.2-2.6-2.2H19.3c-1.4,0-2.8,0.7-2.8,2.2' +
- 'v3.9c0,0.7,0.8,1,1.5,1h50.3C69,101.5,69.5,101.3,69.5,100.7z ' +
- 'M77.3,7.5l0,3.7c9,0.1,16.3,7.1,16.2,15.7l3.9,0C97.5,16.3,88.5,' +
- '7.6,77.3,7.5z M77.6,14.7l0,2.5c5.3,0,9.7,4.2,9.6,9.3l2.6,0C89.9' +
- ',20,84.4,14.7,77.6,14.7z M82.3,22.2c-1.3-1.2-2.9-1.9-4.7-1.9' +
- 'l0,1.2c1.4,0,2.8,0.6,3.8,1.5c1,1,1.6,2.3,1.6,3.7l1.3,0C84.3,25.1,' +
- '83.6,23.4,82.3,22.2z M38.9,69.5l-5.1,23h16.5l-2.5-17.2C44.1,73.3,' +
- '38.9,69.5,38.9,69.5zM58.1,54.1c13.7,10.1,26.5,16.8,29.2,13.7' +
- 'c2.7-3.1-5.6-13-19.3-24.4 M62.9,34.2 M62,37.9C47.7,27.3,33.7,20,' +
- '31,23.1c-2.7,3.2,7,14.2,20.6,26 M73.9,25.7c-2.9,0.1-5.2,2.3-5.1,' +
- '4.8c0,0.7,0.2,1.4,0.6,2l0,0L53.8,49.7l3.3,2.5L72.7,35l-0.4-0.3' +
- 'c0.6,0.2,1.3,0.3,1.9,0.3c2.9-0.1,5.2-2.3,5.1-4.9C79.3,27.6,76.8,' +
- '25.6,73.9,25.7z'],
-
- // NOTE: 'unrecognized' should map to 'query' (?) above
-
-
- // --- HOSTS ---
-
- // default glyph for a host
- ['endstation', 'M10,15a5,5,0,0,1,5-5h65a5,5,0,0,1,5,5v80a5,5,0,0,1' +
- '-5,5h-65a5,5,0,0,1-5-5zM87.5,14l11,11a3,10,0,0,1,2,10v40a3,10,' +
- '0,0,1,-2,10l-11,11zM17,19a2,2,0,0,1,2-2h56a2,2,0,0,1,2,2v26a2,' +
- '2,0,0,1-2,2h-56a2,2,0,0,1-2-2zM20,20h54v10h-54zM20,33h54v10h' +
- '-54zM42,70a5,5,0,0,1,10,0a5,5,0,0,1-10,0z'],
-
- ['bgpSpeaker', 'M10,40a45,35,0,0,1,90,0Q100,77,55,100Q10,77,10,40z' +
- 'M50,29l12,0,0-8,18,13-18,13,0-8-12,0zM60,57l-12,0,0-8-18,13,' +
- '18,13,0-8,12,0z'],
-
-
- // --- Miscellaneous glyphs ---------------------------------
-
- ['chain', 'M60.4,77.6c-4.9,5.2-9.6,11.3-15.3,16.3c-8.6,7.5-20.4,6.8' +
- '-28-0.8c-7.7-7.7-8.4-19.6-0.8-28.4c6.5-7.4,13.5-14.4,20.9-20.9' +
- 'c7.5-6.7,19.2-6.7,26.5-0.8c3.5,2.8,4.4,6.1,2.2,8.7c-2.7,3.1' +
- '-5.5,2.5-8.5,0.3c-4.7-3.4-9.7-3.2-14,0.9C37.1,58.7,31,64.8,' +
- '25.2,71c-4.2,4.4-4.2,10.6-0.6,14.3c3.7,3.7,9.7,3.7,14.3-0.4' +
- 'c2.9-2.5,5.3-5.5,8.3-8c1-0.9,3-1.1,4.4-0.9C54.8,76.3,57.9,77.1,' +
- '60.4,77.6zM49.2,32.2c5-5.2,9.7-10.9,15.2-15.7c12.8-11,31.2' +
- '-4.9,34.3,11.2C100,34.2,98.3,40.2,94,45c-6.7,7.4-13.7,14.6' +
- '-21.2,21.2C65.1,73,53.2,72.7,46,66.5c-3.2-2.8-3.9-5.8-1.6-8.4' +
- 'c2.6-2.9,5.3-2.4,8.2-0.3c5.2,3.7,10,3.3,14.7-1.1c5.8-5.6,11.6' +
- '-11.3,17.2-17.2c4.6-4.8,4.9-11.1,0.9-15c-3.9-3.9-10.1-3.4-15,' +
- '1.2c-3.1,2.9-5.7,7.4-9.3,8.5C57.6,35.3,53,33,49.2,32.2z'],
-
- ['crown', 'M99.5,21.6c0,3-2.3,5.4-5.1,5.4c-0.3,0-0.7,0-1-0.1c-1.8,' +
- '4-4.8,10-7.2,17.3c-3.4,10.6-0.9,26.2,2.7,27.3C90.4,72,91.3,' +
- '75,88,75H22.7c-3.3,0-2.4-3-0.9-3.5c3.6-1.1,6.1-16.7,2.7-27.3' +
- 'c-2.4-7.4-5.4-13.5-7.2-17.5c-0.5,0.2-1,0.3-1.6,0.3c-2.8,0' +
- '-5.1-2.4-5.1-5.4c0-3,2.3-5.4,5.1-5.4c2.8,0,5.1,2.4,5.1,5.4c0,' +
- '1-0.2,1.9-0.7,2.7c0.7,0.8,1.4,1.6,2.4,2.6c8.8,8.9,11.9,12.7,' +
- '18.1,11.7c6.5-1,11-8.2,13.3-14.1c-2-0.8-3.3-2.7-3.3-5.1c0-3,' +
- '2.3-5.4,5.1-5.4c2.8,0,5.1,2.4,5.1,5.4c0,2.5-1.6,4.5-3.7,5.2' +
- 'c2.3,5.9,6.8,13,13.2,14c6.2,1,9.3-2.7,18.1-11.7c0.7-0.7,1.4' +
- '-1.5,2-2.1c-0.6-0.9-1-2-1-3.1c0-3,2.3-5.4,5.1-5.4C97.2,16.2,' +
- '99.5,18.6,99.5,21.6zM92,87.9c0,2.2-1.7,4.1-3.8,4.1H22.4c' +
- '-2.1,0-4.4-1.9-4.4-4.1v-3.3c0-2.2,2.3-4.5,4.4-4.5h65.8c2.1,' +
- '0,3.8,2.3,3.8,4.5V87.9z'],
-
- ['lock', 'M79.4,48.6h-2.7c0.2-5.7-0.2-20.4-7.9-28.8c-3.6-3.9-8.3' +
- '-5.9-13.7-5.9c-5.4,0-10.2,2-13.8,5.9c-7.8,8.4-8.3,23.2-8.1,28.8' +
- 'h-2.7c-4.4,0-8,2.6-8,5.9v35.7c0,3.3,3.6,5.9,8,5.9h48.9c4.4,0,' +
- '8-2.6,8-5.9V54.5C87.5,51.3,83.9,48.6,79.4,48.6z M48.1,26.1c1.9' +
- '-2,4.1-2.9,7-2.9c2.9,0,5.1,0.9,6.9,2.9c5,5.4,5.6,17.1,5.4,22.6' +
- 'h-25C42.3,43.1,43.1,31.5,48.1,26.1z'],
-
- ['topo', 'M97.2,76.3H86.6l-7.7-21.9H82c1,0,1.9-0.8,1.9-1.9V35.7c' +
- '0-1-0.8-1.9-1.9-1.9H65.2c-1,0-1.9,0.8-1.9,1.9v2.6L33.4,26.1v-11' +
- 'c0-1-0.8-1.9-1.9-1.9H14.7c-1,0-1.9,0.8-1.9,1.9v16.8c0,1,0.8,' +
- '1.9,1.9,1.9h16.8c1,0,1.9-0.8,1.9-1.9v-2.6l29.9,12.2v9L30.5,76.9' +
- 'c-0.3-0.3-0.8-0.5-1.3-0.5H12.4c-1,0-1.9,0.8-1.9,1.9V95c0,1,0.8,' +
- '1.9,1.9,1.9h16.8c1,0,1.9-0.8,1.9-1.9v-6.9h47.4V95c0,1,0.8,1.9,' +
- '1.9,1.9h16.8c1,0,1.9-0.8,1.9-1.9V78.2C99.1,77.2,98.2,76.3,97.2,' +
- '76.3z M31.1,85.1v-4.9l32.8-26.4c0.3,0.3,0.8,0.5,1.3,0.5h10.5l' +
- '7.7,21.9h-3c-1,0-1.9,0.8-1.9,1.9v6.9H31.1z'],
-
- ['refresh',
- 'M99.7,53.8l-10,13.3L85,73.5,78,64,70.4,53.7h9' +
- 'A28.5,28.5,0,1,0,68.3,77.6l10.6,6.9A40.7,40.7,0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28.8,16.8a2.3,2.3,0,0,0-3.1.2l-9.2,9.2a2.4,2.4,0,0,0-.2,3.2' +
- 'l8.1,10.4-1.7,4.1L9.8,46.4A2.3,2.3,0,0,0,8,48.7V61.9' +
- 'a2.3,2.3,0,0,0,2,2.4L22.6,66l1.7,5.2-7.7,10a2.4,2.4,0,0,0,.2,3.2' +
- 'l9.1,9a2.4,2.4,0,0,0,3.3.1l9-8.2,4.8,2.2,2.6,12.7' +
- 'a2.3,2.3,0,0,0,2.4,1.9l13.9-.2a2.5,2.5,0,0,0,2.3-2.4' +
- 'l0.7-11.4,5.5-2.3,9.8,8.1a2.4,2.4,0,0,0,3.2-.1L93,83.9' +
- 'a2.4,2.4,0,0,0,.1-3.3L84.7,71,87,66l13.2-2.5a2.3,2.3,0,0,0,1.9-2.3' +
- 'l0.2-12.5A2.4,2.4,0,0,0,100.2,46.4ZM54.4,73' +
- 'A18.2,18.2,0,1,1,72.6,54.8,18.2,18.2,0,0,1,54.4,73Z'],
-
- ['delta', 'M55,19.2L13.7,90.8h82.7L55,19.2z ' +
- 'M55,31.2l30.9,53.5H24.1L55,31.2z'],
-
- ['nonzero', 'M76.7,25.1l7.8-13.5l-7.6-0.3l-5.7,9.9' +
- 'c-4.8-2.9-10.4-4.5-16.2-4.5c-19.1,0-34.7,17.2-34.7,38.4' +
- 'c0,12.5,5.4,23.6,13.7,30.6l-7.6,13.2l7.6,0.1l5.5-9.6' +
- 'c4.7,2.6,9.9,4,15.5,4c19.1,0,34.7-17.2,34.7-38.4' +
- 'C89.7,42.9,84.6,32.1,76.7,25.1z M27.9,55C27.9,38.4,40,25,55,25' +
- 'c4.4,0,8.5,1.2,12.2,3.2l-29,50.3C31.9,73,27.9,64.5,27.9,55z' +
- 'M55,85c-4.1,0-7.9-1-11.4-2.8l29-50.1c5.8,5.5,9.5,13.7,9.5,22.8' +
- 'C82.1,71.6,70,85,55,85z'],
-
- ['download', 'M90.3,94.5H19.7V79.2H90.3V94.5Z' +
- 'm-49.1-79V44H26.2L55,72.3,83.8,44H68.9V15.5H41.1Z'],
-
- ['upload', 'M90.3,79.4H19.7V94.6H90.3V79.4Z' +
- 'M41.1,71.8V43.5H26.2L55,15.4,83.8,43.5H68.9V71.8H41.1Z'],
-
- // --- Navigation glyphs ------------------------------------
-
- ['flowTable', tableFrame +
- 'M86,63.2c0,3.3-2.7,6-6,6c-2.8,0-5.1-1.9-5.8-' +
- '4.5H63.3v5.1c0,0.9-0.7,1.5-1.5,1.5h-5.2v10.6c2.6,0.7,4.5,3,4.5,' +
- '5.8c0,3.3-2.7,6-6,6c-3.3,0-6-2.7-6-6c0-2.8,1.9-5.1,4.4-5.8V71.3' +
- 'H48c-0.9,0-1.5-0.7-1.5-1.5v-5.1H36c-0.7,2.6-3,4.4-5.8,4.4c-3.3,' +
- '0-6-2.7-6-6s2.7-6,6-6c2.8,0,5.2,1.9,5.8,4.5h10.5V56c0-0.9,0.7-' +
- '1.5,1.5-1.5h5.5V43.8c-2.6-0.7-4.5-3-4.5-5.8c0-3.3,2.7-6,6-6s6,' +
- '2.7,6,6c0,2.8-1.9,5.1-4.5,5.8v10.6h5.2c0.9,0,1.5,0.7,1.5,1.5v' +
- '5.6h10.8c0.7-2.6,3-4.5,5.8-4.5C83.3,57.1,86,59.8,86,63.2z ' +
- 'M55.1,42.3c2.3,0,4.3-1.9,4.3-4.3c0-2.3-1.9-4.3-4.3-4.3' +
- 's-4.3,1.9-4.3,4.3C50.8,40.4,52.7,42.3,55.1,42.3z ' +
- 'M34.4,63.1c0-2.3-1.9-4.3-4.3-4.3s-4.3,1.9-4.3,4.3' +
- 's1.9,4.3,4.3,4.3S34.4,65.5,34.4,63.1z ' +
- 'M55.1,83.5c-2.3,0-4.3,1.9-4.3,4.3s1.9,4.3,4.3,4.3' +
- 's4.3-1.9,4.3-4.3S57.5,83.5,55.1,83.5z' +
- 'M84.2,63.2c0-2.3-1.9-4.3-4.3-4.3s-4.3,' +
- '1.9-4.3,4.3s1.9,4.3,4.3,4.3S84.2,65.5,84.2,63.2z'],
-
- ['portTable', tableFrame +
- 'M85.5,37.7c0-0.7-0.4-1.3-0.9-1.3H26.2c-0.5,0-' +
- '0.9,0.6-0.9,1.3v34.6c0,0.7,0.4,1.3,0.9,1.3h11v9.6c0,1.1,0.5,2,' +
- '1.2,2h9.1c0,0.2,0,0.3,0,0.5v3c0,1.1,0.5,2,1.2,2h13.5c0.6,0,1.2-' +
- '0.9,1.2-2v-3c0-0.2,0-0.3,0-0.5h9.1c0.6,0,1.2-0.9,1.2-2v-9.6h11' +
- 'c0.5,0,0.9-0.6,0.9-1.3V37.7z M30.2,40h-1v8h1V40zM75.2,40h-2.1v8' +
- 'h2.1V40z M67.7,40h-2.1v8h2.1V40z M60.2,40h-2.1v8h2.1V40z M52.7,' +
- '40h-2.1v8h2.1V40z M45.2,40h-2.1v8h2.1V40zM37.7,40h-2.1v8h2.1V40' +
- 'z M81.6,40h-1v8h1V40z'],
-
- ['groupTable', tableFrame +
- 'M45.7,52.7c0.2-5.6,2.6-10.7,6.2-14.4c-2.6-1.5-5.7-2.5-8.9-2.5' +
- 'c-9.8,0-17.7,7.9-17.7,17.7c0,6.3,3.3,11.9,8.3,15' +
- 'C34.8,61.5,39.4,55.6,45.7,52.7z ' +
- 'M51.9,68.8c-3.1-3.1-5.2-7.2-6-11.7c-4.7,2.8-7.9,7.6-8.6,13.2' +
- 'c1.8,0.6,3.6,0.9,5.6,0.9C46.2,71.2,49.3,70.3,51.9,68.8z ' +
- 'M55.2,71.5c-3.5,2.4-7.7,3.7-12.2,3.7c-1.9,0-3.8-0.3-5.6-0.7' +
- 'C38.5,83.2,45.9,90,54.9,90c9,0,16.4-6.7,17.5-15.4' +
- 'c-1.6,0.4-3.4,0.6-5.1,0.6C62.8,75.2,58.6,73.8,55.2,71.5z ' +
- 'M54.9,50.6c1.9,0,3.8,0.3,5.6,0.7c-0.5-4.1-2.5-7.9-5.4-10.6' +
- 'c-2.9,2.7-4.8,6.4-5.3,10.5C51.5,50.8,53.2,50.6,54.9,50.6z ' +
- 'M49.7,55.4c0.5,4.3,2.4,8.1,5.4,10.9c2.9-2.8,4.9-6.6,5.4-10.8' +
- 'c-1.8-0.6-3.6-0.9-5.6-0.9C53.1,54.6,51.4,54.9,49.7,55.4z ' +
- 'M89,53.5c0-12-9.7-21.7-21.7-21.7c-4.5,0-8.7,1.4-12.2,3.7' +
- 'c-3.5-2.4-7.7-3.7-12.2-3.7c-12,0-21.7,9.7-21.7,21.7' +
- 'c0,8.5,4.9,15.9,12,19.4C33.6,84.6,43.2,94,54.9,94' +
- 'c11.7,0,21.2-9.3,21.7-20.9C84,69.7,89,62.2,89,53.5z ' +
- 'M64.3,57.3c-0.8,4.4-2.9,8.4-5.9,11.5c2.6,1.5,5.7,2.5,8.9,2.5' +
- 'c1.8,0,3.6-0.3,5.2-0.8C72,64.9,68.8,60.1,64.3,57.3z ' +
- 'M67.3,35.8c-3.3,0-6.3,0.9-8.9,2.5c3.7,3.8,6.1,8.9,6.2,14.6' +
- 'c6.1,3.1,10.6,8.9,11.7,15.8C81.5,65.6,85,60,85,53.5' +
- 'C85,43.8,77.1,35.8,67.3,35.8z'],
-
- ['meterTable', tableFrame +
- 'M96.3,79.2c0-19.1-22.1-34.6-41.3-34.6S13.7,60.1,13.7,79.2' +
- 'H39.4c0-7.2,8.4-13.1,15.7-13.1S70.6,72,70.6,79.2H96.3z' +
- 'M48,65.6L36.8,53c0-.5-1.5.5-1.4,0.7l5.3,16.6z'],
-
- ['pipeconfTable', tableFrame +
- 'M10,66h13v3h-13z' +
- 'M23,62.5L28,67.5L23,72.5z' +
- 'M30,55h12.5v25h-12.5z' +
- 'M45,66h13v3h-13z' +
- 'M58,62.5L63,67.5L58,72.5z' +
- 'M65,55h12.5v25h-12.5z' +
- 'M79,66h15v3h-15z' +
- 'M94,62.5L99,67.5L94,72.5z'],
-
- // --- Topology toolbar specific glyphs ----------------------
-
- ['summary', 'M95.8,9.2H14.2c-2.8,0-5,2.2-5,5v81.5c0,2.8,2.2,5,5,' +
- '5h81.5c2.8,0,5-2.2,5-5V14.2C100.8,11.5,98.5,9.2,95.8,9.2z ' +
- 'M16.7,22.2c0-1.1,0.9-2,2-2h20.1c1.1,0,2,0.9,2,2v20.1c0,1.1-0.9,' +
- '2-2,2H18.7c-1.1,0-2-0.9-2-2V22.2z M93,87c0,1.1-0.9,2-2,2H18.9' +
- 'c-1.1,0-2-0.9-2-2v-7c0-1.1,0.9-2,2-2H91c1.1,0,2,0.9,2,2V87z ' +
- 'M93,65c0,1.1-0.9,2-2,2H18.9c-1.1,0-2-0.9-2-2v-7c0-1.1,0.9-2,' +
- '2-2H91c1.1,0,2,0.9,2,2V65z'],
-
- ['details', 'M95.8,9.2H14.2c-2.8,0-5,2.2-5,5v81.5c0,2.8,2.2,5,5,' +
- '5h81.5c2.8,0,5-2.2,5-5V14.2C100.8,11.5,98.5,9.2,95.8,9.2z M16.9,' +
- '22.2c0-1.1,0.9-2,2-2H91c1.1,0,2,0.9,2,2v7c0,1.1-0.9,2-2,2H18.9c' +
- '-1.1,0-2-0.9-2-2V22.2z M93,87.8c0,1.1-0.9,2-2,2H18.9c-1.1,' +
- '0-2-0.9-2-2v-7c0-1.1,0.9-2,2-2H91c1.1,0,2,0.9,2,2V87.8z M93,68.2' +
- 'c0,1.1-0.9,2-2,2H18.9c-1.1,0-2-0.9-2-2v-7c0-1.1,0.9-2,2-2H91' +
- 'c1.1,0,2,0.9,2,2V68.2z M93,48.8c0,1.1-0.9,2-2,2H19c-1.1,0-2-' +
- '0.9-2-2v-7c0-1.1,0.9-2,2-2H91c1.1,0,2,0.9,2,2V48.8z'],
-
- ['ports', 'M98,9.2H79.6c-1.1,0-2.1,0.9-2.1,2.1v17.6l-5.4,5.4c-1.7' +
- '-1.1-3.8-1.8-6-1.8c-6,0-10.9,4.9-10.9,10.9c0,2.2,0.7,4.3,1.8,6' +
- 'l-7.5,7.5c-1.8-1.2-3.9-1.9-6.2-1.9c-6,0-10.9,4.9-10.9,10.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9L73.2,55C73.1,53.7,73.1,' +
- '52.3,73,51z M91.9,20.4c-0.7,1.4-3.6,3.6-4.2,3.9c-1.5,0.8-5,' +
- '2.8-10.1,7.7c3,2.9,5.8,5.4,7.3,6.4c2.6,1.8,3.4,4.3,3.6,6.1c0.1,' +
- '1.1-0.1,2.5-0.4,3c-0.5,0.9-1.6,2-3,1.4c-2-0.8-11.5-9.6-13-11c' +
- '-3.5,3.9-7.4,8.9-11.7,15.1c0,0-3.1,3.4-5.2,0.9C52.9,51.5,61,' +
- '39.3,61,39.3s2.2-3.1,5.6-7c-2.9-3-5.9-6.3-6.6-7.3c0,0-3.7-5-1.3' +
- '-6.6c3.2-2.1,6.3,0.8,6.3,0.8s3.1,3.3,7,7.2c4.7-4.7,10.1-9.2,' +
- '14.7-10c0,0,3.3-1,5.2,1.7C92.5,18.8,92.4,19.6,91.9,20.4z'],
-
- ['cycleLabels', 'M72.5,33.9c0,0.6-0.2,1-0.5,1H40c-0.3,0-0.5-0.4' +
- '-0.5-1V20.7c0-0.6,0.2-1,0.5-1h32c0.3,0,0.5,0.4,0.5,1V33.9z ' +
- 'M41.2,61.8c0-0.6-0.2-1-0.5-1h-32c-0.3,0-0.5,0.4-0.5,1V75c0,0.6,' +
- '0.2,1,0.5,1h32c0.3,0,0.5-0.4,0.5-1V61.8z M101.8,61.8c0-0.6-0.2' +
- '-1-0.5-1h-32c-0.3,0-0.5,0.4-0.5,1V75c0,0.6,0.2,1,0.5,1h32c0.3,' +
- '0,0.5-0.4,0.5-1V61.8z M17.2,52.9c0-0.1-0.3-7.1,4.6-13.6l-2.4-1.8' +
- 'c-5.4,7.3-5.2,15.2-5.1,15.5L17.2,52.9z M12.7,36.8l7.4,2.5l1.5,' +
- '7.6L29.5,31L12.7,36.8z M94.2,42.3c-2.1-8.9-8.3-13.7-8.6-13.9l' +
- '-1.8,2.4c0.1,0,5.6,4.3,7.5,12.2L94.2,42.3z M99,37.8l-6.6,4.1l' +
- '-6.8-3.7l7.1,16.2L99,37.8z M69,90.2l-1.2-2.8c-0.1,0-6.6,2.8' +
- '-14.3,0.6l-0.8,2.9c2.5,0.7,4.9,1,7,1C65,91.8,68.7,90.2,69,90.2z ' +
- 'M54.3,97.3L54,89.5l6.6-4.1l-17.6-1.7L54.3,97.3z'],
-
- ['oblique', 'M80.9,30.2h4.3l15-16.9H24.8l-15,16.9h19v48.5h-4l-15,' +
- '16.9h75.3l15-16.9H80.9V30.2z M78.6,78.7H56.1V30.2h22.5V78.7z' +
- 'M79.7,17.4c2.4,0,4.3,1.9,4.3,4.3c0,2.4-1.9,4.3-4.3,4.3s-4.3' +
- '-1.9-4.3-4.3C75.4,19.3,77.4,17.4,79.7,17.4z M55,17.4c2.4,0,' +
- '4.3,1.9,4.3,4.3c0,2.4-1.9,4.3-4.3,4.3s-4.3-1.9-4.3-4.3C50.7,' +
- '19.3,52.6,17.4,55,17.4z M26.1,21.7c0-2.4,1.9-4.3,4.3-4.3c2.4,' +
- '0,4.3,1.9,4.3,4.3c0,2.4-1.9,4.3-4.3,4.3C28,26,26.1,24.1,26.1,' +
- '21.7z M31.1,30.2h22.6v48.5H31.1V30.2z M30.3,91.4c-2.4,0-4.3' +
- '-1.9-4.3-4.3c0-2.4,1.9-4.3,4.3-4.3c2.4,0,4.3,1.9,4.3,4.3C34.6,' +
- '89.5,32.7,91.4,30.3,91.4z M54.9,91.4c-2.4,0-4.3-1.9-4.3-4.3c0' +
- '-2.4,1.9-4.3,4.3-4.3c2.4,0,4.3,1.9,4.3,4.3C59.2,89.5,57.3,' +
- '91.4,54.9,91.4z M84,87.1c0,2.4-1.9,4.3-4.3,4.3c-2.4,0-4.3-1.9' +
- '-4.3-4.3c0-2.4,1.9-4.3,4.3-4.3C82.1,82.8,84,84.7,84,87.1z'],
-
- ['filters', 'M24.8,13.3L9.8,40.5h75.3l15.0-27.2H24.8z M72.8,32.1l-' +
- '9.7-8.9l-19.3,8.9l-6.0-7.4L24.1,30.9l-1.2-2.7l15.7-7.1l6.0,7.4' +
- 'l19.0-8.8l9.7,8.8l11.5-5.6l1.3,2.7L72.8,32.1zM24.3,68.3L9.3,' +
- '95.5h75.3l15.0-27.2H24.3z M84.3,85.9L70.7,79.8l-6.0,7.4l-19.3' +
- '-8.9l-9.7,8.9l-13.3-6.5l1.3-2.7l11.5,5.6l9.7-8.8l19.0,8.8l6.0' +
- '-7.4l15.7,7.1L84.3,85.9z M15.3,57h-6v-4h6V57zM88.1,57H76.0v-4h' +
- '12.1V57z M69.9,57H57.8v-4h12.1V57z M51.7,57H39.6v-4H51.7V57z ' +
- 'M33.5,57H21.4v-4h12.1V57zM100.2,57h-6v-4h6V57z'],
-
- ['resetZoom', 'M86,79.8L61.7,54.3c1.8-2.9,2.8-6.3,2.9-10c0.3-11.2' +
- '-8.6-20.5-19.8-20.8C33.7,23.2,24.3,32,24.1,43.2c-0.3,11.2,8.6,' +
- '20.5,19.8,20.8c4,0.1,8.9-0.8,11.9-3.6l23.7,25c1.5,1.6,4,2.3,' +
- '5.3,1l1.6-1.6C87.7,83.7,87.5,81.4,86,79.8z M31.4,43.4c0.2-7.1,' +
- '6.1-12.8,13.2-12.6C51.8,31,57.5,37,57.3,44.1c-0.2,7.1-6.1,12.8' +
- '-13.2,12.6C36.9,56.5,31.3,50.6,31.4,43.4zM22.6,104H6V86.4c0' +
- '-1.7,1.4-3.1,3.1-3.1s3.1,1.4,3.1,3.1v11.4h10.4c1.7,0,3.1,1.4,' +
- '3.1,3.1S24.3,104,22.6,104z M25.7,9.1c0,1.7-1.4,3.1-3.1,3.1' +
- 'H12.2v11.4c0,1.7-1.4,3.1-3.1,3.1S6,25.3,6,23.6V6h16.6C24.3,6,' +
- '25.7,7.4,25.7,9.1z M84.3,100.9c0-1.7,1.4-3.1,3.1-3.1h10.4V86.4' +
- 'c0-1.7,1.4-3.1,3.1-3.1s3.1,1.4,3.1,3.1V104H87.4C85.7,104,84.3,' +
- '102.6,84.3,100.9z M87.4,6H104v17.6c0,1.7-1.4,3.1-3.1,3.1s-3.1' +
- '-1.4-3.1-3.1V12.2H87.4c-1.7,0-3.1-1.4-3.1-3.1S85.7,6,87.4,6z'],
-
- ['relatedIntents', 'M99.9,43.7v22.6c0,1.9-1.5,3.4-3.4,3.4H73.9c' +
- '-1.9,0-3.4-1.5-3.4-3.4V43.7c0-1.9,1.5-3.4,3.4-3.4h22.6C98.4,' +
- '40.3,99.9,41.8,99.9,43.7z M48.4,46.3l6.2,6.7h-4.6L38.5,38v9.7' +
- 'l4.7,5.3H10.1V57h33.2l-4.8,5.3v9.5L49.8,57h5.1v0l-6.5,7v11.5' +
- 'L64.1,55L48.4,34.4V46.3z'],
-
- ['nextIntent', 'M88.1,55.7L34.6,13.1c0,0-1.6-0.5-2.1-0.2c-1.9,1.2' +
- '-6.5,13.8-3.1,17.2c7,6.9,30.6,24.5,32.4,25.9c-1.8,1.4-25.4,19' +
- '-32.4,25.9c-3.4,3.4,1.2,16,3.1,17.2c0.6,0.4,2.1-0.2,2.1-0.2' +
- 's53.1-42.4,53.5-42.7C88.5,56,88.1,55.7,88.1,55.7z'],
-
- ['prevIntent', 'M22.5,55.6L76,12.9c0,0,1.6-0.5,2.2-0.2c1.9,1.2,' +
- '6.5,13.8,3.1,17.2c-7,6.9-30.6,24.5-32.4,25.9c1.8,1.4,25.4,19,' +
- '32.4,25.9c3.4,3.4-1.2,16-3.1,17.2c-0.6,0.4-2.2-0.2-2.2-0.2' +
- 'S22.9,56.3,22.5,56C22.2,55.8,22.5,55.6,22.5,55.6z'],
-
- ['intentTraffic', 'M14.7,71.5h-6v-33h6V71.5z M88.5,38.5H76.9v33' +
- 'h11.7V38.5z M70.1,38.5H58.4v33h11.7V38.5z M51.6,38.5H39.9v33' +
- 'h11.7V38.5z M33.1,38.5H21.5v33h11.7V38.5z M101.3,38.5h-6v33h6' +
- 'V38.5z'],
-
- ['allTraffic', 'M15.7,64.5h-7v-19h7V64.5z M78.6,45.5H62.9v19h15.7' +
- 'V45.5z M47.1,45.5H31.4v19h15.7V45.5z M101.3,45.5h-7v19h7V45.5z' +
- 'M14.7,14.1h-6v19h6V14.1z M88.5,14.1H76.9v19h11.7V14.1z M70.1,' +
- '14.1H58.4v19h11.7V14.1z M51.6,14.1H39.9v19h11.7V14.1z M33.1,14.1' +
- 'H21.5v19h11.7V14.1z M101.3,14.1h-6v19h6V14.1z M14.7,76.9h-6v19' +
- 'h6V76.9z M88.5,76.9H76.9v19h11.7V76.9z M70.1,76.9H58.4v19h11.7' +
- 'V76.9z M51.6,76.9H39.9v19h11.7V76.9z M33.1,76.9H21.5v19h11.7' +
- 'V76.9z M101.3,76.9h-6v19h6V76.9z'],
-
- ['flows', 'M93.8,46.1c-4.3,0-8,3-9,7H67.9v-8.8c0-1.3-1.1-2.4-2.4' +
- '-2.4h-8.1V25.3c4-1,7-4.7,7-9.1c0-5.2-4.2-9.4-9.4-9.4c-5.2,0' +
- '-9.4,4.2-9.4,9.4c0,4.3,3,8,7,9v16.5H44c-1.3,0-2.4,1.1-2.4,2.4' +
- 'v8.8H25.3c-1-4.1-4.7-7.1-9.1-7.1c-5.2,0-9.4,4.2-9.4,9.4s4.2,' +
- '9.4,9.4,9.4c4.3,0,8-2.9,9-6.9h16.4v7.9c0,1.3,1.1,2.4,2.4,2.4' +
- 'h8.6v16.6c-4,1.1-6.9,4.7-6.9,9c0,5.2,4.2,9.4,9.4,9.4c5.2,0,' +
- '9.4-4.2,9.4-9.4c0-4.4-3-8-7.1-9.1V68.2h8.1c1.3,0,2.4-1.1,2.4' +
- '-2.4v-7.9h16.8c1.1,4,4.7,7,9,7c5.2,0,9.4-4.2,9.4-9.4S99,46.1,' +
- '93.8,46.1z M48.7,16.3c0-3.5,2.9-6.4,6.4-6.4c3.5,0,6.4,2.9,6.4,' +
- '6.4s-2.9,6.4-6.4,6.4C51.5,22.6,48.7,19.8,48.7,16.3zM16.2,61.7c' +
- '-3.5,0-6.4-2.9-6.4-6.4c0-3.5,2.9-6.4,6.4-6.4s6.4,2.9,6.4,6.4' +
- 'C22.6,58.9,19.7,61.7,16.2,61.7z M61.4,93.7c0,3.5-2.9,6.4-6.4,' +
- '6.4c-3.5,0-6.4-2.9-6.4-6.4c0-3.5,2.9-6.4,6.4-6.4C58.6,87.4,' +
- '61.4,90.2,61.4,93.7z M93.8,61.8c-3.5,0-6.4-2.9-6.4-6.4c0-3.5,' +
- '2.9-6.4,6.4-6.4s6.4,2.9,6.4,6.4C100.1,58.9,97.3,61.8,93.8,61.8z'],
-
- ['eqMaster', 'M100.1,46.9l-10.8-25h0.2c0.5,0,0.8-0.5,0.8-1.1v-3.2' +
- 'c0-0.6-0.4-1.1-0.8-1.1H59.2v-5.1c0-0.5-0.8-1-1.7-1h-5.1c-0.9,0' +
- '-1.7,0.4-1.7,1v5.1l-30.2,0c-0.5,0-0.8,0.5-0.8,1.1v3.2c0,0.6,' +
- '0.4,1.1,0.8,1.1h0.1l-10.8,25C9,47.3,8.4,48,8.4,48.8v1.6l0,0h0' +
- 'v6.4c0,1.3,1.4,2.3,3.2,2.3h21.7c1.8,0,3.2-1,3.2-2.3v-8c0-0.9' +
- '-0.7-1.6-1.7-2L22.9,21.9h27.9v59.6l-29,15.9c0,1.2,1.8,2.2,4.1,' +
- '2.2h58.3c2.3,0,4.1-1,4.1-2.2l-29-15.9V21.9h27.8L75.2,46.8c-1,' +
- '0.4-1.7,1.1-1.7,2v8c0,1.3,1.4,2.3,3.2,2.3h21.7c1.8,0,3.2-1,3.2' +
- '-2.3v-8C101.6,48,101,47.3,100.1,46.9z M22,23.7l10.8,22.8H12.1' +
- 'L22,23.7z M97.9,46.5H77.2L88,23.7L97.9,46.5z'],
-
- ['xClose', 'M20,8l35,35,35-35,12,12-35,35,35,35-12,12-35-35-35,35' +
- '-12-12,35-35-35-35,12-12Z'],
-]);
-
-export const badgeDataSet = new Map<string, string>([
- ['_viewbox', '0 0 10 10'],
-
- ['checkMark', 'M8.6,3.4L4.4,7.7L1.4,4.7L2.5,3.6L4.4,5.5L7.5,2.3L8.6,3.4Z'],
-
- ['xMark', 'M7.8,6.7L6.7,7.8,5,6.1,3.3,7.8,2.2,6.7,3.9,5,2.2,3.3,3.3,' +
- '2.2,5,3.9,6.7,2.2,7.8,3.3,6.1,5Z'],
-
- ['triangleUp', 'M0.5,6.2c0,0,3.8-3.8,4.2-4.2C5,1.7,5.3,2,5.3,2l4.3,' +
- '4.3c0,0,0.4,0.4-0.1,0.4c-1.7,0-8.2,0-8.8,0C0,6.6,0.5,6.2,0.5,6.2z'],
-
- ['triangleDown', 'M9.5,4.2c0,0-3.8,3.8-4.2,4.2c-0.3,0.3-0.5,0-0.5,' +
- '0L0.5,4.2c0,0-0.4-0.4,0.1-0.4c1.7,0,8.2,0,8.8,0C10,3.8,9.5,4.2,' +
- '9.5,4.2z'],
-
- ['plus', 'M4,2h2v2h2v2h-2v2h-2v-2h-2v-2h2z'],
-
- ['minus', 'M2,4h6v2h-6z'],
-
- ['play', 'M3,1.5l3.5,3.5l-3.5,3.5z'],
-
- ['stop', 'M2.5,2.5h5v5h-5z'],
-]);
-
-export const spriteData = new Map<string, string>([
- ['_cloud', '0 0 110 110'],
- ['cloud', 'M37.6,79.5c-6.9,8.7-20.4,8.6-22.2-2.7' +
- 'M16.3,41.2c-0.8-13.9,19.4-19.2,23.5-7.8' +
- 'M38.9,30.9c5.1-9.4,15.1-8.5,16.9-1.3' +
- 'M54.4,32.9c4-12.9,14.8-9.6,18.6-3.8' +
- 'M95.8,58.5c10-4.1,11.7-17.8-0.9-19.8' +
- 'M18.1,76.4C5.6,80.3,3.8,66,13.8,61.5' +
- 'M16.2,62.4C2.1,58.4,3.5,36,16.8,36.6' +
- 'M93.6,74.7c10.2-2,10.7-14,5.8-18.3' +
- 'M71.1,79.3c11.2,7.6,24.6,6.4,22.1-11.7' +
- 'M36.4,76.8c3.4,13.3,35.4,11.6,36.1-1.4' +
- 'M70.4,31c11.8-10.4,26.2-5.2,24.7,10.1'],
-]);
-
-
- // --- Mojo Re-Design ---------------------------------------
-const m_octagon = 'M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.7V40.9H40A1.8,1.8,0,0,1,38.1,39' +
- 'V35.7l-13,6.9,13,7.1V46.4a1.8,1.8,0,0,1,3.7,0v6.5' +
- 'a1.8,1.8,0,0,1-.9,1.6ZM40,81.9l-0.9-.2L20.4,71.4' +
- 'a1.8,1.8,0,0,1,0-3.2l18.7-10a1.8,1.8,0,0,1,2.7,1.6v4.5h7' +
- 'a1.8,1.8,0,0,1,1.8,1.8v7.4a1.8,1.8,0,0,1-1.8,1.8H45.2' +
- 'a1.8,1.8,0,0,1,0-3.7h1.7V68H40a1.8,1.8,0,0,1-1.8-1.8V62.9' +
- 'l-13,6.9,13,7.1V73.6a1.8,1.8,0,0,1,3.7,0V80a1.8,1.8,0,0,1-.9,1.6Z';
-
-const m_diamond = 'M50,87a16.1,16.1,0,0,1-11.5-4.7L17.7,61.5a16.3,16.3,0,0,' +
- '1,0-22.9L38.5,17.7a16.3,16.3,0,0,1,22.9,0L82.3,38.5' +
- 'a16.3,16.3,0,0,1,0,22.9L61.5,82.3A16.1,16.1,0,0,1,50,87Z' +
- 'm0-70.3a12.4,12.4,0,0,0-8.9,3.7L20.3,41.1a12.6,12.6,0,0,0,0,' +
- '17.7L41.1,79.7a12.6,12.6,0,0,0,17.7,0L79.7,58.9a12.6,12.6,0,0,' +
- '0,0-17.7L58.9,20.3A12.4,12.4,0,0,0,50,16.7Z';
-
-const m_trafficArrows = 'M41,66.7l-0.9-.2-16.8-9a1.8,1.8,0,0,1,0-3.2' +
- 'L40.1,45a1.8,1.8,0,0,1,2.7,1.6v5.8a1.8,1.8,0,0,1-3.7,0V49.7' +
- 'L28,55.8l11.1,5.9V59.1A1.8,1.8,0,0,1,41,57.2H47v-3H45.7' +
- 'a1.8,1.8,0,0,1,0-3.7h3.2a1.8,1.8,0,0,1,1.8,1.8v6.7' +
- 'a1.8,1.8,0,0,1-1.8,1.8H42.8v3.9a1.8,1.8,0,0,1-.9,1.6ZM59,55.3' +
- 'l-1-.3a1.8,1.8,0,0,1-.9-1.6V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.4,53Z';
-
-export const mojoDataSet = new Map<string, string>([
- ['_viewbox', '0 0 100 100'],
-
- ['m_cloud', 'M62,48.8H61.5a1.8,1.8,0,0,1-1.3-2.3,11,11,0,0,' +
- '0-21.1-6.1,1.8,1.8,0,1,1-3.5-1,14.7,14.7,0,0,1,28.2,8.1' +
- 'A1.8,1.8,0,0,1,62,48.8ZM70.6,71.2H28.3' +
- 'A14.7,14.7,0,1,1,38.4,45.2,1.8,1.8,0,1,1,36,48' +
- 'a11,11,0,1,0-7.5,19.4H71.8A11,11,0,0,0,71,45.5' +
- 'a10.9,10.9,0,0,0-3.2.5,1.8,1.8,0,1,1-1.1-3.5,14.7,14.7,0,0,1,19,14' +
- 'A14.8,14.8,0,0,1,72.2,71.1H70.6Z'],
-
- ['m_map', 'M50,17.6A32.4,32.4,0,1,0,82.4,50,32.4,32.4,0,0,0,50,17.6Z' +
- 'm0,61.1A28.7,28.7,0,1,1,78.7,50,28.7,28.7,0,0,1,50,78.7Z' +
- 'M75.9,48.8a1.8,1.8,0,0,1-1.8,1.8H65' +
- 'a38.3,38.3,0,0,1-8.4,22.9,1.8,1.8,0,0,1-1.4.7,1.8,1.8,0,0,' +
- '1-1.2-.4,1.8,1.8,0,0,1-.3-2.6,34.6,34.6,0,0,0,7.5-20.5H39.2' +
- 'a34.5,34.5,0,0,0,7.6,20.7,1.8,1.8,0,0,1-1.4,3,1.8,1.8,0,0,' +
- '1-1.4-.7,38.2,38.2,0,0,1-8.5-23H26.2a1.8,1.8,0,1,1,0-3.7' +
- 'h9.4a38.1,38.1,0,0,1,8.4-21.6,1.8,1.8,0,0,1,2.9,2.3,34.4,34.4,0,0,' +
- '0-7.6,19.3h22a34.3,34.3,0,0,0-8-19.7,1.8,1.8,0,1,1,2.8-2.4,38,38,' +
- '0,0,1,8.8,22.1h9.1A1.8,1.8,0,0,1,75.9,48.8Z'],
-
- ['m_selectMap', 'M51.36,8.74A32.45,32.45,0,0,0,19,41.15' +
- 'a32.12,32.12,0,0,0,9.22,22.62L17,72.07a1.84,1.84,0,0,0,1,3.32' +
- 'L35.52,76h0l10,14.42a1.84,1.84,0,0,0,1.52.79,2.05,2.05,0,0,' +
- '0,.49-0.06,1.84,1.84,0,0,0,1.35-1.66l2.68-39.19' +
- 'a1.73,1.73,0,0,0-.06-0.6,0.85,0.85,0,0,0-.09-0.24,1.7,1.7,0,0,' +
- '0-.81-0.9l-0.18-.1a1.69,1.69,0,0,0-.94-0.16H49.33l-0.16,0' +
- 'a1,1,0,0,0-.31.12,1.52,1.52,0,0,0-.33.18L42.73,53' +
- 'a34.6,34.6,0,0,1-2.22-11.21H62.68a34.55,34.55,0,0,1-7.55,20.54' +
- 'A1.85,1.85,0,1,0,58,64.63a38.26,38.26,0,0,0,8.37-22.86h9.08' +
- 'a1.85,1.85,0,0,0,0-3.7H66.3a38.06,38.06,0,0,0-8.83-22.14,' +
- '1.85,1.85,0,1,0-2.82,2.38,34.37,34.37,0,0,1,8,19.76h-22' +
- 'a34.38,34.38,0,0,1,7.58-19.3,1.85,1.85,0,1,0-2.87-2.33,' +
- '38.11,38.11,0,0,0-8.41,21.63H27.53a1.85,1.85,0,0,0,0,3.7' +
- 'h9.28a38.43,38.43,0,0,0,2.85,13.48l-8.5,6.31a28.71,28.71,0,1,' +
- '1,23.21,8.16,1.85,1.85,0,0,0,.19,3.68h0.19A32.41,32.41,0,0,' +
- '0,51.36,8.74Zm-4,49.75L45.57,84l-6.85-9.87,2.64-4.92,0.56-1,2.8-5' +
- 'C45.61,61.58,46.49,60,47.31,58.49ZM44,56.63' +
- 'c-0.81,1.5-1.69,3.11-2.56,4.73l-3.3,6.11-0.19.35' +
- 'C37,69.4,36.19,70.93,35.4,72.34l-12-.44Z'],
-
- ['thatsNoMoon', 'M50,83.4A33.2,33.2,0,1,1,83.2,50.2,33.2,33.2,0,0,' +
- '1,50,83.4ZM79.3,50.1A29.3,29.3,0,1,0,50.1,79.4,29.3,29.3,0,0,0,' +
- '79.3,50.1ZM65.4,46.9h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,0,0,0,1.9,1.8H82.3A1.8,1.8,0,0,' +
- '0,84.1,82V39.7A1.8,1.8,0,0,0,82.3,37.9ZM25.4,62.5a1.9,1.9,0,0,' +
- '0-1.9,1.8v7.2c-2.1-.8-3.4-1.9-3.8-3.4-1-3.7,3-9.2,5.6-12.2,2.6,' +
- '3,6.6,8.5,5.6,12.2-0.4,1.5-1.7,2.6-3.8,3.4V64.4A1.8,1.8,0,0,' +
- '0,25.4,62.5ZM71.5,80.2H63.3V70h8.2V80.2Zm8.9,0H75.2V68.1' +
- 'a1.8,1.8,0,0,0-1.8-1.8H61.5a1.8,1.8,0,0,0-1.8,1.8V80.2H52.6' +
- 'V41.6H80.4V80.2Z'],
-
- ['m_home', 'M79.2,52.2a1.7,1.7,0,0,1-2.3,0l-5.8-5.8V77a1.7,1.7,0,0,' +
- '1-1.7,1.7H30.6A1.7,1.7,0,0,1,28.9,77V52.1a1.7,1.7,0,1,1,3.3,0' +
- 'V75.3H67.8V43.8a1.7,1.7,0,0,1,.1-0.7L50.1,25.4l-26.9,27' +
- 'a1.7,1.7,0,0,1-1.2.5A1.7,1.7,0,0,1,20.8,50L48.9,21.8' +
- 'a1.7,1.7,0,0,1,2.4,0l28,28A1.7,1.7,0,0,1,79.2,52.2ZM57.1,61.6' +
- 'H42.9a1.7,1.7,0,0,1-1.7-1.7V45.6A1.7,1.7,0,0,1,42.9,44H57.1' +
- 'a1.7,1.7,0,0,1,1.7,1.7V59.9A1.7,1.7,0,0,1,57.1,61.6ZM44.5,58.2' +
- 'H55.5V47.3H44.5V58.2Z'],
-
- ['m_summary', 'M73.9,79.9H26.1A4.9,4.9,0,0,1,21.2,75V25' +
- 'a4.9,4.9,0,0,1,4.9-4.9H73.9A4.9,4.9,0,0,1,78.8,25V75' +
- 'A4.9,4.9,0,0,1,73.9,79.9Zm-47.8-56A1.2,1.2,0,0,0,24.9,25V75' +
- 'a1.2,1.2,0,0,0,1.2,1.2H73.9A1.2,1.2,0,0,0,75.1,75V25' +
-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1.2,1.2,0,0,1-1.2,1.2H44.5' +
- 'a1.8,1.8,0,0,0,0,3.7H73.9a4.9,4.9,0,0,0,4.9-4.9V22.4' +
- 'A4.9,4.9,0,0,0,73.9,17.5ZM38.5,52.6A12,12,0,0,1,50.2,37.8,12,12,' +
- '0,0,1,61.8,47a10.7,10.7,0,0,1,.3,1.6,12,12,0,0,1-5.9,11.6,12,12,' +
- '0,0,1-12,0L43.9,60A12,12,0,0,1,38.5,52.6Z'],
-
- ['m_oblique', 'M82.1,30.5a1.8,1.8,0,0,0-1.7-1.1H30.2' +
- 'a1.8,1.8,0,0,0-1.4.7L18.2,42.8a1.8,1.8,0,0,0,1.4,3H40.9V62.2' +
- 'a1.8,1.8,0,1,0,3.7,0V45.8H55.4V62.2a1.9,1.9,0,1,0,3.7,0V45.8' +
- 'H69.8a1.9,1.9,0,0,0,1.4-.7L81.8,32.5A1.8,1.8,0,0,0,82.1,30.5Z' +
- 'M69,42.2H23.5l7.5-9H76.5ZM69.8,70.5H19.6a1.8,1.8,0,0,1-1.4-3' +
- 'L28.7,54.8a1.8,1.8,0,0,1,1.4-.7h7a1.8,1.8,0,0,1,0,3.7H31l-7.5,9' +
- 'H69l7.5-9H62.4a1.8,1.8,0,0,1,0-3.7H80.4a1.8,1.8,0,0,1,1.4,3' +
- 'L71.3,69.9A1.8,1.8,0,0,1,69.8,70.5ZM52.3,57.8H47.6' +
- 'a1.8,1.8,0,0,1,0-3.7h4.8A1.8,1.8,0,0,1,52.3,57.8Z'],
-
- ['m_filters', 'M69.9,45.8H19.5a1.9,1.9,0,0,1-1.4-3L28.7,30' +
- 'a1.8,1.8,0,0,1,1.4-.7H80.5a1.8,1.8,0,0,1,1.4,3L71.3,45.1' +
- 'A1.8,1.8,0,0,1,69.9,45.8ZM23.5,42.1H69l7.5-9H31ZM69.9,58.2' +
- 'H19.5a1.8,1.8,0,0,1-1.4-3l6.1-7.3a1.8,1.8,0,0,1,2.8,2.4l-3.6,4.3' +
- 'H69l7.6-9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3v3H70.2A1.8,1.8,0,0,1,72,50.1ZM18.8,57.5' +
- 'a7.4,7.4,0,1,1,7.4-7.4A7.4,7.4,0,0,1,18.8,57.5Zm0-11.2' +
- 'a3.8,3.8,0,1,0,3.8,3.8A3.8,3.8,0,0,0,18.8,46.3ZM81.2,57.5' +
- 'a7.4,7.4,0,1,1,7.4-7.4A7.4,7.4,0,0,1,81.2,57.5Zm0-11.2' +
- 'A3.8,3.8,0,1,0,85,50.1,3.8,3.8,0,0,0,81.2,46.3Z'],
-
- ['m_allTraffic', m_diamond + m_trafficArrows],
-
- ['m_xMark', 'M76.8,73.7a2.2,2.2,0,0,1-3.1,3.1L50,53.1,26.3,76.7' +
- 'a2.2,2.2,0,1,1-3.1-3.1L46.9,50,23.2,26.3a2.2,2.2,0,0,1,3.1-3.1' +
- 'L50,46.9,73.7,23.2a2.2,2.2,0,1,1,3.1,3.1L53.1,50Z'],
-
- ['m_resetZoom', 'M73.9,76.8H64.2a1.8,1.8,0,1,1,0-3.7h9.7' +
- 'a1.2,1.2,0,0,0,1.2-1.2V62.6a1.8,1.8,0,0,1,3.7,0v9.3' +
- 'A4.9,4.9,0,0,1,73.9,76.8ZM77,33.3a1.8,1.8,0,0,1-1.8-1.8V22' +
- 'a1.2,1.2,0,0,0-1.2-1.2H64.2a1.8,1.8,0,1,1,0-3.7h9.7' +
- 'A4.9,4.9,0,0,1,78.8,22v9.5A1.8,1.8,0,0,1,77,33.3ZM23,33.6' +
- 'a1.8,1.8,0,0,1-1.8-1.8V22a4.9,4.9,0,0,1,4.9-4.9h9.8' +
- 'a1.8,1.8,0,0,1,0,3.7H26.1A1.2,1.2,0,0,0,24.9,22v9.7' +
- 'A1.8,1.8,0,0,1,23,33.6ZM65.3,42.3A15.7,15.7,0,1,0,42.6,59.8' +
- 'L34.4,73.1H26.1a1.2,1.2,0,0,1-1.2-1.2V62.1a1.9,1.9,0,0,0-3.7,0' +
- 'v9.8a4.9,4.9,0,0,0,4.9,4.9h6.1l-2,3.3' +
- 'a1.8,1.8,0,0,0,.6,2.5,1.8,1.8,0,0,0,1,.3,1.8,1.8,0,0,0,1.6-.9' +
- 'L46,61.2a15.7,15.7,0,0,0,7.7.1A15.7,15.7,0,0,0,65.3,42.3Z' +
- 'm-5,9.9A12,12,0,1,1,50.1,34a12,12,0,0,1,11.7,9.2' +
- 'A11.9,11.9,0,0,1,60.3,52.3Z'],
-
- ['m_eqMaster', 'M63,79.9H37.4a1.8,1.8,0,0,1-1.2-3.2L48.8,65.1' +
- 'a1.8,1.8,0,0,1,2.5,0L64.2,76.7A1.8,1.8,0,0,1,63,79.9Z' +
- 'M42.1,76.2H58.2l-8.1-7.3ZM19.7,65.8a1.8,1.8,0,0,1-.3-3.7' +
- 'l61-11.3a1.8,1.8,0,1,1,.7,3.6L20,65.8H19.7ZM34.2,53.5' +
- 'A16.7,16.7,0,1,1,50.9,36.8,16.7,16.7,0,0,1,34.2,53.5Zm0-29.7' +
- 'a13,13,0,1,0,13,13A13,13,0,0,0,34.2,23.8ZM70.7,45.7' +
- 'a8.6,8.6,0,1,1,8.6-8.6A8.6,8.6,0,0,1,70.7,45.7Zm0-13.6' +
- 'a4.9,4.9,0,1,0,4.9,4.9A4.9,4.9,0,0,0,70.7,32.2Z'],
-
- ['m_unknown', 'M63.2,20.6H36.8A16.2,16.2,0,0,0,20.6,36.8V63.2' +
- 'A16.2,16.2,0,0,0,36.8,79.4H63.2A16.2,16.2,0,0,0,79.4,63.2V36.8' +
- 'A16.2,16.2,0,0,0,63.2,20.6ZM75.7,63.2A12.5,12.5,0,0,1,63.2,75.7' +
- 'H36.8A12.5,12.5,0,0,1,24.3,63.2V36.8A12.5,12.5,0,0,1,36.8,24.3' +
- 'H63.2A12.5,12.5,0,0,1,75.7,36.8V63.2ZM67.3,64.7' +
- 'a1.8,1.8,0,0,1-2.6,2.6L50,52.6,35.3,67.3a1.8,1.8,0,0,1-2.6-2.6' +
- 'L47.4,50,32.7,35.3a1.8,1.8,0,0,1,2.6-2.6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,0,0,0,2.1,1' +
- 'A2.8,2.8,0,1,0,63.5,38.9ZM46,66.4a24.8,24.8,0,0,1,0-49.4V66.4Z' +
- 'M41.7,64H41.2a24.3,24.3,0,0,1-12.9-9.7L28,53.9' +
- 'a1.8,1.8,0,0,1,3.1-2l0.2,0.3a20.3,20.3,0,0,0,10.9,8.2' +
- 'A1.8,1.8,0,0,1,41.7,64Z' +
- 'M66.4,53.1a1.8,1.8,0,0,1-.5-3.6A8.1,8.1,0,0,0,66,34' +
- 'a1.8,1.8,0,0,1,1.1-3.5A11.8,11.8,0,0,1,67,53H66.4Z' +
- 'M66.5,58.2a1.8,1.8,0,0,1-.4-3.6,13.1,13.1,0,0,0,0-25.7,' +
- '1.8,1.8,0,1,1,.7-3.6,16.8,16.8,0,0,1,0,32.9H66.5Z'],
-
- ['m_relatedIntents', 'M34.5,73.1A7.5,7.5,0,1,1,42,65.6,7.5,7.5,' +
- '0,0,1,34.5,73.1Zm0-11.3a3.8,3.8,0,1,0,3.8,3.8' +
- 'A3.8,3.8,0,0,0,34.5,61.8Z' +
- 'M56.7,34.3a1.8,1.8,0,0,1-1.8,1.9H42.6v3.1a3.1,3.1,0,0,1-3,3' +
- 'H36.4V54.5a1.9,1.9,0,0,1-3.7,0V42.3h-3a3.1,3.1,0,0,1-3-3' +
- 'V29.5a3,3,0,0,1,3-3h9.8a3,3,0,0,1,3,3v3H54.8' +
- 'A1.8,1.8,0,0,1,56.7,34.3Z' +
- 'M66,41.8a7.5,7.5,0,1,1,7.5-7.5A7.5,7.5,0,0,1,66,41.8Z' +
- 'm0-11.3a3.8,3.8,0,1,0,3.8,3.8A3.8,3.8,0,0,0,66,30.5Z'],
-
- ['m_intentTraffic', 'M28.9,77.6H28.5a1.8,1.8,0,0,1-1.4-2.2L39,23.3' +
- 'a1.8,1.8,0,0,1,3.6.8l-12,52.1A1.8,1.8,0,0,1,28.9,77.6Z' +
- 'M71.1,77.6a1.8,1.8,0,0,1-1.8-1.4l-12-52.1a1.8,1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0a19.5,19.5,0,0,1-2,9.9l-1,1.8' +
- 'L35.8,75.9A3.6,3.6,0,0,1,32.7,77.7Zm0-51.7' +
- 'A15.8,15.8,0,0,0,18.5,48.8l0.8,1.4L32.7,73.9,46,50.3l0.8-1.4' +
- 'a15.9,15.9,0,0,0,1.6-8.1h0A15.8,15.8,0,0,0,33.6,26h-1Z' +
- 'm0,21.1A8.2,8.2,0,1,1,40.8,39,8.2,8.2,0,0,1,32.7,47.1Z' +
- 'm0-12.6A4.5,4.5,0,1,0,37.1,39,4.5,4.5,0,0,0,32.7,34.5Z'],
-
- ['m_destination', 'M30.3,63.8l-0.9-.3a1.8,1.8,0,0,1-.9-1.6V57.1' +
- 'a1.8,1.8,0,0,1,3.7,0v1.7l8.2-4.5-8.2-4.4v1.7a1.8,1.8,0,0,1-1.8,1.8' +
- 'H17.5a1.8,1.8,0,1,1,0-3.7H28.4V46.8a1.8,1.8,0,0,1,2.7-1.6l14,7.5' +
- 'a1.8,1.8,0,0,1,0,3.2l-14,7.7Z' +
- 'M64.9,77.7a3.6,3.6,0,0,1-3.1-1.8L48.3,52.1l-0.9-1.6' +
- 'a19.3,19.3,0,0,1-2-8.6,19.6,19.6,0,0,1,6.1-14.2' +
- 'A19.5,19.5,0,0,1,84.3,40.5a19.5,19.5,0,0,1-1.9,9.8v0.2l-0.9,1.7' +
- 'L68,75.9A3.6,3.6,0,0,1,64.9,77.7ZM50.7,48.8l0.8,1.4' +
- 'L64.9,73.9,78.2,50.3,79,48.8h0a15.8,15.8,0,0,0,1.6-8' +
- 'a15.8,15.8,0,1,0-29.9,8h0Zm14.1-1.7' +
- 'A8.2,8.2,0,1,1,73,39,8.2,8.2,0,0,1,64.9,47.1Z' +
- 'm0-12.6A4.5,4.5,0,1,0,69.3,39,4.5,4.5,0,0,0,64.9,34.5Z'],
-
- ['m_topo', 'M31.3,73H21.5a3.1,3.1,0,0,1-3-3V60.1a3.1,3.1,0,0,1,3-3' +
- 'h9.8a3.2,3.2,0,0,1,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m_disjointPaths', 'M67.7,59.8h9.4a2.9,2.9,0,0,1,3,3v9.4' +
- 'a3.1,3.1,0,0,1-3,3H67.7a3.1,3.1,0,0,1-3-3V62.9' +
- 'A3.1,3.1,0,0,1,67.7,59.8Z' +
- 'M22.9,59.8h9.4a2.9,2.9,0,0,1,3,3v9.4a3.1,3.1,0,0,1-3,3H22.9' +
- 'a3.1,3.1,0,0,1-3-3V62.9A3.1,3.1,0,0,1,22.9,59.8Z' +
- 'M45.3,24.7h9.4a2.9,2.9,0,0,1,3,3v9.4a3.1,3.1,0,0,1-3,3H45.3' +
- 'a3.1,3.1,0,0,1-3-3V27.7A3.1,3.1,0,0,1,45.3,24.7Z' +
- 'M65.9,58.5a1.8,1.8,0,0,1-1.5-.8L55.3,44.3a1.8,1.8,0,0,1,3.1-2.1' +
- 'l9.1,13.4A1.8,1.8,0,0,1,65.9,58.5Z' +
- 'M61.1,68.8H39.1a1.8,1.8,0,1,1,0-3.7H61.1A1.8,1.8,0,0,1,61.1,68.8Z' +
- 'M35.5,59.9l-1-.3a1.8,1.8,0,0,1-.6-2.5l8.8-14.3' +
- 'a1.8,1.8,0,0,1,3.1,1.9L37.1,59A1.8,1.8,0,0,1,35.5,59.9Z'],
-
- ['m_region', 'M49.8,70.9a3.4,3.4,0,0,1-3-1.8L34.3,47l-0.8-1.5' +
- 'a18.2,18.2,0,0,1-1.9-8.2,18.4,18.4,0,0,1,5.8-13.3' +
- 'A18.3,18.3,0,0,1,68.1,36.1h0a18.4,18.4,0,0,1-1.9,9.3' +
- 'L65.3,47,52.8,69.2A3.4,3.4,0,0,1,49.8,70.9Zm0-48.3' +
- 'A14.6,14.6,0,0,0,36.7,43.8l0.7,1.3L49.8,67,62.2,45.2l0.8-1.3' +
- 'a14.7,14.7,0,0,0,1.5-7.5h0A14.8,14.8,0,0,0,50.7,22.7H49.8Z' +
- 'm0,19.7a7.7,7.7,0,1,1,7.7-7.7A7.7,7.7,0,0,1,49.8,42.4Zm0-11.8' +
- 'a4.1,4.1,0,1,0,4.1,4.1A4.1,4.1,0,0,0,49.8,30.6Z' +
- 'M81.7,80.8H17.9a1.8,1.8,0,0,1-1.6-2.7l9.2-16.8' +
- 'a1.8,1.8,0,0,1,1.6-1h9.5a1.8,1.8,0,1,1,0,3.7H28.2L21,77.1H78.6' +
- 'L71.4,64H61.9a1.8,1.8,0,1,1,0-3.7H72.5a1.8,1.8,0,0,1,1.6,1' +
- 'l9.2,16.8A1.8,1.8,0,0,1,81.7,80.8Z'],
-]);
-
-export const extraGlyphs = new Map<string, string>([
- ['_yang', '0 0 400 400'],
- ['yang', 'M323.3,199.2a33.2,33.2,0,1,1-66.4,0' +
- 'c0-18.4,14.9-34.1,33.2-33.3S323.3,180.8,323.3,199.2Z' +
- 'M286.5,289.9c-78.2-.3-86.6-72.2-86.9-89.1s-14.6-91.8-88.3-88.3' +
- 'c-7.5.3-34.6,1.2-56.9,20.1-25.8,21.8-29,53.9-30.5,68.2-0.2,' +
- '2.2-.4,4.4-0.5,6.5h0a175.5,175.5,0,0,0,171,172.9H199' +
- 'a175.5,175.5,0,0,0,58.6-10l3.9-1.4,3.9-1.5,3.9-1.7h0' +
- 'l3.9-1.7,2.8-1.3,2.7-1.4a175.6,175.6,0,0,0,95.9-155.1' +
- 'C372.4,226.7,358,290.1,286.5,289.9ZM110.1,237.7' +
- 'A33.6,33.6,0,1,1,143.7,204,33.6,33.6,0,0,1,110.1,237.7Z'],
-]);
-
-
-/**
- * ONOS GUI -- SVG -- Glyph Data Service
- */
-@Injectable()
-export class GlyphDataService {
-
- constructor(
- private log: LogService
- ) {
- this.log.debug('GlyphDataService constructed');
- }
-
-}
diff --git a/web/gui2/src/main/webapp/app/fw/svg/icon.service.ts b/web/gui2/src/main/webapp/app/fw/svg/icon.service.ts
deleted file mode 100644
index 0f9da65..0000000
--- a/web/gui2/src/main/webapp/app/fw/svg/icon.service.ts
+++ /dev/null
@@ -1,243 +0,0 @@
-/*
- * Copyright 2015-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 { Injectable } from '@angular/core';
-import { GlyphService } from './glyph.service';
-import { LogService } from '../../log.service';
-import { SvgUtilService } from './svgutil.service';
-import * as d3 from 'd3';
-
-const vboxSize = 50;
-const cornerSize = vboxSize / 10;
-const viewBox = '0 0 ' + vboxSize + ' ' + vboxSize;
-
-export const glyphMapping = new Map<string, string>([
- // Maps icon ID to the glyph ID it uses.
- // NOTE: icon ID maps to a CSS class for styling that icon
- ['active', 'checkMark'],
- ['inactive', 'xMark'],
-
- ['plus', 'plus'],
- ['minus', 'minus'],
- ['play', 'play'],
- ['stop', 'stop'],
-
- ['upload', 'upload'],
- ['download', 'download'],
- ['delta', 'delta'],
- ['nonzero', 'nonzero'],
- ['close', 'xClose'],
-
- ['m_ports', 'm_ports'],
-
- ['topo', 'topo'],
-
- ['refresh', 'refresh'],
- ['query', 'query'],
- ['garbage', 'garbage'],
-
-
- ['upArrow', 'triangleUp'],
- ['downArrow', 'triangleDown'],
-
- ['appInactive', 'unknown'],
-
- ['node', 'node'],
- ['devIcon_SWITCH', 'switch'],
- ['devIcon_ROADM', 'roadm'],
- ['devIcon_OTN', 'otn'],
-
- ['portIcon_DEFAULT', 'm_ports'],
-
- ['meter', 'meterTable'], // TODO: m_meter icon?
-
- ['deviceTable', 'switch'],
- ['flowTable', 'flowTable'],
- ['portTable', 'portTable'],
- ['groupTable', 'groupTable'],
- ['meterTable', 'meterTable'],
- ['pipeconfTable', 'pipeconfTable'],
-
- ['hostIcon_endstation', 'endstation'],
- ['hostIcon_router', 'router'],
- ['hostIcon_bgpSpeaker', 'bgpSpeaker'],
-
- // navigation menu icons...
- ['nav_apps', 'bird'],
- ['nav_settings', 'cog'],
- ['nav_cluster', 'node'],
- ['nav_processors', 'allTraffic'],
- ['nav_partitions', 'unknown'],
-
- ['nav_topo', 'topo'],
- ['nav_topo2', 'm_cloud'],
- ['nav_devs', 'switch'],
- ['nav_links', 'ports'],
- ['nav_hosts', 'endstation'],
- ['nav_intents', 'relatedIntents'],
- ['nav_tunnels', 'ports'], // TODO: use tunnel glyph, when available
- ['nav_yang', 'yang'],
-]);
-
-/**
- * ONOS GUI -- SVG -- Icon Service
- */
-@Injectable()
-export class IconService {
-
- constructor(
- private gs: GlyphService,
- private log: LogService,
- private sus: SvgUtilService
- ) {
-
- this.log.debug('IconService constructed');
- }
-
- ensureIconLibDefs() {
- const body = d3.select('body');
- let svg = body.select('svg#IconLibDefs');
- if (svg.empty()) {
- svg = body.append('svg').attr('id', 'IconLibDefs');
- svg.append('defs');
- }
- return svg.select('defs');
- }
-
- /**
- * Load an icon
- *
- * @param div A D3 selection of the '<div>' element into which icon should load
- * @param glyphId Identifies the glyph to use
- * @param size The dimension of icon in pixels. Defaults to 20.
- * @param installGlyph If truthy, will cause the glyph to be added to
- * well-known defs element. Defaults to false.
- * @param svgClass The CSS class used to identify the SVG layer.
- * Defaults to 'embeddedIcon'.
- */
- loadIcon(div, glyphId: string = 'unknown', size: number = 20, installGlyph: boolean = true, svgClass: string = 'embeddedIcon') {
- const dim = size || 20;
- const svgCls = svgClass || 'embeddedIcon';
- const gid = glyphId || 'unknown';
- let g;
- let svgIcon: any;
-
- if (installGlyph) {
- this.gs.loadDefs(this.ensureIconLibDefs(), [gid], true);
- }
- this.log.warn('loadEmbeddedIcon. install done');
-
- svgIcon = div
- .append('svg')
- .attr('class', svgCls)
- .attr('width', dim)
- .attr('height', dim)
- .attr('viewBox', viewBox);
-
- g = svgIcon.append('g')
- .attr('class', 'icon');
-
- g.append('rect')
- .attr('width', vboxSize)
- .attr('height', vboxSize)
- .attr('rx', cornerSize);
-
- g.append('use')
- .attr('width', vboxSize)
- .attr('height', vboxSize)
- .attr('class', 'glyph')
- .attr('xlink:href', '#' + gid);
- }
-
- /**
- * Load an icon by class.
- * @param div A D3 selection of the <DIV> element into which icon should load
- * @param iconCls The CSS class used to identify the icon
- * @param {number} size The dimension of icon in pixels. Defaults to 20.
- * @param {boolean} installGlyph If truthy, will cause the glyph to be added to
- * well-known defs element. Defaults to false.
- * @param svgClass The CSS class used to identify the SVG layer.
- * Defaults to 'embeddedIcon'.
- */
- loadIconByClass(div, iconCls: string, size: number, installGlyph: boolean, svgClass= 'embeddedIcon') {
- this.loadIcon(div, glyphMapping.get(iconCls), size, installGlyph, svgClass);
- div.select('svg g').classed(iconCls, true);
- }
-
- /**
- * Load an embedded icon.
- */
- loadEmbeddedIcon(div, iconCls: string, size: number) {
- this.loadIconByClass(div, iconCls, size, true);
- }
-
- /**
- * Load an icon only to the svg defs collection
- *
- * Note: This is added for use with IconComponent, where the icon's
- * svg element is defined in the component template (and not built
- * inline using d3 manipulation
- *
- * @param iconCls The icon class as a string
- */
- loadIconDef(iconCls: string): void {
- this.gs.loadDefs(this.ensureIconLibDefs(), [glyphMapping.get(iconCls)], true);
- this.log.debug('icon definition', iconCls, 'added to defs');
- }
-
-
- /**
- * Add a device icon
- *
- * Adds a device glyph to the specified element.
- * Returns the D3 selection of the glyph (use) element.
- */
- addDeviceIcon(elem, glyphId, iconDim) {
- const gid = this.gs.glyphDefined(glyphId) ? glyphId : 'query';
- return elem.append('use').attr({
- 'xlink:href': '#' + gid,
- width: iconDim,
- height: iconDim,
- });
- }
-
- addHostIcon(elem, radius, glyphId) {
- const dim = radius * 1.5;
- const xlate = -dim / 2;
- const g = elem.append('g')
- .attr('class', 'svgIcon hostIcon');
-
- g.append('circle').attr('r', radius);
-
- g.append('use').attr({
- 'xlink:href': '#' + glyphId,
- width: dim,
- height: dim,
- transform: this.sus.translate([xlate], xlate),
- });
- return g;
- }
-
- registerIconMapping(iconId, glyphId) {
- if (glyphMapping[iconId]) {
- this.log.warn('Icon with id', iconId, 'already mapped. Ignoring.');
- } else {
- // map icon-->glyph
- glyphMapping[iconId] = glyphId;
- // make sure definition is installed
- this.gs.loadDefs(this.ensureIconLibDefs(), [glyphId], true);
- }
- }
-}
diff --git a/web/gui2/src/main/webapp/app/fw/svg/icon/glyph-theme.css b/web/gui2/src/main/webapp/app/fw/svg/icon/glyph-theme.css
deleted file mode 100644
index c657ae6..0000000
--- a/web/gui2/src/main/webapp/app/fw/svg/icon/glyph-theme.css
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2016-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.
- */
-
-/*
- ONOS GUI -- Glyph Service (theme) -- CSS file
- */
-
-.light svg .glyph,
-.dark svg .glyph.overlay {
- fill: blue;
-}
-
-/*
-* NOTE: Keeping the theme black while we
-* wait for the mockup theme designs to be made
-*/
-.dark svg .glyph,
-.light svg .glyph.overlay {
- fill: blue;
-}
diff --git a/web/gui2/src/main/webapp/app/fw/svg/icon/glyph.css b/web/gui2/src/main/webapp/app/fw/svg/icon/glyph.css
deleted file mode 100644
index 9a65ddc..0000000
--- a/web/gui2/src/main/webapp/app/fw/svg/icon/glyph.css
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright 2015-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.
- */
-
-/*
- ONOS GUI -- Glyph Service (layout) -- CSS file
- */
-
-svg .glyph {
- stroke: none;
- fill-rule: evenodd;
-}
diff --git a/web/gui2/src/main/webapp/app/fw/svg/icon/icon.component.css b/web/gui2/src/main/webapp/app/fw/svg/icon/icon.component.css
deleted file mode 100644
index d2d6f56..0000000
--- a/web/gui2/src/main/webapp/app/fw/svg/icon/icon.component.css
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright 2015-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.
- */
-
-/*
- ONOS GUI -- Icon Service (layout) -- CSS file
- */
-
-svg#IconLibDefs {
- display: none;
-}
-
-svg .svgIcon {
- fill-rule: evenodd;
-}
-
-svg.embeddedIcon g.icon {
- fill: none;
-}
-
-.ctrl-btns div svg.embeddedIcon g.icon use {
- fill: #e0dfd6;
-}
-
-.ctrl-btns div.active svg.embeddedIcon g.icon use {
- fill: #939598;
-}
-.ctrl-btns div.active:hover svg.embeddedIcon g.icon use {
- fill: #ce5b58;
-}
-
-.ctrl-btns div.current-view svg.embeddedIcon g.icon rect {
- fill: #518ecc;
-}
-.ctrl-btns div.current-view svg.embeddedIcon g.icon use {
- fill: white;
-}
-
-svg.embeddedIcon .icon.active .glyph {
- fill: #04bf34;
-}
-
-svg.embeddedIcon .icon.inactive .glyph {
- fill: #c0242b;
-}
-
-svg.embeddedIcon .icon.active-rect .glyph {
- fill:#939598;
-}
-
-svg.embeddedIcon .icon.active-sort .glyph {
- fill:#333333;
-}
-
-svg.embeddedIcon g.icon.active-rect:hover use {
- fill: #ce5b58;
-}
-
-svg.embeddedIcon g.icon.active-type .glyph {
- fill: #3c3a3a;
-}
-
-svg.embeddedIcon g.icon.active-close:hover use {
- fill: #ce5b58;
-}
-
-svg.embeddedIcon g.icon.active-close .glyph {
- fill: #333333;
-}
-
-svg.embeddedIcon g.icon.details-icon .glyph {
- fill: #0071bd;;
-}
-
-
diff --git a/web/gui2/src/main/webapp/app/fw/svg/icon/icon.component.html b/web/gui2/src/main/webapp/app/fw/svg/icon/icon.component.html
deleted file mode 100644
index 2243dc2..0000000
--- a/web/gui2/src/main/webapp/app/fw/svg/icon/icon.component.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!--
-~ Copyright 2014-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.
--->
-<div class="tooltip">
-<svg class="embeddedIcon" [attr.width]="iconSize" [attr.height]="iconSize" viewBox="0 0 50 50" (mouseover)="toolTipDisp = toolTip" (mouseout)="toolTipDisp = undefined">
- <g class="icon" [ngClass]="classes">
- <rect width="50" height="50" rx="5"></rect>
- <use width="50" height="50" class="glyph" [attr.href]="iconTag()"></use>
- </g>
-</svg>
-<!-- I'm fixing class as light as view encapsulation changes how the hirerarchy of css is handled -->
-
-<!-- <p id="tooltip" class="light" *ngIf="toolTip" [ngStyle]="{ 'display': toolTipDisp ? 'inline-block':'none'}">{{ toolTipDisp }}</p> -->
-
- <span class="tooltiptext" [ngStyle]="{ 'display': toolTipDisp ? 'inline-block':'none'}">{{toolTipDisp}}</span>
-</div>
\ No newline at end of file
diff --git a/web/gui2/src/main/webapp/app/fw/svg/icon/icon.component.ts b/web/gui2/src/main/webapp/app/fw/svg/icon/icon.component.ts
deleted file mode 100644
index eabf0fd..0000000
--- a/web/gui2/src/main/webapp/app/fw/svg/icon/icon.component.ts
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright 2015-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 { Component, OnInit, OnChanges, Input } from '@angular/core';
-import { IconService, glyphMapping } from '../icon.service';
-import { LogService } from '../../../log.service';
-
-/**
- * Icon Component
- *
- * Note: This is an alternative to the Icon Directive from ONOS 1.0.0
- * It has been implemented as a Component because it was inadvertently adding
- * in a template through d3 DOM manipulations - it's better to make it a Comp
- * and build a template the Angular 6 way
- *
- * Remember: The CSS files applied here only apply to this component
- */
-@Component({
- selector: 'onos-icon',
- templateUrl: './icon.component.html',
- styleUrls: [
- './icon.component.css', './icon.theme.css',
- './glyph.css', './glyph-theme.css',
- './tooltip.css', './tooltip-theme.css'
- ]
-})
-export class IconComponent implements OnInit, OnChanges {
- @Input() iconId: string;
- @Input() iconSize: number = 20;
- @Input() toolTip: string = undefined;
- @Input() classes: string = undefined;
-
- // The displayed tooltip - undefined until mouse hovers over, then equals toolTip
- toolTipDisp: string = undefined;
-
- constructor(
- private is: IconService,
- private log: LogService
- ) {
- // Note: iconId is not available until initialization
- this.log.debug('IconComponent constructed');
- }
-
- /**
- * Icons are loaded in to the DOM under iconDefs
- * TODO: Change this to use more standard Angular 6 mechanism
- */
- ngOnInit() {
- this.is.loadIconDef(this.iconId);
- }
-
- /**
- * This is needed in case the iconId changes while icon component
- * is displayed on screen.
- */
- ngOnChanges() {
- this.is.loadIconDef(this.iconId);
- }
-
- /**
- * Get the corresponding iconTag from the glyphMapping in the iconService
- * @returns The iconTag corresponding to the iconId of this instance
- */
- iconTag(): string {
- return '#' + glyphMapping.get(this.iconId);
- }
-}
diff --git a/web/gui2/src/main/webapp/app/fw/svg/icon/icon.theme.css b/web/gui2/src/main/webapp/app/fw/svg/icon/icon.theme.css
deleted file mode 100644
index ca6e32e..0000000
--- a/web/gui2/src/main/webapp/app/fw/svg/icon/icon.theme.css
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright 2016-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.
- */
-
-/*
- ONOS GUI -- Icon Service (theme) -- CSS file
- */
-
-div.close-btn svg.embeddedIcon g.icon .glyph {
- fill: #333333;
-}
-
-/* Sortable table headers */
-div.tableColSort svg.embeddedIcon .icon .glyph {
- fill: #353333;
-}
-
-/* --- Control Buttons --- */
-
-/* INACTIVE */
-svg.embeddedIcon g.icon use {
- fill: #e0dfd6;
-}
-/* note: no change for inactive buttons when hovered */
-
-
-/* ACTIVE */
-.ctrl-btns div.active svg.embeddedIcon g.icon use {
- fill: #939598;
-}
-
-svg.embeddedIcon g.icon.active:hover use {
- fill: #ce5b58;
-}
-
-/* CURRENT-VIEW */
-svg.embeddedIcon g.icon.current-view rect {
- fill: #518ecc;
-}
-svg.embeddedIcon g.icon.current-view use {
- fill: white;
-}
-
-/* REFRESH */
-svg.embeddedIcon g.icon.refresh use {
- fill: #cdeff2;
-}
-svg.embeddedIcon g.icon.refresh:hover use {
- fill: #ce5b58;
-}
-svg.embeddedIcon g.icon.refresh.active use {
- fill: #009fdb;
-}
-svg.embeddedIcon g.icon.refresh.active:hover use {
- fill: #ce5b58;
-}
-
-
-/* ========== DARK Theme ========== */
-
- div.close-btn svg.embeddedIcon g.icon .glyph {
- fill: #8d8d8d;
-}
-
- div.tableColSort svg.embeddedIcon .icon .glyph {
- fill: #888888;
-}
-
- /*svg.embeddedIcon .icon.active .glyph {
- fill: #04bf34;
-}
- svg.embeddedIcon .icon.inactive .glyph {
- fill: #c0242b;
-}*/
-
- table svg.embeddedIcon .icon .glyph {
- fill: #9999aa;
-}
-
-/*
-svg.embeddedIcon g.icon .glyph {
- fill: #007dc4;
-}
-
-svg.embeddedIcon:hover g.icon .glyph {
- fill: #20b2ff;
-}
-*/
-
-svg.embeddedIcon g.icon.devIcon_SWITCH .glyph {
- fill: #0071bd;;
-}
-
-svg.embeddedIcon g.icon.hostIcon_endstation .glyph {
- fill: #0071bd;;
-}
\ No newline at end of file
diff --git a/web/gui2/src/main/webapp/app/fw/svg/icon/tooltip-theme.css b/web/gui2/src/main/webapp/app/fw/svg/icon/tooltip-theme.css
deleted file mode 100644
index a703d1b..0000000
--- a/web/gui2/src/main/webapp/app/fw/svg/icon/tooltip-theme.css
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2016-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.
- */
-
-/*
- ONOS GUI -- Tooltip Service (theme) -- CSS file
- */
-.light#tooltip {
- background-color: #dbeffc;
- color: #3c3a3a;
- border-color: #c7c7c0;
-}
-
-.dark#tooltip {
- background-color: #3a3a60;
- border-color: #6c6a6a;
- color: #c7c7c0;
-}
diff --git a/web/gui2/src/main/webapp/app/fw/svg/icon/tooltip.css b/web/gui2/src/main/webapp/app/fw/svg/icon/tooltip.css
deleted file mode 100644
index 890f1f8..0000000
--- a/web/gui2/src/main/webapp/app/fw/svg/icon/tooltip.css
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright 2015-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.
- */
-
-/*
- ONOS GUI -- Tooltip Service (layout) -- CSS file
- */
-
-#tooltip {
- text-align: center;
- font-size: 80%;
- border: 1px solid;
- padding: 5px;
- position: absolute;
- z-index: 5000;
- display: inline-block;
- pointer-events: none;
- top: 40px;
- right: auto;
- /* width: 240px; */
-}
-
-.tooltip {
- position: relative;
- display: inline-block;
-}
-
-.tooltip .tooltiptext {
- display: inline-block;
- visibility: hidden;
- background-color: #dbeffc;
- color: #3c3a3a;
- border-color: #c7c7c0;
- text-align: center;
- border-radius: 6px;
- font-size: 80%;
- padding: 5px;
-
- /* Position the tooltip */
- position: absolute;
- z-index: 5000;
- top: 42px;
- right: 10%;
- white-space: nowrap;
-}
-
-.tooltip:hover .tooltiptext {
- visibility: visible;
-}
diff --git a/web/gui2/src/main/webapp/app/fw/svg/map.service.ts b/web/gui2/src/main/webapp/app/fw/svg/map.service.ts
deleted file mode 100644
index 391f333..0000000
--- a/web/gui2/src/main/webapp/app/fw/svg/map.service.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2015-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 { Injectable } from '@angular/core';
-import { GlyphDataService } from './glyphdata.service';
-import { LogService } from '../../log.service';
-
-/**
- * ONOS GUI -- SVG -- Map Service
- *
- * The Map Service provides a simple API for loading geographical maps into
- * an SVG layer. For example, as a background to the Topology View.
- *
- * e.g. var promise = MapService.loadMapInto(svgLayer, '*continental-us');
- *
- * The Map Service makes use of the GeoDataService to load the required data
- * from the server and to create the appropriate geographical projection.
- *
- * A promise is returned to the caller, which is resolved with the
- * map projection once created.
- */
-@Injectable()
-export class MapService {
-
- constructor(
- private gds: GlyphDataService,
-// private q: ??QService??,
- private log: LogService
- ) {
- this.log.debug('MapService constructed');
- }
-
-}
diff --git a/web/gui2/src/main/webapp/app/fw/svg/sprite.service.ts b/web/gui2/src/main/webapp/app/fw/svg/sprite.service.ts
deleted file mode 100644
index 8304fc6..0000000
--- a/web/gui2/src/main/webapp/app/fw/svg/sprite.service.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2017-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 { Injectable } from '@angular/core';
-import { LogService } from '../../log.service';
-
-/**
- * ONOS GUI -- SVG -- Sprite Service
- *
- * For defining sprites and layouts (of sprites).
- */
-@Injectable()
-export class SpriteService {
-
- constructor(
- private log: LogService
- ) {
- this.log.debug('SpriteService constructed');
- }
-
-}
diff --git a/web/gui2/src/main/webapp/app/fw/svg/spritedata.service.ts b/web/gui2/src/main/webapp/app/fw/svg/spritedata.service.ts
deleted file mode 100644
index ced1d8b..0000000
--- a/web/gui2/src/main/webapp/app/fw/svg/spritedata.service.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2017-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 { Injectable } from '@angular/core';
-import { LogService } from '../../log.service';
-
-/*
- * ONOS GUI -- SVG -- Sprite Data Service
- *
- * Bundled sprite and layout definitions.
- */
-@Injectable()
-export class SpriteDataService {
-
- constructor(
- private log: LogService
- ) {
- this.log.debug('SpriteDataService constructed');
- }
-
-}
diff --git a/web/gui2/src/main/webapp/app/fw/svg/svg.module.ts b/web/gui2/src/main/webapp/app/fw/svg/svg.module.ts
deleted file mode 100644
index bf2d1d9..0000000
--- a/web/gui2/src/main/webapp/app/fw/svg/svg.module.ts
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright 2015-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 { NgModule } from '@angular/core';
-import { CommonModule } from '@angular/common';
-
-import { GeoDataService } from './geodata.service';
-import { GlyphService } from './glyph.service';
-import { GlyphDataService } from './glyphdata.service';
-import { IconService } from './icon.service';
-import { MapService } from './map.service';
-import { SpriteService } from './sprite.service';
-import { SpriteDataService } from './spritedata.service';
-import { SvgUtilService } from './svgutil.service';
-import { IconComponent } from './icon/icon.component';
-
-/**
- * ONOS GUI -- Scalable Vector Graphics Module
- */
-@NgModule({
- exports: [
- IconComponent
- ],
- imports: [
- CommonModule
- ],
- declarations: [
- IconComponent
- ],
- providers: [
- GeoDataService,
- GlyphService,
- GlyphDataService,
- IconService,
- MapService,
- SpriteService,
- SpriteDataService,
- SvgUtilService
- ]
-})
-export class SvgModule { }
diff --git a/web/gui2/src/main/webapp/app/fw/svg/svgutil.service.ts b/web/gui2/src/main/webapp/app/fw/svg/svgutil.service.ts
deleted file mode 100644
index 23759ab..0000000
--- a/web/gui2/src/main/webapp/app/fw/svg/svgutil.service.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2015-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 { Injectable } from '@angular/core';
-import { FnService } from '../util/fn.service';
-import { LogService } from '../../log.service';
-
-/**
- * ONOS GUI -- SVG -- Util Service
- *
- * The SVG Util Service provides a miscellany of utility functions.
- */
-@Injectable({
- providedIn: 'root',
-})
-export class SvgUtilService {
-
- constructor(
- private fs: FnService,
- private log: LogService
- ) {
- this.log.debug('SvgUtilService constructed');
- }
-
- translate(x: number[], y?: any): string {
- if (this.fs.isA(x) && x.length === 2 && !y) {
- return 'translate(' + x[0] + ',' + x[1] + ')';
- }
- return 'translate(' + x + ',' + y + ')';
- }
-}
diff --git a/web/gui2/src/main/webapp/app/fw/svg/zoom.service.ts b/web/gui2/src/main/webapp/app/fw/svg/zoom.service.ts
deleted file mode 100644
index 60325a6..0000000
--- a/web/gui2/src/main/webapp/app/fw/svg/zoom.service.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2015-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 { Injectable } from '@angular/core';
-import { LogService } from '../../log.service';
-
-/**
- * ONOS GUI -- SVG -- Zoom Service
- */
-@Injectable()
-export class ZoomService {
-
- constructor(
- private log: LogService
- ) {
- this.log.debug('ZoomService constructed');
- }
-
-}
diff --git a/web/gui2/src/main/webapp/app/fw/util/ee.service.ts b/web/gui2/src/main/webapp/app/fw/util/ee.service.ts
deleted file mode 100644
index 8e1d87c..0000000
--- a/web/gui2/src/main/webapp/app/fw/util/ee.service.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2016-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 { Injectable } from '@angular/core';
-import { LogService } from '../../log.service';
-
-/**
- * ONOS GUI -- Util -- EE functions
- */
-@Injectable({
- providedIn: 'root',
-})
-export class EeService {
-
- constructor(
- private log: LogService
- ) {
- this.log.debug('EeService constructed');
- }
-
-}
diff --git a/web/gui2/src/main/webapp/app/fw/util/fn.service.spec.ts b/web/gui2/src/main/webapp/app/fw/util/fn.service.spec.ts
deleted file mode 100644
index 43e4f85..0000000
--- a/web/gui2/src/main/webapp/app/fw/util/fn.service.spec.ts
+++ /dev/null
@@ -1,492 +0,0 @@
-/*
- * Copyright 2014-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 { TestBed, inject } from '@angular/core/testing';
-
-import { LogService } from '../../log.service';
-import { ConsoleLoggerService } from '../../consolelogger.service';
-import { FnService } from '../../fw/util/fn.service';
-import { ActivatedRoute, Params } from '@angular/router';
-import { of } from 'rxjs';
-import * as d3 from 'd3';
-
-class MockActivatedRoute extends ActivatedRoute {
- constructor(params: Params) {
- super();
- this.queryParams = of(params);
- }
-}
-
-/**
- * ONOS GUI -- Util -- General Purpose Functions - Unit Tests
- */
-describe('FnService', () => {
- let ar: ActivatedRoute;
- let fs: FnService;
- let mockWindow: Window;
- let logServiceSpy: jasmine.SpyObj<LogService>;
-
- const someFunction = () => {};
- const someArray = [1, 2, 3];
- const someObject = { foo: 'bar'};
- const someNumber = 42;
- const someString = 'xyyzy';
- const someDate = new Date();
- const stringArray = ['foo', 'bar'];
-
- beforeEach(() => {
- const logSpy = jasmine.createSpyObj('LogService', ['debug', 'warn']);
- ar = new MockActivatedRoute({'debug': 'TestService'});
- mockWindow = <any>{
- innerWidth: 400,
- innerHeight: 200,
- navigator: {
- userAgent: 'defaultUA'
- }
- };
-
-
- TestBed.configureTestingModule({
- providers: [FnService,
- { provide: LogService, useValue: logSpy },
- { provide: ActivatedRoute, useValue: ar },
- { provide: 'Window', useFactory: (() => mockWindow ) }
- ]
- });
-
- fs = TestBed.get(FnService);
- logServiceSpy = TestBed.get(LogService);
- });
-
- it('should be created', () => {
- expect(fs).toBeTruthy();
- });
-
- // === Tests for isF()
- it('isF(): null for undefined', () => {
- expect(fs.isF(undefined)).toBeNull();
- });
-
- it('isF(): null for null', () => {
- expect(fs.isF(null)).toBeNull();
- });
- it('isF(): the reference for function', () => {
- expect(fs.isF(someFunction)).toBe(someFunction);
- });
- it('isF(): null for string', () => {
- expect(fs.isF(someString)).toBeNull();
- });
- it('isF(): null for number', () => {
- expect(fs.isF(someNumber)).toBeNull();
- });
- it('isF(): null for Date', () => {
- expect(fs.isF(someDate)).toBeNull();
- });
- it('isF(): null for array', () => {
- expect(fs.isF(someArray)).toBeNull();
- });
- it('isF(): null for object', () => {
- expect(fs.isF(someObject)).toBeNull();
- });
-
- // === Tests for isA()
- it('isA(): null for undefined', () => {
- expect(fs.isA(undefined)).toBeNull();
- });
- it('isA(): null for null', () => {
- expect(fs.isA(null)).toBeNull();
- });
- it('isA(): null for function', () => {
- expect(fs.isA(someFunction)).toBeNull();
- });
- it('isA(): null for string', () => {
- expect(fs.isA(someString)).toBeNull();
- });
- it('isA(): null for number', () => {
- expect(fs.isA(someNumber)).toBeNull();
- });
- it('isA(): null for Date', () => {
- expect(fs.isA(someDate)).toBeNull();
- });
- it('isA(): the reference for array', () => {
- expect(fs.isA(someArray)).toBe(someArray);
- });
- it('isA(): null for object', () => {
- expect(fs.isA(someObject)).toBeNull();
- });
-
- // === Tests for isS()
- it('isS(): null for undefined', () => {
- expect(fs.isS(undefined)).toBeNull();
- });
- it('isS(): null for null', () => {
- expect(fs.isS(null)).toBeNull();
- });
- it('isS(): null for function', () => {
- expect(fs.isS(someFunction)).toBeNull();
- });
- it('isS(): the reference for string', () => {
- expect(fs.isS(someString)).toBe(someString);
- });
- it('isS(): null for number', () => {
- expect(fs.isS(someNumber)).toBeNull();
- });
- it('isS(): null for Date', () => {
- expect(fs.isS(someDate)).toBeNull();
- });
- it('isS(): null for array', () => {
- expect(fs.isS(someArray)).toBeNull();
- });
- it('isS(): null for object', () => {
- expect(fs.isS(someObject)).toBeNull();
- });
-
- // === Tests for isO()
- it('isO(): null for undefined', () => {
- expect(fs.isO(undefined)).toBeNull();
- });
- it('isO(): null for null', () => {
- expect(fs.isO(null)).toBeNull();
- });
- it('isO(): null for function', () => {
- expect(fs.isO(someFunction)).toBeNull();
- });
- it('isO(): null for string', () => {
- expect(fs.isO(someString)).toBeNull();
- });
- it('isO(): null for number', () => {
- expect(fs.isO(someNumber)).toBeNull();
- });
- it('isO(): null for Date', () => {
- expect(fs.isO(someDate)).toBeNull();
- });
- it('isO(): null for array', () => {
- expect(fs.isO(someArray)).toBeNull();
- });
- it('isO(): the reference for object', () => {
- expect(fs.isO(someObject)).toBe(someObject);
- });
-
-
- // === Tests for contains()
- it('contains(): false for non-array', () => {
- expect(fs.contains(null, 1)).toBeFalsy();
- });
- it('contains(): true for contained item', () => {
- expect(fs.contains(someArray, 1)).toBeTruthy();
- expect(fs.contains(stringArray, 'bar')).toBeTruthy();
- });
- it('contains(): false for non-contained item', () => {
- expect(fs.contains(someArray, 109)).toBeFalsy();
- expect(fs.contains(stringArray, 'zonko')).toBeFalsy();
- });
-
- // === Tests for areFunctions()
- it('areFunctions(): true for empty-array', () => {
- expect(fs.areFunctions({}, [])).toBeTruthy();
- });
- it('areFunctions(): true for some api', () => {
- expect(fs.areFunctions({
- a: () => {},
- b: () => {}
- }, ['b', 'a'])).toBeTruthy();
- });
- it('areFunctions(): false for some other api', () => {
- expect(fs.areFunctions({
- a: () => {},
- b: 'not-a-function'
- }, ['b', 'a'])).toBeFalsy();
- });
- it('areFunctions(): extraneous stuff NOT ignored', () => {
- expect(fs.areFunctions({
- a: () => {},
- b: () => {},
- c: 1,
- d: 'foo'
- }, ['a', 'b'])).toBeFalsy();
- });
- it('areFunctions(): extraneous stuff ignored (alternate fn)', () => {
- expect(fs.areFunctionsNonStrict({
- a: () => {},
- b: () => {},
- c: 1,
- d: 'foo'
- }, ['a', 'b'])).toBeTruthy();
- });
-
- // == use the now-tested areFunctions() on our own api:
- it('should define api functions', () => {
- expect(fs.areFunctions(fs, [
- 'isF', 'isA', 'isS', 'isO', 'contains',
- 'areFunctions', 'areFunctionsNonStrict', 'windowSize',
- 'isMobile', 'isChrome', 'isChromeHeadless', 'isSafari',
- 'isFirefox', 'parseDebugFlags',
- 'debugOn', 'debug', 'find', 'inArray', 'removeFromArray',
- 'isEmptyObject', 'cap', 'noPx', 'noPxStyle', 'endsWith',
- 'inEvilList', 'analyze', 'sanitize', 'sameObjProps', 'containsObj'
-// 'find', 'inArray', 'removeFromArray', 'isEmptyObject', 'sameObjProps', 'containsObj', 'cap',
-// 'eecode', 'noPx', 'noPxStyle', 'endsWith', 'addToTrie', 'removeFromTrie', 'trieLookup',
-// 'classNames', 'extend', 'sanitize'
- ])).toBeTruthy();
- });
-
-
- // === Tests for windowSize()
- it('windowSize(): adjust height', () => {
- const dim = fs.windowSize(50);
- expect(dim.width).toEqual(400);
- expect(dim.height).toEqual(150);
- });
-
- it('windowSize(): adjust width', () => {
- const dim = fs.windowSize(0, 50);
- expect(dim.width).toEqual(350);
- expect(dim.height).toEqual(200);
- });
-
- it('windowSize(): adjust width and height', () => {
- const dim = fs.windowSize(101, 201);
- expect(dim.width).toEqual(199);
- expect(dim.height).toEqual(99);
- });
-
- // === Tests for isMobile()
- const uaMap = {
- chrome: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) ' +
- 'AppleWebKit/537.36 (KHTML, like Gecko) ' +
- 'Chrome/41.0.2272.89 Safari/537.36',
-
- iPad: 'Mozilla/5.0 (iPad; CPU OS 7_0 like Mac OS X) ' +
- 'AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 ' +
- 'Mobile/11A465 Safari/9537.53',
-
- iPhone: 'Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X) ' +
- 'AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 ' +
- 'Mobile/11A465 Safari/9537.53'
- };
-
- function setUa(key) {
- const str = uaMap[key];
- expect(str).toBeTruthy();
- (<any>mockWindow.navigator).userAgent = str;
- }
-
- it('isMobile(): should be false for Chrome on Mac OS X', () => {
- setUa('chrome');
- expect(fs.isMobile()).toBe(false);
- });
- it('isMobile(): should be true for Safari on iPad', () => {
- setUa('iPad');
- expect(fs.isMobile()).toBe(true);
- });
- it('isMobile(): should be true for Safari on iPhone', () => {
- setUa('iPhone');
- expect(fs.isMobile()).toBe(true);
- });
-
- // === Tests for find()
- const dataset = [
- { id: 'foo', name: 'Furby'},
- { id: 'bar', name: 'Barbi'},
- { id: 'baz', name: 'Basil'},
- { id: 'goo', name: 'Gabby'},
- { id: 'zoo', name: 'Zevvv'}
- ];
-
- it('should not find ooo', () => {
- expect(fs.find('ooo', dataset)).toEqual(-1);
- });
- it('should find foo', () => {
- expect(fs.find('foo', dataset)).toEqual(0);
- });
- it('should find zoo', () => {
- expect(fs.find('zoo', dataset)).toEqual(4);
- });
-
- it('should not find Simon', () => {
- expect(fs.find('Simon', dataset, 'name')).toEqual(-1);
- });
- it('should find Furby', () => {
- expect(fs.find('Furby', dataset, 'name')).toEqual(0);
- });
- it('should find Zevvv', () => {
- expect(fs.find('Zevvv', dataset, 'name')).toEqual(4);
- });
-
-
- // === Tests for inArray()
- const objRef = { x: 1, y: 2 };
- const array = [1, 3.14, 'hey', objRef, 'there', true];
- const array2 = ['b', 'a', 'd', 'a', 's', 's'];
-
- it('should not find HOO', () => {
- expect(fs.inArray('HOO', array)).toEqual(-1);
- });
- it('should find 1', () => {
- expect(fs.inArray(1, array)).toEqual(0);
- });
- it('should find pi', () => {
- expect(fs.inArray(3.14, array)).toEqual(1);
- });
- it('should find hey', () => {
- expect(fs.inArray('hey', array)).toEqual(2);
- });
- it('should find the object', () => {
- expect(fs.inArray(objRef, array)).toEqual(3);
- });
- it('should find there', () => {
- expect(fs.inArray('there', array)).toEqual(4);
- });
- it('should find true', () => {
- expect(fs.inArray(true, array)).toEqual(5);
- });
-
- it('should find the first occurrence A', () => {
- expect(fs.inArray('a', array2)).toEqual(1);
- });
- it('should find the first occurrence S', () => {
- expect(fs.inArray('s', array2)).toEqual(4);
- });
- it('should not find X', () => {
- expect(fs.inArray('x', array2)).toEqual(-1);
- });
-
- // === Tests for removeFromArray()
- it('should keep the array the same, for non-match', () => {
- const array1 = [1, 2, 3];
- expect(fs.removeFromArray(4, array1)).toBe(false);
- expect(array1).toEqual([1, 2, 3]);
- });
- it('should remove a value', () => {
- const array1a = [1, 2, 3];
- expect(fs.removeFromArray(2, array1a)).toBe(true);
- expect(array1a).toEqual([1, 3]);
- });
- it('should remove the first occurrence', () => {
- const array1b = ['x', 'y', 'z', 'z', 'y'];
- expect(fs.removeFromArray('y', array1b)).toBe(true);
- expect(array1b).toEqual(['x', 'z', 'z', 'y']);
- expect(fs.removeFromArray('x', array1b)).toBe(true);
- expect(array1b).toEqual(['z', 'z', 'y']);
- });
-
- // === Tests for isEmptyObject()
- it('should return true if an object is empty', () => {
- expect(fs.isEmptyObject({})).toBe(true);
- });
- it('should return false if an object is not empty', () => {
- expect(fs.isEmptyObject({foo: 'bar'})).toBe(false);
- });
-
- // === Tests for cap()
- it('should ignore non-alpha', () => {
- expect(fs.cap('123')).toEqual('123');
- });
- it('should capitalize first char', () => {
- expect(fs.cap('Foo')).toEqual('Foo');
- expect(fs.cap('foo')).toEqual('Foo');
- expect(fs.cap('foo bar')).toEqual('Foo bar');
- expect(fs.cap('FOO BAR')).toEqual('Foo bar');
- expect(fs.cap('foo Bar')).toEqual('Foo bar');
- });
-
- // === Tests for noPx()
- it('should return the value without px suffix', () => {
- expect(fs.noPx('10px')).toBe(10);
- expect(fs.noPx('500px')).toBe(500);
- expect(fs.noPx('-80px')).toBe(-80);
- });
-
- // === Tests for noPxStyle()
- it('should give a style\'s property without px suffix', () => {
- const d3Elem = d3.select('body')
- .append('div')
- .attr('id', 'fooElem')
- .style('width', '500px')
- .style('height', '200px')
- .style('font-size', '12px');
- expect(fs.noPxStyle(d3Elem, 'width')).toBe(500);
- expect(fs.noPxStyle(d3Elem, 'height')).toBe(200);
- expect(fs.noPxStyle(d3Elem, 'font-size')).toBe(12);
- d3.select('#fooElem').remove();
- });
-
- // === Tests for endsWith()
- it('should return true if string ends with foo', () => {
- expect(fs.endsWith('barfoo', 'foo')).toBe(true);
- });
-
- it('should return false if string doesnt end with foo', () => {
- expect(fs.endsWith('barfood', 'foo')).toBe(false);
- });
-
- // === Tests for sanitize()
- it('should return foo', () => {
- expect(fs.sanitize('foo')).toEqual('foo');
- });
- it('should retain < b > tags', () => {
- const str = 'foo <b>bar</b> baz';
- expect(fs.sanitize(str)).toEqual(str);
- });
- it('should retain < i > tags', () => {
- const str = 'foo <i>bar</i> baz';
- expect(fs.sanitize(str)).toEqual(str);
- });
- it('should retain < p > tags', () => {
- const str = 'foo <p>bar</p> baz';
- expect(fs.sanitize(str)).toEqual(str);
- });
- it('should retain < em > tags', () => {
- const str = 'foo <em>bar</em> baz';
- expect(fs.sanitize(str)).toEqual(str);
- });
- it('should retain < strong > tags', () => {
- const str = 'foo <strong>bar</strong> baz';
- expect(fs.sanitize(str)).toEqual(str);
- });
-
- it('should reject < a > tags', () => {
- expect(fs.sanitize('test <a href="hah">something</a> this'))
- .toEqual('test something this');
- });
-
- it('should log a warning for < script > tags', () => {
- expect(fs.sanitize('<script>alert("foo");</script>'))
- .toEqual('');
- expect(logServiceSpy.warn).toHaveBeenCalledWith(
- 'Unsanitary HTML input -- <script> detected!'
- );
- });
- it('should log a warning for < style > tags', () => {
- expect(fs.sanitize('<style> h1 {color:red;} </style>'))
- .toEqual('');
- expect(logServiceSpy.warn).toHaveBeenCalledWith(
- 'Unsanitary HTML input -- <style> detected!'
- );
- });
-
- it('should log a warning for < iframe > tags', () => {
- expect(fs.sanitize('Foo<iframe><body><h1>fake</h1></body></iframe>Bar'))
- .toEqual('FooBar');
- expect(logServiceSpy.warn).toHaveBeenCalledWith(
- 'Unsanitary HTML input -- <iframe> detected!'
- );
- });
-
- it('should completely strip < script >, remove < a >, retain < i >', () => {
- expect(fs.sanitize('Hey <i>this</i> is <script>alert("foo");</script> <a href="meh">cool</a>'))
- .toEqual('Hey <i>this</i> is cool');
- });
-});
diff --git a/web/gui2/src/main/webapp/app/fw/util/fn.service.ts b/web/gui2/src/main/webapp/app/fw/util/fn.service.ts
deleted file mode 100644
index d0307e3..0000000
--- a/web/gui2/src/main/webapp/app/fw/util/fn.service.ts
+++ /dev/null
@@ -1,563 +0,0 @@
-/*
- * Copyright 2014-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 { Injectable, Inject } from '@angular/core';
-import { ActivatedRoute, Router} from '@angular/router';
-import { LogService } from '../../log.service';
-
-// Angular>=2 workaround for missing definition
-declare const InstallTrigger: any;
-
-const matcher = /<\/?([a-zA-Z0-9]+)*(.*?)\/?>/igm;
-const whitelist: string[] = ['b', 'i', 'p', 'em', 'strong', 'br'];
-const evillist: string[] = ['script', 'style', 'iframe'];
-
-/**
- * Used with the Window size function;
- **/
-export interface WindowSize {
- width: number;
- height: number;
-}
-
-/**
- * For the sanitize() and analyze() functions
- */
-export interface Match {
- full: string;
- name: string;
-}
-
-// TODO Move all this trie stuff to its own class
-// Angular>=2 Tightened up on types to avoid compiler errors
-interface TrieC {
- p: any;
- s: string[];
-}
-// trie operation
-function _trieOp(op: string, trie, word: string, data) {
- const p = trie;
- const w: string = word.toUpperCase();
- const s: Array<string> = w.split('');
- let c: TrieC = { p: p, s: s };
- let t = [];
- let x = 0;
- const f1 = op === '+' ? add : probe;
- const f2 = op === '+' ? insert : remove;
-
- function add(cAdded): TrieC {
- const q = cAdded.s.shift();
- let np = cAdded.p[q];
-
- if (!np) {
- cAdded.p[q] = {};
- np = cAdded.p[q];
- x = 1;
- }
- return { p: np, s: cAdded.s };
- }
-
- function probe(cProbed): TrieC {
- const q = cProbed.s.shift();
- const k: number = Object.keys(cProbed.p).length;
- const np = cProbed.p[q];
-
- t.push({ q: q, k: k, p: cProbed.p });
- if (!np) {
- t = [];
- return { p: [], s: [] };
- }
- return { p: np, s: cProbed.s };
- }
-
- function insert() {
- c.p._data = data;
- return x ? 'added' : 'updated';
- }
-
- function remove() {
- if (t.length) {
- t = t.reverse();
- while (t.length) {
- const d = t.shift();
- delete d.p[d.q];
- if (d.k > 1) {
- t = [];
- }
- }
- return 'removed';
- }
- return 'absent';
- }
-
- while (c.s.length) {
- c = f1(c);
- }
- return f2();
-}
-
-// add word to trie (word will be converted to uppercase)
-// data associated with the word
-// returns 'added' or 'updated'
-function addToTrie(trie, word, data) {
- return _trieOp('+', trie, word, data);
-}
-
-// remove word from trie (word will be converted to uppercase)
-// returns 'removed' or 'absent'
-// Angular>=2 added in quotes for data. error TS2554: Expected 4 arguments, but got 3.
-function removeFromTrie(trie, word) {
- return _trieOp('-', trie, word, '');
-}
-
-// lookup word (converted to uppercase) in trie
-// returns:
-// undefined if the word is not in the trie
-// -1 for a partial match (word is a prefix to an existing word)
-// data for the word for an exact match
-function trieLookup(trie, word) {
- const s = word.toUpperCase().split('');
- let p = trie;
- let n;
-
- while (s.length) {
- n = s.shift();
- p = p[n];
- if (!p) {
- return undefined;
- }
- }
- if (p._data) {
- return p._data;
- }
- return -1;
-}
-
-
-/**
- * ONOS GUI -- Util -- General Purpose Functions
- */
-@Injectable({
- providedIn: 'root',
-})
-export class FnService {
- // internal state
- private debugFlags = new Map<string, boolean>([
-// [ "LoadingService", true ]
- ]);
-
- constructor(
- private route: ActivatedRoute,
- private log: LogService,
- @Inject('Window') private w: Window
- ) {
- this.route.queryParams.subscribe(params => {
- const debugparam: string = params['debug'];
- log.debug('Param:', debugparam);
- this.parseDebugFlags(debugparam);
- });
- this.log.debug('FnService constructed');
- }
-
- /**
- * Test if an argument is a function
- *
- * Note: the need for this would go away if all functions
- * were strongly typed
- */
- isF(f: any): any {
- return typeof f === 'function' ? f : null;
- }
-
- /**
- * Test if an argument is an array
- *
- * Note: the need for this would go away if all arrays
- * were strongly typed
- */
- isA(a: any): any {
- // NOTE: Array.isArray() is part of EMCAScript 5.1
- return Array.isArray(a) ? a : null;
- }
-
- /**
- * Test if an argument is a string
- *
- * Note: the need for this would go away if all strings
- * were strongly typed
- */
- isS(s: any): string {
- return typeof s === 'string' ? s : null;
- }
-
- /**
- * Test if an argument is an object
- *
- * Note: the need for this would go away if all objects
- * were strongly typed
- */
- isO(o: any): Object {
- return (o && typeof o === 'object' && o.constructor === Object) ? o : null;
- }
-
- /**
- * Test that an array contains an object
- */
- contains(a: any[], x: any): boolean {
- return this.isA(a) && a.indexOf(x) > -1;
- }
-
- /**
- * Returns width and height of window inner dimensions.
- * offH, offW : offset width/height are subtracted, if present
- */
- windowSize(offH: number = 0, offW: number = 0): WindowSize {
- return {
- height: this.w.innerHeight - offH,
- width: this.w.innerWidth - offW
- };
- }
-
- /**
- * Returns true if all names in the array are defined as functions
- * on the given api object; false otherwise.
- * Also returns false if there are properties on the api that are NOT
- * listed in the array of names.
- *
- * This gets extra complicated when the api Object is an
- * Angular service - while the functions can be retrieved
- * by an indexed get, the ownProperties does not show the
- * functions of the class. We have to dive in to the prototypes
- * properties to get these - and even then we have to filter
- * out the constructor and any member variables
- */
- areFunctions(api: Object, fnNames: string[]): boolean {
- const fnLookup: Map<string, boolean> = new Map();
- let extraFound: boolean = false;
-
- if (!this.isA(fnNames)) {
- return false;
- }
-
- const n: number = fnNames.length;
- let i: number;
- let name: string;
-
- for (i = 0; i < n; i++) {
- name = fnNames[i];
- if (!this.isF(api[name])) {
- return false;
- }
- fnLookup.set(name, true);
- }
-
- // check for properties on the API that are not listed in the array,
- const keys = Object.getOwnPropertyNames(api);
- if (keys.length === 0) {
- return true;
- }
- // If the api is a class it will have a name,
- // else it will just be called 'Object'
- const apiObjectName: string = api.constructor.name;
- if (apiObjectName === 'Object') {
- Object.keys(api).forEach((key) => {
- if (!fnLookup.get(key)) {
- extraFound = true;
- }
- });
- } else { // It is a class, so its functions will be in the child (prototype)
- const pObj: Object = Object.getPrototypeOf(api);
- for ( const key in Object.getOwnPropertyDescriptors(pObj) ) {
- if (key === 'constructor') { // Filter out constructor
- continue;
- }
- const value = Object.getOwnPropertyDescriptor(pObj, key);
- // Only compare functions. Look for any not given in the map
- if (this.isF(value.value) && !fnLookup.get(key)) {
- extraFound = true;
- }
- }
- }
- return !extraFound;
- }
-
- /**
- * Returns true if all names in the array are defined as functions
- * on the given api object; false otherwise. This is a non-strict version
- * that does not care about other properties on the api.
- */
- areFunctionsNonStrict(api, fnNames): boolean {
- if (!this.isA(fnNames)) {
- return false;
- }
- const n = fnNames.length;
- let i;
- let name;
-
- for (i = 0; i < n; i++) {
- name = fnNames[i];
- if (!this.isF(api[name])) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * Returns true if current browser determined to be a mobile device
- */
- isMobile() {
- const ua = this.w.navigator.userAgent;
- const patt = /iPhone|iPod|iPad|Silk|Android|BlackBerry|Opera Mini|IEMobile/;
- return patt.test(ua);
- }
-
- /**
- * Returns true if the current browser determined to be Chrome
- */
- isChrome() {
- const isChromium = (this.w as any).chrome;
- const vendorName = this.w.navigator.vendor;
-
- const isOpera = this.w.navigator.userAgent.indexOf('OPR') > -1;
- return (isChromium !== null &&
- isChromium !== undefined &&
- vendorName === 'Google Inc.' &&
- isOpera === false);
- }
-
- isChromeHeadless() {
- const vendorName = this.w.navigator.vendor;
- const headlessChrome = this.w.navigator.userAgent.indexOf('HeadlessChrome') > -1;
-
- return (vendorName === 'Google Inc.' && headlessChrome === true);
- }
-
- /**
- * Returns true if the current browser determined to be Safari
- */
- isSafari() {
- return (this.w.navigator.userAgent.indexOf('Safari') !== -1 &&
- this.w.navigator.userAgent.indexOf('Chrome') === -1);
- }
-
- /**
- * Returns true if the current browser determined to be Firefox
- */
- isFirefox() {
- return typeof InstallTrigger !== 'undefined';
- }
-
- /**
- * search through an array of objects, looking for the one with the
- * tagged property matching the given key. tag defaults to 'id'.
- * returns the index of the matching object, or -1 for no match.
- */
- find(key: string, array: Object[], tag: string = 'id'): number {
- let idx: number;
- const n: number = array.length;
-
- for (idx = 0 ; idx < n; idx++) {
- const d: Object = array[idx];
- if (d[tag] === key) {
- return idx;
- }
- }
- return -1;
- }
-
- /**
- * search through array to find (the first occurrence of) item,
- * returning its index if found; otherwise returning -1.
- */
- inArray(item: any, array: any[]): number {
- if (this.isA(array)) {
- for (let i = 0; i < array.length; i++) {
- if (array[i] === item) {
- return i;
- }
- }
- }
- return -1;
- }
-
- /**
- * remove (the first occurrence of) the specified item from the given
- * array, if any. Return true if the removal was made; false otherwise.
- */
- removeFromArray(item: any, array: any[]): boolean {
- const i: number = this.inArray(item, array);
- if (i >= 0) {
- array.splice(i, 1);
- return true;
- }
- return false;
- }
-
- /**
- * return true if the object is empty, return false otherwise
- */
- isEmptyObject(obj: Object): boolean {
- for (const key in obj) {
- if (true) { return false; }
- }
- return true;
- }
-
- /**
- * returns true if the two objects have all the same properties
- */
- sameObjProps(obj1: Object, obj2: Object): boolean {
- for (const key in obj1) {
- if (obj1.hasOwnProperty(key)) {
- if (!(obj1[key] === obj2[key])) {
- return false;
- }
- }
- }
- return true;
- }
-
- /**
- * returns true if the array contains the object
- * does NOT use strict object reference equality,
- * instead checks each property individually for equality
- */
- containsObj(arr: any[], obj: Object): boolean {
- const len = arr.length;
- for (let i = 0; i < len; i++) {
- if (this.sameObjProps(arr[i], obj)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Return the given string with the first character capitalized.
- */
- cap(s: string): string {
- return s ? s[0].toUpperCase() + s.slice(1).toLowerCase() : s;
- }
-
- /**
- * return the parameter without a px suffix
- */
- noPx(num: string): number {
- return Number(num.replace(/px$/, ''));
- }
-
- /**
- * return an element's given style property without px suffix
- */
- noPxStyle(elem: any, prop: string): number {
- return Number(elem.style(prop).replace(/px$/, ''));
- }
-
- /**
- * Return true if a str ends with suffix
- */
- endsWith(str: string, suffix: string) {
- return str.indexOf(suffix, str.length - suffix.length) !== -1;
- }
-
- /**
- * output debug message to console, if debug tag set...
- * e.g. fs.debug('mytag', arg1, arg2, ...)
- */
- debug(tag, ...args) {
- if (this.debugFlags.get(tag)) {
- this.log.debug(tag, args.join());
- }
- }
-
- private parseDebugFlags(dbgstr: string): void {
- const bits = dbgstr ? dbgstr.split(',') : [];
- bits.forEach((key) => {
- this.debugFlags.set(key, true);
- });
- this.log.debug('Debug flags:', dbgstr);
- }
-
- /**
- * Return true if the given debug flag was specified in the query params
- */
- debugOn(tag: string): boolean {
- return this.debugFlags.get(tag);
- }
-
-
-
- // -----------------------------------------------------------------
- // The next section deals with sanitizing external strings destined
- // to be loaded via a .html() function call.
- //
- // See definition of matcher, evillist and whitelist at the top of this file
-
- /*
- * Returns true if the tag is in the evil list, (and is not an end-tag)
- */
- inEvilList(tag: any): boolean {
- return (evillist.indexOf(tag.name) !== -1 && tag.full.indexOf('/') === -1);
- }
-
- /*
- * Returns an array of Matches of matcher in html
- */
- analyze(html: string): Match[] {
- const matches: Match[] = [];
- let match;
-
- // extract all tags
- while ((match = matcher.exec(html)) !== null) {
- matches.push({
- full: match[0],
- name: match[1],
- // NOTE: ignoring attributes {match[2].split(' ')} for now
- });
- }
-
- return matches;
- }
-
- /*
- * Returns a cleaned version of html
- */
- sanitize(html: string): string {
- const matches: Match[] = this.analyze(html);
-
- // completely obliterate evil tags and their contents...
- evillist.forEach((tag) => {
- const re = new RegExp('<' + tag + '(.*?)>(.*?[\r\n])*?(.*?)(.*?[\r\n])*?<\/' + tag + '>', 'gim');
- html = html.replace(re, '');
- });
-
- // filter out all but white-listed tags and end-tags
- matches.forEach((tag) => {
- if (whitelist.indexOf(tag.name) === -1) {
- html = html.replace(tag.full, '');
- if (this.inEvilList(tag)) {
- this.log.warn('Unsanitary HTML input -- ' +
- tag.full + ' detected!');
- }
- }
- });
-
- // TODO: consider encoding HTML entities, e.g. '&' -> '&'
-
- return html;
- }
-
-}
diff --git a/web/gui2/src/main/webapp/app/fw/util/key.service.ts b/web/gui2/src/main/webapp/app/fw/util/key.service.ts
deleted file mode 100644
index 4c6f492..0000000
--- a/web/gui2/src/main/webapp/app/fw/util/key.service.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2014-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 { Injectable } from '@angular/core';
-import { FnService } from './fn.service';
-import { LogService } from '../../log.service';
-
-/**
- * ONOS GUI -- Util -- Key Handler Service
- */
-@Injectable({
- providedIn: 'root',
-})
-export class KeyService {
-
- constructor(
- private fs: FnService,
- private log: LogService
- ) {
- this.log.debug('KeyService constructed');
- }
-
-}
diff --git a/web/gui2/src/main/webapp/app/fw/util/lion.service.ts b/web/gui2/src/main/webapp/app/fw/util/lion.service.ts
deleted file mode 100644
index 2416e7d..0000000
--- a/web/gui2/src/main/webapp/app/fw/util/lion.service.ts
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright 2017-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 { Injectable } from '@angular/core';
-import { LogService } from '../../log.service';
-import { WebSocketService } from '../remote/websocket.service';
-
-/**
- * A definition of Lion data
- */
-interface Lion {
- locale: any;
- lion: any;
-}
-
-/**
- * ONOS GUI -- Lion -- Localization Utilities
- */
-@Injectable({
- providedIn: 'root',
-})
-export class LionService {
-
- ubercache: any[] = [];
- loadCbs = new Map<string, () => void>([]); // A map of functions
-
- /**
- * Handler for uberlion event from WSS
- */
- uberlion(data: Lion) {
- this.ubercache = data.lion;
-
- this.log.info('LION service: Locale... [' + data.locale + ']');
- this.log.info('LION service: Bundles installed...');
-
- for (const p in this.ubercache) {
- if (this.ubercache[p]) {
- this.log.info(' :=> ', p);
- }
- }
- // If any component had registered a callback, call it now
- // that LION is loaded
- for (const cbname of this.loadCbs.keys()) {
- this.log.debug('Updating', cbname, 'with LION');
- this.loadCbs.get(cbname)();
- }
-
- this.log.debug('LION service: uber-lion bundle received:', data);
- }
-
- constructor(
- private log: LogService,
- private wss: WebSocketService
- ) {
- this.wss.bindHandlers(new Map<string, (data) => void>([
- ['uberlion', (data) => this.uberlion(data) ]
- ]));
- this.log.debug('LionService constructed');
- }
-
- /**
- * Returns a lion bundle (function) for the given bundle ID (string)
- * returns a function that takes a string and returns a string
- */
- bundle(bundleId: string): (string) => string {
- let bundleObj = this.ubercache[bundleId];
-
- if (!bundleObj) {
- this.log.warn('No lion bundle registered:', bundleId);
- bundleObj = {};
- }
-
- return (key) => {
- return bundleObj[key] || '%' + key + '%';
- };
- }
-}
diff --git a/web/gui2/src/main/webapp/app/fw/util/prefs.service.ts b/web/gui2/src/main/webapp/app/fw/util/prefs.service.ts
deleted file mode 100644
index 991df7f..0000000
--- a/web/gui2/src/main/webapp/app/fw/util/prefs.service.ts
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright 2015-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 { Injectable } from '@angular/core';
-import { FnService } from './fn.service';
-import { LogService } from '../../log.service';
-import { WebSocketService } from '../remote/websocket.service';
-
-/**
- * ONOS GUI -- Util -- User Preference Service
- */
-@Injectable({
- providedIn: 'root',
-})
-export class PrefsService {
- protected Prefs;
- protected handlers: string[] = [];
- cache: any;
- listeners: any;
- constructor(
- protected fs: FnService,
- protected log: LogService,
- protected wss: WebSocketService
- ) {
- this.cache = {};
- this.wss.bindHandlers(new Map<string, (data) => void>([
- [this.Prefs, (data) => this.updatePrefs(data)]
- ]));
- this.handlers.push(this.Prefs);
-
- this.log.debug('PrefsService constructed');
- }
-
- setPrefs(name: string, obj: any) {
- // keep a cached copy of the object and send an update to server
- this.cache[name] = obj;
- this.wss.sendEvent('updatePrefReq', { key: name, value: obj });
- }
- updatePrefs(data: any) {
- this.cache = data;
- this.listeners.forEach(function (lsnr) { lsnr(); });
- }
-
- asNumbers(obj: any, keys?: any, not?: any) {
- if (!obj) {
- return null;
- }
-
- const skip = {};
- if (not) {
- keys.forEach(k => {
- skip[k] = 1;
- }
- );
- }
-
- if (!keys || not) {
- // do them all
- Array.from(obj).forEach((v, k) => {
- if (!not || !skip[k]) {
- obj[k] = Number(obj[k]);
- }
- });
- } else {
- // do the explicitly named keys
- keys.forEach(k => {
- obj[k] = Number(obj[k]);
- });
- }
- return obj;
- }
-
- getPrefs(name: string, defaults: any, qparams?: string) {
- const obj = Object.assign({}, defaults || {}, this.cache[name] || {});
-
- // if query params are specified, they override...
- if (this.fs.isO(qparams)) {
- obj.forEach(k => {
- if (qparams.hasOwnProperty(k)) {
- obj[k] = qparams[k];
- }
- });
- }
- return obj;
- }
-
- // merge preferences:
- // The assumption here is that obj is a sparse object, and that the
- // defined keys should overwrite the corresponding values, but any
- // existing keys that are NOT explicitly defined here should be left
- // alone (not deleted).
- mergePrefs(name: string, obj: any) {
- const merged = this.cache[name] || {};
- this.setPrefs(name, Object.assign(merged, obj));
- }
-
- addListener(listener: any) {
- this.listeners.push(listener);
- }
-
- removeListener(listener: any) {
- this.listeners = this.listeners.filter(function (obj) { return obj === listener; });
- }
-
-}
diff --git a/web/gui2/src/main/webapp/app/fw/util/random.service.ts b/web/gui2/src/main/webapp/app/fw/util/random.service.ts
deleted file mode 100644
index 1b6e466..0000000
--- a/web/gui2/src/main/webapp/app/fw/util/random.service.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2015-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 { Injectable } from '@angular/core';
-import { LogService } from '../../log.service';
-
-/**
- * ONOS GUI -- Random -- Encapsulated randomness
- */
-@Injectable({
- providedIn: 'root',
-})
-export class RandomService {
-
- constructor(
- private log: LogService
- ) {
- this.log.debug('RandomService constructed');
- }
-
-}
diff --git a/web/gui2/src/main/webapp/app/fw/util/theme.service.ts b/web/gui2/src/main/webapp/app/fw/util/theme.service.ts
deleted file mode 100644
index fe85766..0000000
--- a/web/gui2/src/main/webapp/app/fw/util/theme.service.ts
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2014-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 { Injectable } from '@angular/core';
-import { LogService } from '../../log.service';
-
-
-/**
- * ONOS GUI -- Util -- Theme Service
- */
-@Injectable({
- providedIn: 'root',
-})
-export class ThemeService {
- themes: string[] = ['light', 'dark'];
- thidx = 0;
-
- constructor(
- private log: LogService
- ) {
- this.log.debug('ThemeService constructed');
- }
-
- getTheme(): string {
- return this.themes[this.thidx];
- }
-
- themeStr(): string {
- return this.themes.join(' ');
- }
-
-}
diff --git a/web/gui2/src/main/webapp/app/fw/widget/button.service.ts b/web/gui2/src/main/webapp/app/fw/widget/button.service.ts
deleted file mode 100644
index 4e22763..0000000
--- a/web/gui2/src/main/webapp/app/fw/widget/button.service.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2015-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 { Injectable } from '@angular/core';
-import { FnService } from '../util/fn.service';
-import { IconService } from '../svg/icon.service';
-import { LogService } from '../../log.service';
-
-/**
- * ONOS GUI -- Widget -- Button Service
- */
-@Injectable()
-export class ButtonService {
-
- constructor(
- private is: IconService,
- private fs: FnService,
- private log: LogService,
- ) {
- this.log.debug('ButtonService constructed');
- }
-
-}
diff --git a/web/gui2/src/main/webapp/app/fw/widget/chartbuilder.service.ts b/web/gui2/src/main/webapp/app/fw/widget/chartbuilder.service.ts
deleted file mode 100644
index 1ed93df..0000000
--- a/web/gui2/src/main/webapp/app/fw/widget/chartbuilder.service.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2016-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 { Injectable } from '@angular/core';
-import { FnService } from '../util/fn.service';
-import { LoadingService } from '../layer/loading.service';
-import { LogService } from '../../log.service';
-import { WebSocketService } from '../remote/websocket.service';
-
-/**
- * ONOS GUI -- Widget -- Chart Service
- */
-@Injectable()
-export class ChartBuilderService {
-
- constructor(
- private fs: FnService,
- private ls: LoadingService,
- private log: LogService,
- private wss: WebSocketService
- ) {
- this.log.debug('ChartBuilderService constructed');
- }
-
-}
diff --git a/web/gui2/src/main/webapp/app/fw/widget/detailspanel.base.ts b/web/gui2/src/main/webapp/app/fw/widget/detailspanel.base.ts
deleted file mode 100644
index 59f85c5..0000000
--- a/web/gui2/src/main/webapp/app/fw/widget/detailspanel.base.ts
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * 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 { FnService } from '../util/fn.service';
-import { LoadingService } from '../layer/loading.service';
-import { LogService } from '../../log.service';
-import { WebSocketService } from '../remote/websocket.service';
-
-import { PanelBaseImpl } from './panel.base';
-import { Output, EventEmitter, Input } from '@angular/core';
-
-/**
- * A generic model of the data returned from the *DetailsResponse
- */
-interface DetailsResponse {
- details: any;
-}
-
-/**
- * Extends the PanelBase abstract class specifically for showing details
- *
- * This makes another call through WSS to the server for specific
- * details to fill the panel with
- *
- * This replaces the detailspanel service in the old gui
- */
-export abstract class DetailsPanelBaseImpl extends PanelBaseImpl {
-
- @Input() id: string;
- @Output() closeEvent = new EventEmitter<string>();
-
- private root: string;
- private req: string;
- private resp: string;
- private handlers: string[] = [];
- public detailsData: any = {};
- public closed: boolean = false;
-
- constructor(
- protected fs: FnService,
- protected ls: LoadingService,
- protected log: LogService,
- protected wss: WebSocketService,
- protected tag: string,
- ) {
- super(fs, ls, log, wss, {});
- this.root = tag + 's';
- this.req = tag + 'DetailsRequest';
- this.resp = tag + 'DetailsResponse';
- }
-
- /**
- * When the details panel is created set up a listener on
- * Web Socket for details responses
- */
- init() {
- this.wss.bindHandlers(new Map<string, (data) => void>([
- [this.resp, (data) => this.detailsPanelResponseCb(data)]
- ]));
- this.handlers.push(this.resp);
- }
-
- /**
- * When the details panel is destroyed this should be called to
- * de-register from the WebSocket
- */
- destroy() {
- this.wss.unbindHandlers(this.handlers);
- }
-
- /**
- * A callback that executes when the details data that was requested
- * on WebSocketService arrives.
- */
- detailsPanelResponseCb(data: DetailsResponse) {
- this.detailsData = data['details'];
- }
-
- /**
- * Details Panel Data Request - should be called whenever row id changes
- */
- requestDetailsPanelData(query: any) {
- this.closed = false;
- // Do not send if the Web Socket hasn't opened
- if (this.wss.isConnected()) {
- if (this.fs.debugOn('panel')) {
- this.log.debug('Details panel data REQUEST:', this.req, query);
- }
- this.wss.sendEvent(this.req, query);
- }
- }
-
- /**
- * this should be called when the details panel close button is clicked
- */
- close(): void {
- this.closed = true;
- this.id = null;
- this.closeEvent.emit(this.id);
- }
-
-}
diff --git a/web/gui2/src/main/webapp/app/fw/widget/flashchanges.directive.ts b/web/gui2/src/main/webapp/app/fw/widget/flashchanges.directive.ts
deleted file mode 100644
index 1a5594f..0000000
--- a/web/gui2/src/main/webapp/app/fw/widget/flashchanges.directive.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2015-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 { Directive } from '@angular/core';
-import { FnService } from '../util/fn.service';
-import { LogService } from '../../log.service';
-
-/**
- * ONOS GUI -- Widget -- Table Flash Changes Directive
- */
-@Directive({
- selector: '[onosFlashChanges]'
-})
-export class FlashChangesDirective {
-
- constructor(
- private fs: FnService,
- private log: LogService
- ) {
- this.log.debug('FlashChangesDirective constructed');
- }
-
-}
diff --git a/web/gui2/src/main/webapp/app/fw/widget/list.service.ts b/web/gui2/src/main/webapp/app/fw/widget/list.service.ts
deleted file mode 100644
index 3d31ab6..0000000
--- a/web/gui2/src/main/webapp/app/fw/widget/list.service.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2015-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 { Injectable } from '@angular/core';
-import { LogService } from '../../log.service';
-
-/**
- * ONOS GUI -- Widget -- List Service
- */
-@Injectable()
-export class ListService {
-
- constructor(
- private log: LogService
- ) {
- this.log.debug('ListService constructed');
- }
-
-}
diff --git a/web/gui2/src/main/webapp/app/fw/widget/panel-theme.css b/web/gui2/src/main/webapp/app/fw/widget/panel-theme.css
deleted file mode 100644
index 6b984ab..0000000
--- a/web/gui2/src/main/webapp/app/fw/widget/panel-theme.css
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright 2016-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.
- */
-
-/*
- ONOS GUI -- Panel Service (theme) -- CSS file
- */
-
-.light .floatpanel {
- background-color: white;
- color: #3c3a3a;
- border: 1px solid #c7c7c0;
-}
-
-.light .floatpanel hr {
- border: 1px solid #c7c7c0;
-}
-
-.light .floatpanel .bottom tr:nth-child(odd) {
- background-color: #f4f4f4;
-}
-
-.light .floatpanel .bottom tr:nth-child(even) {
- background-color: #fbfbfb;
-}
-
-
-/* ========== DARK Theme ========== */
-
-.dark .floatpanel {
- background-color: #282528;
- color: #888c8c;
- border: 1px solid #364144;
-}
-
-.dark .floatpanel th {
- background-color: #242424;
-}
-
-.dark .floatpanel h2 {
- color: #dddddd;
-}
-
-.dark .floatpanel hr {
- border: 1px solid #30303a;
-}
-
-.dark .floatpanel .bottom tr:nth-child(odd) {
- background-color: #333333;
-}
-
-.dark .floatpanel .bottom tr:nth-child(even) {
- background-color: #3a3a3a;
-}
diff --git a/web/gui2/src/main/webapp/app/fw/widget/panel.base.ts b/web/gui2/src/main/webapp/app/fw/widget/panel.base.ts
deleted file mode 100644
index 703cbf9..0000000
--- a/web/gui2/src/main/webapp/app/fw/widget/panel.base.ts
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * 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 { FnService } from '../util/fn.service';
-import { LoadingService } from '../layer/loading.service';
-import { LogService } from '../../log.service';
-import { WebSocketService } from '../remote/websocket.service';
-
-
-const noop = (): any => undefined;
-
-/**
- ********* Static functions *********
- */
-function margin(p) {
- return p.settings.margin;
-}
-
-function hideMargin(p) {
- return p.settings.hideMargin;
-}
-
-function noPx(p, what) {
- return Number(p.el.style(what).replace(/px$/, ''));
-}
-
-function widthVal(p) {
- return noPx(p, 'width');
-}
-
-function heightVal(p) {
- return noPx(p, 'height');
-}
-
-function pxShow(p) {
- return margin(p) + 'px';
-}
-
-function pxHide(p) {
- return (-hideMargin(p) - widthVal(p) - (noPx(p, 'padding') * 2)) + 'px';
-}
-
-
-/**
- * Base model of panel view - implemented by Panel components
- */
-export interface PanelBase {
- showPanel(cb: any): void;
- hidePanel(cb: any): void;
- togglePanel(cb: any): void;
- emptyPanel(): void;
- appendPanel(what: any): void;
- panelWidth(w: number): number;
- panelHeight(h: number): number;
- panelBBox(): string;
- panelIsVisible(): boolean;
- classed(cls: any, bool: boolean): boolean;
- panelEl(): any;
-}
-
-/**
- * ONOS GUI -- Widget -- Panel Base class
- *
- * Replacing the panel service in the old implementation
- */
-export abstract class PanelBaseImpl implements PanelBase {
-
- protected on: boolean;
- protected el: any;
-
- constructor(
- protected fs: FnService,
- protected ls: LoadingService,
- protected log: LogService,
- protected wss: WebSocketService,
- protected settings: any
- ) {
-// this.log.debug('Panel base class constructed');
- }
-
- showPanel(cb) {
- const endCb = this.fs.isF(cb) || noop;
- this.on = true;
- this.el.transition().duration(this.settings.xtnTime)
- .each('end', endCb)
- .style(this.settings.edge, pxShow(this))
- .style('opacity', 1);
- }
-
- hidePanel(cb) {
- const endCb = this.fs.isF(cb) || noop;
- const endOpacity = this.settings.fade ? 0 : 1;
- this.on = false;
- this.el.transition().duration(this.settings.xtnTime)
- .each('end', endCb)
- .style(this.settings.edge, pxHide(this))
- .style('opacity', endOpacity);
- }
-
- togglePanel(cb): boolean {
- if (this.on) {
- this.hidePanel(cb);
- } else {
- this.showPanel(cb);
- }
- return this.on;
- }
-
- emptyPanel(): string {
- return this.el.text('');
- }
-
- appendPanel(what) {
- return this.el.append(what);
- }
-
- panelWidth(w: number): number {
- if (w === undefined) {
- return widthVal(this);
- }
- this.el.style('width', w + 'px');
- }
-
- panelHeight(h: number): number {
- if (h === undefined) {
- return heightVal(this);
- }
- this.el.style('height', h + 'px');
- }
-
- panelBBox(): string {
- return this.el.node().getBoundingClientRect();
- }
-
- panelIsVisible(): boolean {
- return this.on;
- }
-
- classed(cls, bool): boolean {
- return this.el.classed(cls, bool);
- }
-
- panelEl() {
- return this.el;
- }
-
-
- /**
- * A dummy implementation of the lionFn until the response is received and the LION
- * bundle is received from the WebSocket
- */
- dummyLion(key: string): string {
- return '%' + key + '%';
- }
-}
diff --git a/web/gui2/src/main/webapp/app/fw/widget/panel.css b/web/gui2/src/main/webapp/app/fw/widget/panel.css
deleted file mode 100644
index 48530ac..0000000
--- a/web/gui2/src/main/webapp/app/fw/widget/panel.css
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright 2015-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.
- */
-
-/*
- ONOS GUI -- Panel Service (layout) -- CSS file
- */
-
-.floatpanel {
- position: absolute;
- z-index: 100;
- display: block;
- top: 160px;
- width: 544px;
- right: -550px;
- opacity: 100;
-
- padding: 2px;
- font-size: 10pt;
-}
-
-/* The following 4 are copied here from Theme until we sort out the
- * theme service
- */
-.floatpanel {
- background-color: white;
- color: #3c3a3a;
- border: 1px solid #c7c7c0;
-}
-
-.floatpanel hr {
- border: 1px solid #c7c7c0;
-}
-
-.floatpanel .bottom tr:nth-child(odd) {
- background-color: #f4f4f4;
-}
-
-.floatpanel .bottom tr:nth-child(even) {
- background-color: #fbfbfb;
-}
-
-.floatpanel.dialog {
- top: 180px;
-}
-
-html[data-platform='iPad'] .floatpanel {
- top: 80px;
-}
diff --git a/web/gui2/src/main/webapp/app/fw/widget/sortableheader.directive.ts b/web/gui2/src/main/webapp/app/fw/widget/sortableheader.directive.ts
deleted file mode 100644
index 71c1df3..0000000
--- a/web/gui2/src/main/webapp/app/fw/widget/sortableheader.directive.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2015-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 { Directive } from '@angular/core';
-import { IconService } from '../svg/icon.service';
-import { LogService } from '../../log.service';
-
-/**
- * ONOS GUI -- Widget -- Table Sortable Header Directive
- */
-@Directive({
- selector: '[onosSortableHeader]'
-})
-export class SortableHeaderDirective {
-
- constructor(
- private icon: IconService,
- private log: LogService
- ) {
- this.log.debug('SortableHeaderDirective constructed');
- }
-
-}
diff --git a/web/gui2/src/main/webapp/app/fw/widget/table.base.ts b/web/gui2/src/main/webapp/app/fw/widget/table.base.ts
deleted file mode 100644
index cc29878..0000000
--- a/web/gui2/src/main/webapp/app/fw/widget/table.base.ts
+++ /dev/null
@@ -1,298 +0,0 @@
-/*
- * 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 { FnService } from '../util/fn.service';
-import { LoadingService } from '../layer/loading.service';
-import { LogService } from '../../log.service';
-import { WebSocketService } from '../remote/websocket.service';
-import { Observable, of } from 'rxjs';
-
-const REFRESH_INTERVAL = 2000;
-const SEARCH_REGEX = '\\W';
-
-/**
- * Model of table annotations within this table base class
- */
-interface TableAnnots {
- noRowsMsg: string;
-}
-
-/**
- * A model of data returned from Web Socket in a TableResponse
- *
- * There is an interface extending from this one in the parent component
- */
-export interface TableResponse {
- annots: any;
- // There will be other parts to the response depending on table type
- // Expect one called tag+'s' e.g. devices or apps
-}
-
-/**
- * A criteria for filtering the tableData
- */
-export interface TableFilter {
- queryStr: string;
- queryBy: string;
- sortBy: string;
-}
-
-/**
- * Enumerated values for the sort dir
- */
-export enum SortDir {
- asc = 'asc', desc = 'desc'
-}
-
-/**
- * A structure to format sort params for table
- * This is sent to WebSocket as part of table request
- */
-export interface SortParams {
- firstCol: string;
- firstDir: SortDir;
- secondCol: string;
- secondDir: SortDir;
-}
-
-export interface PayloadParams {
- devId: string;
-}
-
-
-/**
- * ONOS GUI -- Widget -- Table Base class
- */
-export abstract class TableBaseImpl {
- // attributes from the interface
- protected annots: TableAnnots;
- protected changedData: string[] = [];
- protected payloadParams: PayloadParams;
- protected sortParams: SortParams;
- protected selectCallback; // Function
- protected parentSelCb = null;
- protected responseCallback; // Function
- selId: string = undefined;
- tableData: any[] = [];
- tableDataFilter: TableFilter;
- toggleRefresh; // Function
- autoRefresh: boolean = true;
- autoRefreshTip: string = 'Toggle auto refresh'; // TODO: get LION string
-
- private root: string;
- private req: string;
- private resp: string;
- private refreshPromise: any = null;
- private handlers: string[] = [];
-
- constructor(
- protected fs: FnService,
- protected ls: LoadingService,
- protected log: LogService,
- protected wss: WebSocketService,
- protected tag: string,
- protected idKey: string = 'id',
- protected selCb = () => ({}) // Function
- ) {
- this.root = tag + 's';
- this.req = tag + 'DataRequest';
- this.resp = tag + 'DataResponse';
-
- this.selectCallback = this.rowSelectionCb;
- this.toggleRefresh = () => {
- this.autoRefresh = !this.autoRefresh;
- this.autoRefresh ? this.startRefresh() : this.stopRefresh();
- };
-
- // Mapped to the search and searchBy inputs in template
- // Changes are handled through TableFilterPipe
- this.tableDataFilter = <TableFilter>{
- queryStr: '',
- queryBy: '$',
- };
- }
-
- init() {
- this.wss.bindHandlers(new Map<string, (data) => void>([
- [this.resp, (data) => this.tableDataResponseCb(data)]
- ]));
- this.handlers.push(this.resp);
-
- this.annots = <TableAnnots>{
- noRowsMsg: ''
- };
-
- // Now send the WebSocket request and make it repeat every 2 seconds
- this.requestTableData();
- this.startRefresh();
- this.log.debug('TableBase initialized. Calling ', this.req,
- 'every', REFRESH_INTERVAL, 'ms');
- }
-
- destroy() {
- this.wss.unbindHandlers(this.handlers);
- this.stopRefresh();
- this.ls.stop();
- }
-
- /**
- * A callback that executes when the table data that was requested
- * on WebSocketService arrives.
- *
- * Happens every 2 seconds
- */
- tableDataResponseCb(data: TableResponse) {
- this.ls.stop();
-
- const newTableData: any[] = Array.from(data[this.root]);
- this.annots.noRowsMsg = data.annots.no_rows_msg;
-
- // If the parents onResp() function is set then call it
- if (this.responseCallback) {
- this.responseCallback(data);
- }
- this.changedData = [];
-
- // checks if data changed for row flashing
- if (JSON.stringify(newTableData) !== JSON.stringify(this.tableData)) {
- this.log.debug('table data has changed');
- const oldTableData: any[] = this.tableData;
- this.tableData = [...newTableData]; // ES6 spread syntax
- // only flash the row if the data already exists
- if (oldTableData.length > 0) {
- for (const idx in newTableData) {
- if (!this.fs.containsObj(oldTableData, newTableData[idx])) {
- this.changedData.push(newTableData[idx][this.idKey]);
- }
- }
- }
- }
- }
-
- /**
- * Table Data Request
- * Pass in sort parameters and the set will be returned sorted
- * In the old GUI there was also a query parameter, but this was not
- * implemented on the server end
- */
- requestTableData() {
- const p = Object.assign({}, this.sortParams, this.payloadParams);
-
- // Allow it to sit in pending events
- if (this.wss.isConnected()) {
- if (this.fs.debugOn('table')) {
- this.log.debug('Table data REQUEST:', this.req, p);
- }
- this.wss.sendEvent(this.req, p);
- this.ls.start();
- }
- }
-
- /**
- * Row Selected
- */
- rowSelectionCb(event: any, selRow: any): void {
- const selId: string = selRow[this.idKey];
- this.selId = (this.selId === selId) ? undefined : selId;
- this.log.debug('Row', selId, 'selected');
- if (this.parentSelCb) {
- this.parentSelCb(event, selRow);
- }
- }
-
- /**
- * autoRefresh functions
- */
- startRefresh() {
- this.refreshPromise =
- setInterval(() => {
- if (!this.ls.waiting()) {
- if (this.fs.debugOn('table')) {
- this.log.debug('Refreshing ' + this.root + ' page');
- }
- this.requestTableData();
- }
- }, REFRESH_INTERVAL);
- }
-
- stopRefresh() {
- if (this.refreshPromise) {
- clearInterval(this.refreshPromise);
- this.refreshPromise = null;
- }
- }
-
- isChanged(id: string): boolean {
- return (this.fs.inArray(id, this.changedData) === -1) ? false : true;
- }
-
- /**
- * A dummy implementation of the lionFn until the response is received and the LION
- * bundle is received from the WebSocket
- */
- dummyLion(key: string): string {
- return '%' + key + '%';
- }
-
- /**
- * Change the sort order of the data returned
- *
- * sortParams are passed to the server by WebSocket and the data is
- * returned sorted
- *
- * This is usually assigned to the (click) event on a column, and the column
- * name passed in e.g. (click)="onSort('origin')
- * If the column that is passed in is already the firstCol, then reverse its direction
- * If a new column is passed in, then make the existing col the 2nd sort order
- */
- onSort(colName: string) {
- if (this.sortParams.firstCol === colName) {
- if (this.sortParams.firstDir === SortDir.desc) {
- this.sortParams.firstDir = SortDir.asc;
- return;
- } else {
- this.sortParams.firstDir = SortDir.desc;
- return;
- }
- } else {
- this.sortParams.secondCol = this.sortParams.firstCol;
- this.sortParams.secondDir = this.sortParams.firstDir;
- this.sortParams.firstCol = colName;
- this.sortParams.firstDir = SortDir.desc;
- }
- this.log.debug('Sort params', this.sortParams);
- this.requestTableData();
- }
-
- sortIcon(column: string): string {
- if (this.sortParams.firstCol === column) {
- if (this.sortParams.firstDir === SortDir.asc) {
- return 'upArrow';
- } else {
- return 'downArrow';
- }
- } else {
- return '';
- }
- }
-
- /**
- * De-selects the row
- */
- deselectRow(event) {
- this.log.debug('Details panel close event');
- this.selId = event;
- }
-}
diff --git a/web/gui2/src/main/webapp/app/fw/widget/table.css b/web/gui2/src/main/webapp/app/fw/widget/table.css
deleted file mode 100644
index 1ed43b4..0000000
--- a/web/gui2/src/main/webapp/app/fw/widget/table.css
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright 2015-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.
- */
-
-/* ------ for summary-list tables (layout) ------ */
-
-div.summary-list {
- margin: 0 20px 16px 10px;
- font-size: 10pt;
- border-spacing: 0;
-}
-
-div.summary-list table {
- border-collapse: collapse;
- table-layout: fixed;
- empty-cells: show;
- margin: 0;
-}
-
-div.summary-list div.table-body {
- overflow-y: scroll;
-}
-
-div.summary-list div.table-body::-webkit-scrollbar {
- display: none;
-}
-
-div.summary-list div.table-body tr.no-data td {
- text-align: center;
- font-style: italic;
-}
-
-
-/* highlighting */
-div.summary-list tr {
- transition: background-color 500ms;
-}
-
-div.summary-list td {
- padding: 4px;
- text-align: left;
- word-wrap: break-word;
- font-size: 10pt;
-}
-
-div.summary-list td.table-icon {
- width: 42px;
- padding-top: 4px;
- padding-bottom: 0px;
- padding-left: 4px;
- text-align: center;
-}
-
-div.summary-list .table-header th {
- font-weight: bold;
- font-variant: small-caps;
- text-transform: uppercase;
- font-size: 10pt;
- padding-top: 8px;
- padding-bottom: 8px;
- letter-spacing: 0.02em;
- cursor: pointer;
-}
-
-/* rows are selectable */
-div.summary-list .table-body td {
- cursor: pointer;
-}
-
-/* Tabular view controls */
-
-div.tabular-header .search {
- margin: 0 0 10px 10px;
-}
-
-
-div.tabular-header div.ctrl-btns {
- display: inline-block;
- float: right;
- height: 44px;
- margin-top: 24px;
- margin-right: 20px;
- position: absolute;
- right: 0px;
-}
-
-div.tabular-header div.ctrl-btns div {
- display: inline-block;
- cursor: pointer;
-}
-
-div.tabular-header div.ctrl-btns div.separator {
- width: 0;
- height: 40px;
- padding: 0;
- border-right: 1px solid #c7c7c0;
-}
diff --git a/web/gui2/src/main/webapp/app/fw/widget/table.theme.css b/web/gui2/src/main/webapp/app/fw/widget/table.theme.css
deleted file mode 100644
index 1edfab0..0000000
--- a/web/gui2/src/main/webapp/app/fw/widget/table.theme.css
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Copyright 2016-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.
- */
-
-/* ------ for summary-list tables (theme) ------ */
-
-.light div.summary-list, .table-header th {
- background-color: #e5e5e6;
- color: #3c3a3a;
-}
-
-.light div.summary-list, td {
- color: #3c3a3a;
-}
-
-.light div.summary-list, tr:nth-child(even) {
- background-color: #f4f4f4;
-}
-.light div.summary-list, tr:nth-child(odd) {
- background-color: #fbfbfb;
-}
-
-.light div.summary-list, tr.selected {
- background-color: #dbeffc !important;
-}
-
-
-.light div.summary-list, tr.data-change {
- background-color: #FDFFDC;
-}
-
-/* --- Control Buttons --- */
-
-/* INACTIVE */
-.light .ctrl-btns div svg.embeddedIcon g.icon use {
- fill: #e0dfd6;
-}
-/* note: no change for inactive buttons when hovered */
-
-
-/* ACTIVE */
-.light .ctrl-btns div.active svg.embeddedIcon g.icon use {
- fill: #939598;
-}
-.light .ctrl-btns div.active:hover svg.embeddedIcon g.icon use {
- fill: #ce5b58;
-}
-
-/* CURRENT-VIEW */
-.light .ctrl-btns div.current-view svg.embeddedIcon g.icon rect {
- fill: #518ecc;
-}
-.light .ctrl-btns div.current-view svg.embeddedIcon g.icon use {
- fill: white;
-}
-
-/* REFRESH */
-.light .ctrl-btns div.refresh svg.embeddedIcon g.icon use {
- fill: #cdeff2;
-}
-.light .ctrl-btns div.refresh:hover svg.embeddedIcon g.icon use {
- fill: #ce5b58;
-}
-.light .ctrl-btns div.refresh.active svg.embeddedIcon g.icon use {
- fill: #009fdb;
-}
-.light .ctrl-btns div.refresh.active:hover svg.embeddedIcon g.icon use {
- fill: #ce5b58;
-}
-
-
-/* ========== DARK Theme ========== */
-
-.dark div.summary-list .table-header td {
- background-color: #222222;
- color: #cccccc;
-}
-
-.dark div.summary-list td {
- /* note: don't put background-color here */
- color: #cccccc;
-}
-.dark div.summary-list tr.no-data td {
- background-color: #333333;
-}
-
-.dark div.summary-list tr:nth-child(even) {
- background-color: #333333;
-}
-.dark div.summary-list tr:nth-child(odd) {
- background-color: #3a3a3a;
-}
-
-.dark div.summary-list tr.selected {
- background-color: #304860 !important;
-}
-
-
-.dark div.summary-list tr.data-change {
- background-color: #423708;
-}
-
-/* --- Control Buttons --- */
-
-/* INACTIVE */
-.dark .ctrl-btns div svg.embeddedIcon g.icon use {
- fill: #444444;
-}
-/* note: no change for inactive buttons when hovered */
-
-
-/* ACTIVE */
-.dark .ctrl-btns div.active svg.embeddedIcon g.icon use {
- fill: #939598;
-}
-.dark .ctrl-btns div.active:hover svg.embeddedIcon g.icon use {
- fill: #ce5b58;
-}
-
-/* CURRENT-VIEW */
-.dark .ctrl-btns div.current-view svg.embeddedIcon g.icon rect {
- fill: #518ecc;
-}
-.dark .ctrl-btns div.current-view svg.embeddedIcon g.icon use {
- fill: #dddddd;
-}
-
-/* REFRESH */
-.dark .ctrl-btns div.refresh svg.embeddedIcon g.icon use {
- fill: #364144;
-}
-.dark .ctrl-btns div.refresh:hover svg.embeddedIcon g.icon use {
- fill: #ce5b58;
-}
-.dark .ctrl-btns div.refresh.active svg.embeddedIcon g.icon use {
- fill: #0074a6;
-}
-.dark .ctrl-btns div.refresh.active:hover svg.embeddedIcon g.icon use {
- fill: #ce5b58;
-}
diff --git a/web/gui2/src/main/webapp/app/fw/widget/tablefilter.pipe.spec.ts b/web/gui2/src/main/webapp/app/fw/widget/tablefilter.pipe.spec.ts
deleted file mode 100644
index 8832feb..0000000
--- a/web/gui2/src/main/webapp/app/fw/widget/tablefilter.pipe.spec.ts
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * 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 { TableFilterPipe } from './tablefilter.pipe';
-import { TableFilter } from './table.base';
-
-describe('TableFilterPipe', () => {
-
- const pipe = new TableFilterPipe();
- const items: any[] = new Array();
- // Array item 0
- items.push({
- id: 'abc',
- title: 'def',
- origin: 'ghi'
- });
- // Array item 1
- items.push({
- id: 'pqr',
- title: 'stu',
- origin: 'vwx'
- });
- // Array item 2
- items.push({
- id: 'dog',
- title: 'mouse',
- origin: 'cat'
- });
-
-
- it('create an instance', () => {
- expect(pipe).toBeTruthy();
- });
-
- it('expect it to handle empty search', () => {
- const filteredItems: any[] =
- pipe.transform(items, <TableFilter>{queryStr: '', queryBy: 'title'});
- expect(filteredItems).toEqual(items);
- });
-
- it('expect it to handle empty items', () => {
- const filteredItems: any[] =
- pipe.transform(new Array(), <TableFilter>{queryStr: 'de', queryBy: 'title'});
- expect(filteredItems).toEqual(new Array());
- });
-
-
- it('expect it to match 0 by title', () => {
- const filteredItems: any[] =
- pipe.transform(items, <TableFilter>{queryStr: 'de', queryBy: 'title'});
- expect(filteredItems).toEqual(items.slice(0, 1));
- });
-
- it('expect it to match 1 by title', () => {
- const filteredItems: any[] =
- pipe.transform(items, <TableFilter>{queryStr: 'st', queryBy: 'title'});
- expect(filteredItems).toEqual(items.slice(1, 2));
- });
-
- it('expect it to match 1 by uppercase title', () => {
- const filteredItems: any[] =
- pipe.transform(items, <TableFilter>{queryStr: 'sT', queryBy: 'title'});
- expect(filteredItems).toEqual(items.slice(1, 2));
- });
-
- it('expect it to not match by title', () => {
- const filteredItems: any[] =
- pipe.transform(items, <TableFilter>{queryStr: 'pq', queryBy: 'title'});
- expect(filteredItems.length).toEqual(0);
- });
-
- it('expect it to match 1 by all fields', () => {
- const filteredItems: any[] =
- pipe.transform(items, <TableFilter>{queryStr: 'pq', queryBy: '$'});
- expect(filteredItems).toEqual(items.slice(1, 2));
- });
-
- it('expect it to not match by all fields', () => {
- const filteredItems: any[] =
- pipe.transform(items, <TableFilter>{queryStr: 'yz', queryBy: '$'});
- expect(filteredItems.length).toEqual(0);
- });
-
- /**
- * Check that items one and two contain a 't' - title=stu and origin=cat
- */
- it('expect it to match 1,2 by all fields', () => {
- const filteredItems: any[] =
- pipe.transform(items, <TableFilter>{queryStr: 't', queryBy: '$'});
- expect(filteredItems).toEqual(items.slice(1));
- });
-});
diff --git a/web/gui2/src/main/webapp/app/fw/widget/tablefilter.pipe.ts b/web/gui2/src/main/webapp/app/fw/widget/tablefilter.pipe.ts
deleted file mode 100644
index 5ef048c..0000000
--- a/web/gui2/src/main/webapp/app/fw/widget/tablefilter.pipe.ts
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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 { Pipe, PipeTransform } from '@angular/core';
-import { TableFilter } from './table.base';
-
-/**
- * Only return the tabledata that matches filtering with some queries
- *
- * Note: the pipe is marked pure here as we need to filter on the
- * content of the filter object (it's not a primitive type)
- */
-@Pipe({
- name: 'filter',
- pure: false
-})
-export class TableFilterPipe implements PipeTransform {
-
- /**
- * From an array of table items just return those that match the filter
- */
- transform(items: any[], tableDataFilter: TableFilter): any[] {
- if (!items) {
- return [];
- }
- if (!tableDataFilter.queryStr) {
- return items;
- }
-
- const queryStr = tableDataFilter.queryStr.toLowerCase();
-
- return items.filter( it => {
- if (tableDataFilter.queryBy === '$') {
- const t1 = Object.values(it);
- const t2 = Object.values(it).filter(value => {
- return (<string>value).toLowerCase().includes(queryStr);
- });
- return Object.values(it).filter(value => {
- return (<string>value).toLowerCase().includes(queryStr);
- }).length > 0;
- } else {
- return it[tableDataFilter.queryBy].toLowerCase().includes(queryStr);
- }
- });
- }
-}
diff --git a/web/gui2/src/main/webapp/app/fw/widget/tableresize.directive.ts b/web/gui2/src/main/webapp/app/fw/widget/tableresize.directive.ts
deleted file mode 100644
index 21ff59c..0000000
--- a/web/gui2/src/main/webapp/app/fw/widget/tableresize.directive.ts
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright 2015-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 { AfterContentChecked, Directive, ElementRef, Inject } from '@angular/core';
-import { FnService } from '../util/fn.service';
-import { LogService } from '../../log.service';
-import { MastService } from '../mast/mast.service';
-import { HostListener } from '@angular/core';
-import * as d3 from 'd3';
-
-/**
- * ONOS GUI -- Widget -- Table Resize Directive
- */
-@Directive({
- selector: '[onosTableResize]',
-})
-export class TableResizeDirective implements AfterContentChecked {
-
- pdg = 22;
- tables: any;
-
- constructor(protected fs: FnService,
- protected log: LogService,
- protected mast: MastService,
- protected el: ElementRef,
- @Inject('Window') private w: Window) {
-
- log.info('TableResizeDirective constructed');
- }
-
- ngAfterContentChecked() {
- this.tables = {
- thead: d3.select('div.table-header').select('table'),
- tbody: d3.select('div.table-body').select('table')
- };
- this.windowSize(this.tables);
- }
-
- windowSize(tables: any) {
- const wsz = this.fs.windowSize(0, 30);
- this.adjustTable(tables, wsz.width, wsz.height);
- }
-
- @HostListener('window:resize', ['event'])
- onResize(event: any) {
- this.windowSize(this.tables);
- return {
- h: this.w.innerHeight,
- w: this.w.innerWidth
- };
- }
-
- adjustTable(tables: any, width: number, height: number) {
- this._width(tables.thead, width + 'px');
- this._width(tables.tbody, width + 'px');
-
- this.setHeight(tables.thead, d3.select('div.table-body'), height);
- }
-
- _width(elem, width) {
- elem.style('width', width);
- }
-
- setHeight(thead: any, body: any, height: number) {
- const h = height - (this.mast.mastHeight +
- this.fs.noPxStyle(d3.select('.tabular-header'), 'height') +
- this.fs.noPxStyle(thead, 'height') + this.pdg);
- body.style('height', h + 'px');
- }
-
-}
diff --git a/web/gui2/src/main/webapp/app/fw/widget/toolbar.service.ts b/web/gui2/src/main/webapp/app/fw/widget/toolbar.service.ts
deleted file mode 100644
index 6c1cb94..0000000
--- a/web/gui2/src/main/webapp/app/fw/widget/toolbar.service.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright 2015-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 { Injectable } from '@angular/core';
-
-import { ButtonService } from './button.service';
-import { FnService } from '../util/fn.service';
-import { IconService } from '../svg/icon.service';
-import { LogService } from '../../log.service';
-
-/**
- * ONOS GUI -- Widget -- Toolbar Service
- * TODO: Augment service to allow toolbars to exist on right edge of screen
- * TODO: also - make toolbar more object aware (rows etc.)
- */
-@Injectable()
-export class ToolbarService {
-
- constructor(
- private fs: FnService,
- private bns: ButtonService,
- private is: IconService,
- private log: LogService,
- ) {
- this.log.debug('ToolbarService constructed');
- }
-
-}
diff --git a/web/gui2/src/main/webapp/app/fw/widget/widget.module.ts b/web/gui2/src/main/webapp/app/fw/widget/widget.module.ts
deleted file mode 100644
index b05b76b..0000000
--- a/web/gui2/src/main/webapp/app/fw/widget/widget.module.ts
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright 2015-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 { NgModule } from '@angular/core';
-import { CommonModule } from '@angular/common';
-import { LayerModule } from '../layer/layer.module';
-import { SvgModule } from '../svg/svg.module';
-
-import { ButtonService } from './button.service';
-import { ChartBuilderService } from './chartbuilder.service';
-import { ListService } from './list.service';
-import { ToolbarService } from './toolbar.service';
-import { SortableHeaderDirective } from './sortableheader.directive';
-import { TableResizeDirective } from './tableresize.directive';
-import { FlashChangesDirective } from './flashchanges.directive';
-import { TableFilterPipe } from './tablefilter.pipe';
-
-/**
- * ONOS GUI -- Widgets Module
- */
-@NgModule({
- imports: [
- CommonModule
- // Services have global scope and their modules don't have to be imported again
- // It's enough to import them in the OnosModule
- ],
- declarations: [
- SortableHeaderDirective,
- TableResizeDirective,
- FlashChangesDirective,
- TableFilterPipe
- ],
- exports: [
- TableFilterPipe,
- TableResizeDirective
- ],
- providers: [
- ]
-})
-export class WidgetModule { }
diff --git a/web/gui2/src/main/webapp/app/log.service.ts b/web/gui2/src/main/webapp/app/log.service.ts
deleted file mode 100644
index 2835371..0000000
--- a/web/gui2/src/main/webapp/app/log.service.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 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 { Injectable } from '@angular/core';
-
-export abstract class Logger {
- debug: any;
- info: any;
- warn: any;
- error: any;
-}
-
-/**
- * ONOS GUI -- LogService
- * Inspired by https://robferguson.org/blog/2017/09/09/a-simple-logging-service-for-angular-4/
- */
-@Injectable({
- providedIn: 'root',
-})
-export class LogService extends Logger {
- debug: any;
- info: any;
- warn: any;
- error: any;
-
- invokeConsoleMethod(type: string, args?: any): void {}
-}
diff --git a/web/gui2/src/main/webapp/app/fw/nav/nav/nav.component.css b/web/gui2/src/main/webapp/app/nav/nav.component.css
similarity index 100%
rename from web/gui2/src/main/webapp/app/fw/nav/nav/nav.component.css
rename to web/gui2/src/main/webapp/app/nav/nav.component.css
diff --git a/web/gui2/src/main/webapp/app/fw/nav/nav/nav.component.html b/web/gui2/src/main/webapp/app/nav/nav.component.html
similarity index 100%
rename from web/gui2/src/main/webapp/app/fw/nav/nav/nav.component.html
rename to web/gui2/src/main/webapp/app/nav/nav.component.html
diff --git a/web/gui2/src/main/webapp/app/fw/nav/nav/nav.component.spec.ts b/web/gui2/src/main/webapp/app/nav/nav.component.spec.ts
similarity index 94%
rename from web/gui2/src/main/webapp/app/fw/nav/nav/nav.component.spec.ts
rename to web/gui2/src/main/webapp/app/nav/nav.component.spec.ts
index 1ba29a0..c5e8c35 100644
--- a/web/gui2/src/main/webapp/app/fw/nav/nav/nav.component.spec.ts
+++ b/web/gui2/src/main/webapp/app/nav/nav.component.spec.ts
@@ -20,14 +20,15 @@
import { By } from '@angular/platform-browser';
import { of } from 'rxjs';
-import { ConsoleLoggerService } from '../../../consolelogger.service';
-import { FnService } from '../../util/fn.service';
-import { IconComponent } from '../../svg/icon/icon.component';
-import { IconService } from '../../svg/icon.service';
-import { LionService } from '../../util/lion.service';
-import { LogService } from '../../../log.service';
+import {
+ ConsoleLoggerService,
+ FnService,
+ IconComponent,
+ IconService,
+ LionService,
+ LogService,
+ NavService } from 'gui2-fw-lib';
import { NavComponent } from './nav.component';
-import { NavService } from '../nav.service';
class MockActivatedRoute extends ActivatedRoute {
constructor(params: Params) {
diff --git a/web/gui2/src/main/webapp/app/fw/nav/nav/nav.component.ts b/web/gui2/src/main/webapp/app/nav/nav.component.ts
similarity index 88%
rename from web/gui2/src/main/webapp/app/fw/nav/nav/nav.component.ts
rename to web/gui2/src/main/webapp/app/nav/nav.component.ts
index 7614e67..b543049 100644
--- a/web/gui2/src/main/webapp/app/fw/nav/nav/nav.component.ts
+++ b/web/gui2/src/main/webapp/app/nav/nav.component.ts
@@ -16,12 +16,18 @@
import { Component, OnInit, OnDestroy } from '@angular/core';
import { trigger, state, style, animate, transition } from '@angular/animations';
-import { LionService } from '../../util/lion.service';
-import { LogService } from '../../../log.service';
-import { NavService } from '../nav.service';
+import {
+ LionService,
+ LogService,
+ NavService
+} from 'gui2-fw-lib';
/**
* ONOS GUI -- Navigation Module
+ *
+ * Note: While this NavComponent could arguably be moved to the gui2-fw-lib
+ * it brings problems in recognizing the "routerlink" directives as being part
+ * of this application. So for that reason Nav must remain here for routing to work
*/
@Component({
selector: 'onos-nav',
diff --git a/web/gui2/src/main/webapp/app/fw/nav/nav/nav.theme.css b/web/gui2/src/main/webapp/app/nav/nav.theme.css
similarity index 100%
rename from web/gui2/src/main/webapp/app/fw/nav/nav/nav.theme.css
rename to web/gui2/src/main/webapp/app/nav/nav.theme.css
diff --git a/web/gui2/src/main/webapp/app/onos.component.ts b/web/gui2/src/main/webapp/app/onos.component.ts
index 514fa91..c5f5b3a 100644
--- a/web/gui2/src/main/webapp/app/onos.component.ts
+++ b/web/gui2/src/main/webapp/app/onos.component.ts
@@ -17,15 +17,14 @@
import { Observable, Subscription, fromEvent } from 'rxjs';
import { map, filter } from 'rxjs/operators';
-import { LionService } from './fw/util/lion.service';
-import { LogService } from './log.service';
-import { KeyService } from './fw/util/key.service';
-import { ThemeService } from './fw/util/theme.service';
-import { GlyphService } from './fw/svg/glyph.service';
-import { QuickHelpService } from './fw/layer/quickhelp.service';
-import { EeService } from './fw/util/ee.service';
-import { WebSocketService, WsOptions } from './fw/remote/websocket.service';
-import { SpriteService } from './fw/svg/sprite.service';
+import {
+ LionService,
+ LogService,
+ ThemeService,
+ GlyphService,
+ WebSocketService,
+ WsOptions
+} from 'gui2-fw-lib';
import { OnosService, View } from './onos.service';
// secret sauce
@@ -80,13 +79,9 @@
constructor (
private lion: LionService,
- private ks: KeyService,
private ts: ThemeService,
private gs: GlyphService,
- private qhs: QuickHelpService,
- private ee: EeService,
public wss: WebSocketService,
- private ss: SpriteService,
private log: LogService,
private onos: OnosService
) {
diff --git a/web/gui2/src/main/webapp/app/onos.module.ts b/web/gui2/src/main/webapp/app/onos.module.ts
index b8c609d..576d0f1 100644
--- a/web/gui2/src/main/webapp/app/onos.module.ts
+++ b/web/gui2/src/main/webapp/app/onos.module.ts
@@ -18,18 +18,10 @@
import { HttpClientModule } from '@angular/common/http';
import { NgModule } from '@angular/core';
-import { LayerModule } from './fw/layer/layer.module';
-import { MastModule } from './fw/mast/mast.module';
-import { NavModule } from './fw/nav/nav.module';
-import { SvgModule } from './fw/svg/svg.module';
-import { WidgetModule } from './fw/widget/widget.module';
import { OnosRoutingModule } from './onos-routing.module';
-
+import { NavComponent } from './nav/nav.component';
import { OnosComponent } from './onos.component';
-import { DetectBrowserDirective } from './detectbrowser.directive';
-
-import { ConsoleLoggerService } from './consolelogger.service';
-import { LogService } from './log.service';
+import { Gui2FwLibModule, ConsoleLoggerService, LogService } from 'gui2-fw-lib';
import { OnosService } from './onos.service';
/**
@@ -37,18 +29,14 @@
*/
@NgModule({
declarations: [
- OnosComponent,
- DetectBrowserDirective
+ NavComponent,
+ OnosComponent
],
imports: [
BrowserModule,
BrowserAnimationsModule,
HttpClientModule,
- LayerModule,
- MastModule,
- NavModule,
- SvgModule,
- WidgetModule,
+ Gui2FwLibModule,
OnosRoutingModule
],
providers: [
diff --git a/web/gui2/src/main/webapp/app/onos.service.ts b/web/gui2/src/main/webapp/app/onos.service.ts
index 1100310..b13129b 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 { Injectable } from '@angular/core';
-import { LogService } from './log.service';
+import { LogService } from 'gui2-fw-lib';
/**
* A structure of View elements for the OnosService
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 0e79a2b..464ad3c 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,9 +19,7 @@
import { AppsRoutingModule } from './apps-routing.module';
import { AppsComponent } from './apps/apps.component';
import { AppsDetailsComponent } from './appsdetails/appsdetails.component';
-import { LayerModule } from '../../fw/layer/layer.module';
-import { SvgModule } from '../../fw/svg/svg.module';
-import { WidgetModule } from '../../fw/widget/widget.module';
+import { Gui2FwLibModule } from 'gui2-fw-lib';
/**
* ONOS GUI -- Apps View Module
@@ -34,10 +32,8 @@
imports: [
CommonModule,
AppsRoutingModule,
- SvgModule,
- WidgetModule,
- FormsModule,
- LayerModule
+ Gui2FwLibModule,
+ FormsModule
],
declarations: [
AppsComponent,
diff --git a/web/gui2/src/main/webapp/app/view/apps/apps/apps.component.spec.ts b/web/gui2/src/main/webapp/app/view/apps/apps/apps.component.spec.ts
index e022ebc..f1dfe0d 100644
--- a/web/gui2/src/main/webapp/app/view/apps/apps/apps.component.spec.ts
+++ b/web/gui2/src/main/webapp/app/view/apps/apps/apps.component.spec.ts
@@ -21,22 +21,24 @@
import { By } from '@angular/platform-browser';
import { HttpClient, HttpErrorResponse } from '@angular/common/http';
-import { LogService } from '../../../log.service';
+import {
+ FnService,
+ IconService,
+ LionService,
+ LoadingService,
+ LogService,
+ TableBaseImpl, TableResponse, TableFilter, SortParams, SortDir,
+ UrlFnService,
+ WebSocketService,
+ TableFilterPipe,
+ ConfirmComponent,
+ FlashComponent,
+ IconComponent,
+ ThemeService,
+} from 'gui2-fw-lib';
+
import { AppsComponent } from './apps.component';
import { AppsDetailsComponent } from '../appsdetails/appsdetails.component';
-import { ConfirmComponent } from '../../../fw/layer/confirm/confirm.component';
-import { DialogService } from '../../../fw/layer/dialog.service';
-import { FlashComponent } from '../../../fw/layer/flash/flash.component';
-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 } from 'rxjs';
import { } from 'jasmine';
@@ -47,8 +49,6 @@
}
}
-class MockDialogService { }
-
class MockFnService { }
class MockHttpClient {}
@@ -57,8 +57,6 @@
loadIconDef() { }
}
-class MockKeyService { }
-
class MockLoadingService {
startAnim() { }
stop() { }
@@ -123,11 +121,9 @@
FlashComponent
],
providers: [
- { provide: DialogService, useClass: MockDialogService },
{ provide: FnService, useValue: fs },
{ provide: HttpClient, useClass: MockHttpClient },
{ provide: IconService, useClass: MockIconService },
- { provide: KeyService, useClass: MockKeyService },
{
provide: LionService, useFactory: (() => {
return {
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 3a8e2a8..c933053 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
@@ -16,17 +16,17 @@
import { Component, OnInit, OnDestroy, Inject } from '@angular/core';
import { HttpClient, HttpErrorResponse } from '@angular/common/http';
-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 { LionService } from '../../../fw/util/lion.service';
-import { LoadingService } from '../../../fw/layer/loading.service';
-import { LogService } from '../../../log.service';
-import { TableBaseImpl, TableResponse, TableFilter, SortParams, SortDir } from '../../../fw/widget/table.base';
-import { UrlFnService } from '../../../fw/remote/urlfn.service';
-import { WebSocketService } from '../../../fw/remote/websocket.service';
-import { TableFilterPipe } from '../../../fw/widget/tablefilter.pipe';
+import {
+ FnService,
+ IconService,
+ LionService,
+ LoadingService,
+ LogService,
+ TableBaseImpl, TableResponse, TableFilter, SortParams, SortDir,
+ UrlFnService,
+ WebSocketService,
+ TableFilterPipe
+} from 'gui2-fw-lib';
const INSTALLED = 'INSTALLED';
const ACTIVE = 'ACTIVE';
@@ -131,9 +131,7 @@
constructor(
protected fs: FnService,
- private ds: DialogService,
private is: IconService,
- private ks: KeyService,
private lion: LionService,
protected ls: LoadingService,
protected log: LogService,
diff --git a/web/gui2/src/main/webapp/app/view/apps/appsdetails/appsdetails.component.spec.ts b/web/gui2/src/main/webapp/app/view/apps/appsdetails/appsdetails.component.spec.ts
index 75f5f8e..ed45a02 100644
--- a/web/gui2/src/main/webapp/app/view/apps/appsdetails/appsdetails.component.spec.ts
+++ b/web/gui2/src/main/webapp/app/view/apps/appsdetails/appsdetails.component.spec.ts
@@ -19,14 +19,18 @@
import { DebugElement } from '@angular/core';
import { By } from '@angular/platform-browser';
-import { LogService } from '../../../log.service';
+import {
+ FnService,
+ IconService,
+ LionService,
+ LogService,
+ UrlFnService,
+ WebSocketService,
+ TableFilterPipe,
+ IconComponent
+} from 'gui2-fw-lib';
+
import { AppsDetailsComponent } from './appsdetails.component';
-import { FnService } from '../../../fw/util/fn.service';
-import { IconComponent } from '../../../fw/svg/icon/icon.component';
-import { IconService } from '../../../fw/svg/icon.service';
-import { LionService } from '../../../fw/util/lion.service';
-import { UrlFnService } from '../../../fw/remote/urlfn.service';
-import { WebSocketService } from '../../../fw/remote/websocket.service';
import { of } from 'rxjs';
class MockActivatedRoute extends ActivatedRoute {
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 c0d2e02..d01d409 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
@@ -15,14 +15,15 @@
*/
import { Component, Input, OnInit, OnDestroy, OnChanges } from '@angular/core';
import { trigger, state, style, animate, transition } from '@angular/animations';
+import {
+ FnService,
+ LionService,
+ LoadingService,
+ LogService,
+ DetailsPanelBaseImpl,
+ WebSocketService
+} from 'gui2-fw-lib';
-import { FnService } from '../../../fw/util/fn.service';
-import { LionService } from '../../../fw/util/lion.service';
-import { LoadingService } from '../../../fw/layer/loading.service';
-import { LogService } from '../../../log.service';
-import { WebSocketService } from '../../../fw/remote/websocket.service';
-
-import { DetailsPanelBaseImpl } from '../../../fw/widget/detailspanel.base';
import { App, APPURLPREFIX, ICONURLSUFFIX } from '../apps/apps.component';
/**
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 9aa2eb7..c796962 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
@@ -14,16 +14,18 @@
* limitations under the License.
*/
import {Directive, ElementRef, EventEmitter, Inject, Input, OnChanges, OnDestroy, OnInit, Output} from '@angular/core';
-import {FnService} from '../../fw/util/fn.service';
-import {LogService} from '../../log.service';
-import {MastService} from '../../fw/mast/mast.service';
-import {DetailsPanelBaseImpl} from '../../fw/widget/detailspanel.base';
-import {LoadingService} from '../../fw/layer/loading.service';
-import {IconService} from '../../fw/svg/icon.service';
-import {LionService} from '../../fw/util/lion.service';
-import {WebSocketService} from '../../fw/remote/websocket.service';
+import {
+ FnService,
+ LogService,
+ MastService,
+ DetailsPanelBaseImpl,
+ LoadingService,
+ IconService,
+ LionService,
+ PanelService,
+ WebSocketService
+} from 'gui2-fw-lib';
import * as d3 from 'd3';
-import {PanelService} from '../../fw/layer/panel.service';
import {HostListener} from '@angular/core';
// internal state
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 d5da0bf..2ffb801 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
@@ -13,20 +13,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import {NgModule} from '@angular/core';
-import {CommonModule} from '@angular/common';
-import {SvgModule} from '../../fw/svg/svg.module';
-import {WidgetModule} from '../../fw/widget/widget.module';
-import {ClusterComponent} from './cluster/cluster.component';
-import {ClusterRoutingModule} from './cluster-routing.module';
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { Gui2FwLibModule } from 'gui2-fw-lib';
+import { ClusterComponent } from './cluster/cluster.component';
+import { ClusterRoutingModule } from './cluster-routing.module';
import { ClusterDetailsDirective } from './cluster-details.directive';
@NgModule({
imports: [
CommonModule,
- SvgModule,
- ClusterRoutingModule,
- WidgetModule
+ Gui2FwLibModule,
+ ClusterRoutingModule
],
declarations: [ClusterComponent, ClusterDetailsDirective]
})
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 f0b4908..4756b4e 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
@@ -16,22 +16,26 @@
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
import {ClusterComponent} from './cluster.component';
-import {FnService} from '../../../fw/util/fn.service';
-import {LogService} from '../../../log.service';
+
+import {
+ FnService,
+ LoadingService,
+ LogService,
+ WebSocketService,
+ IconComponent,
+ IconService,
+ GlyphService,
+ MastService,
+ NavService,
+ ThemeService,
+
+} from 'gui2-fw-lib';
+
import {ActivatedRoute, Params} from '@angular/router';
import {of} from 'rxjs/index';
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 {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 {WebSocketService} from '../../../fw/remote/websocket.service';
-import {ThemeService} from '../../../fw/util/theme.service';
import {DebugElement} from '@angular/core';
import {By} from '@angular/platform-browser';
@@ -50,9 +54,6 @@
class MockGlyphService {
}
-class MockKeyService {
-}
-
class MockLoadingService {
startAnim() {
}
@@ -120,7 +121,6 @@
{provide: FnService, useValue: fs},
{provide: IconService, useClass: MockIconService},
{provide: GlyphService, useClass: MockGlyphService},
- {provide: KeyService, useClass: MockKeyService},
{provide: LoadingService, useClass: MockLoadingService},
{provide: MastService, useClass: MockMastService},
{provide: NavService, useClass: MockNavService},
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 1181a17..f72b1d0 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
@@ -14,12 +14,14 @@
* limitations under the License.
*/
import {Component, OnDestroy, OnInit} from '@angular/core';
-import {SortDir, TableBaseImpl, TableResponse} from '../../../fw/widget/table.base';
-import {FnService} from '../../../fw/util/fn.service';
-import {LoadingService} from '../../../fw/layer/loading.service';
-import {LogService} from '../../../log.service';
-import {WebSocketService} from '../../../fw/remote/websocket.service';
-import {LionService} from '../../../fw/util/lion.service';
+import {
+ FnService,
+ LoadingService,
+ LogService,
+ WebSocketService,
+ LionService,
+ SortDir, TableBaseImpl, TableResponse
+} from 'gui2-fw-lib';
/**
* Model of the response from WebSocket
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 9ad5456..94e717d 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
@@ -17,8 +17,7 @@
import { CommonModule } from '@angular/common';
import { DeviceRoutingModule } from './device-routing.module';
import { DeviceComponent } from './device/device.component';
-import { SvgModule } from '../../fw/svg/svg.module';
-import { WidgetModule } from '../../fw/widget/widget.module';
+import { Gui2FwLibModule } from 'gui2-fw-lib';
import { FormsModule } from '@angular/forms';
import { DeviceDetailsComponent } from './devicedetails/devicedetails.component';
@@ -29,8 +28,7 @@
imports: [
CommonModule,
DeviceRoutingModule,
- SvgModule,
- WidgetModule,
+ Gui2FwLibModule,
FormsModule
],
declarations: [
diff --git a/web/gui2/src/main/webapp/app/view/device/device/device.component.spec.ts b/web/gui2/src/main/webapp/app/view/device/device/device.component.spec.ts
index 207dde9..44bb0c3 100644
--- a/web/gui2/src/main/webapp/app/view/device/device/device.component.spec.ts
+++ b/web/gui2/src/main/webapp/app/view/device/device/device.component.spec.ts
@@ -17,21 +17,22 @@
import { ActivatedRoute, Params } from '@angular/router';
import { DebugElement } from '@angular/core';
import { By } from '@angular/platform-browser';
-import { LogService } from '../../../log.service';
import { DeviceComponent } from './device.component';
import { } from 'jasmine';
-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 {
+ FnService,
+ IconService,
+ GlyphService,
+ IconComponent,
+ LoadingService,
+ LogService,
+ NavService,
+ MastService,
+ TableFilterPipe,
+ ThemeService,
+ WebSocketService
+} from 'gui2-fw-lib';
import { of } from 'rxjs';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { FormsModule } from '@angular/forms';
@@ -51,8 +52,6 @@
class MockGlyphService { }
-class MockKeyService { }
-
class MockLoadingService {
startAnim() { }
stop() { }
@@ -106,7 +105,6 @@
{ provide: FnService, useValue: fs },
{ provide: IconService, useClass: MockIconService },
{ provide: GlyphService, useClass: MockGlyphService },
- { provide: KeyService, useClass: MockKeyService },
{ provide: LoadingService, useClass: MockLoadingService },
{ provide: MastService, useClass: MockMastService },
{ provide: NavService, useClass: MockNavService },
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 b6f1d95..e5b40c3 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
@@ -14,11 +14,16 @@
* limitations under the License.
*/
import { Component, OnInit, OnDestroy} from '@angular/core';
-import { FnService } from '../../../fw/util/fn.service';
-import { LoadingService } from '../../../fw/layer/loading.service';
-import { LogService } from '../../../log.service';
-import { TableBaseImpl, TableResponse, SortDir } from '../../../fw/widget/table.base';
-import { WebSocketService } from '../../../fw/remote/websocket.service';
+
+import {
+ FnService,
+ LoadingService,
+ LogService,
+ WebSocketService,
+ LionService,
+ SortDir, TableBaseImpl, TableResponse
+} from 'gui2-fw-lib';
+
import { ActivatedRoute, Router } from '@angular/router';
/**
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
index 5daa2ef..d169f34 100644
--- 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
@@ -17,15 +17,18 @@
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 {
+ FnService,
+ IconService,
+ LogService,
+ WebSocketService,
+ IconComponent
+} from 'gui2-fw-lib';
+
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) {
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 9e30eb7..b81b68f 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
@@ -15,14 +15,15 @@
*/
import { Component, Input, OnInit, OnDestroy, OnChanges } from '@angular/core';
import { trigger, state, style, animate, transition } from '@angular/animations';
-
-import { FnService } from '../../../fw/util/fn.service';
-import { LoadingService } from '../../../fw/layer/loading.service';
-import { LogService } from '../../../log.service';
-import { WebSocketService } from '../../../fw/remote/websocket.service';
-
-import { DetailsPanelBaseImpl } from '../../../fw/widget/detailspanel.base';
-import { IconService } from '../../../fw/svg/icon.service';
+import {
+ FnService,
+ IconService,
+ LionService,
+ LoadingService,
+ LogService,
+ DetailsPanelBaseImpl,
+ WebSocketService
+} from 'gui2-fw-lib';
/**
* The details view when a device row is clicked from the Device view
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 55d3c96..ee03a8d 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,8 +16,7 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FlowComponent } from './flow/flow.component';
-import { SvgModule } from '../../fw/svg/svg.module';
-import { WidgetModule } from '../../fw/widget/widget.module';
+import { Gui2FwLibModule } from 'gui2-fw-lib';
import { FlowRoutingModule } from './flow-routing.module';
import { FormsModule } from '@angular/forms';
import { FlowDetailsComponent } from './flowdetails/flowdetails/flowdetails.component';
@@ -28,10 +27,9 @@
@NgModule({
imports: [
CommonModule,
- SvgModule,
+ Gui2FwLibModule,
FlowRoutingModule,
- FormsModule,
- WidgetModule
+ FormsModule
],
declarations: [
FlowComponent,
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
index e6ed12a..e049fcf 100644
--- 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
@@ -18,24 +18,26 @@
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 {
+ FnService,
+ IconService,
+ GlyphService,
+ IconComponent,
+ LionService,
+ LoadingService,
+ LogService,
+ NavService,
+ MastService,
+ TableFilterPipe,
+ ThemeService,
+ WebSocketService
+} from 'gui2-fw-lib';
+
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 {
@@ -51,8 +53,6 @@
class MockGlyphService { }
-class MockKeyService { }
-
class MockLoadingService {
startAnim() { }
stop() { }
@@ -116,7 +116,6 @@
{ provide: FnService, useValue: fs },
{ provide: IconService, useClass: MockIconService },
{ provide: GlyphService, useClass: MockGlyphService },
- { provide: KeyService, useClass: MockKeyService },
{
provide: LionService, useFactory: (() => {
return {
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 96692a4..7a6c892 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
@@ -15,14 +15,15 @@
*/
import { Component, OnDestroy, OnInit } from '@angular/core';
-import { SortDir, TableBaseImpl, TableResponse } from '../../../fw/widget/table.base';
-import { WebSocketService } from '../../../fw/remote/websocket.service';
-import { LogService } from '../../../log.service';
-import { LoadingService } from '../../../fw/layer/loading.service';
-import { FnService } from '../../../fw/util/fn.service';
+import {
+ FnService,
+ LoadingService,
+ LogService,
+ WebSocketService,
+ LionService,
+ SortDir, TableBaseImpl, TableResponse
+} from 'gui2-fw-lib';
import { ActivatedRoute } from '@angular/router';
-import { LionService } from '../../../fw/util/lion.service';
-
/**
* Model of the response from WebSocket
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
index 8bbf482..b7da3cf 100644
--- 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
@@ -18,11 +18,13 @@
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 {
+ FnService,
+ IconService,
+ LogService,
+ WebSocketService,
+ IconComponent
+} from 'gui2-fw-lib';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { DebugElement } from '@angular/core';
import { By } from '@angular/platform-browser';
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 3197285..36d1b34 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
@@ -14,12 +14,15 @@
* limitations under the License.
*/
import { Component, OnInit, OnDestroy, OnChanges, Input, Output, EventEmitter } from '@angular/core';
-import { DetailsPanelBaseImpl } from '../../../../fw/widget/detailspanel.base';
-import { FnService } from '../../../../fw/util/fn.service';
-import { LoadingService } from '../../../../fw/layer/loading.service';
-import { LogService } from '../../../../log.service';
-import { WebSocketService } from '../../../../fw/remote/websocket.service';
-import { LionService } from '../../../../fw/util/lion.service';
+import {
+ FnService,
+ IconService,
+ LionService,
+ LoadingService,
+ LogService,
+ DetailsPanelBaseImpl,
+ WebSocketService
+} from 'gui2-fw-lib';
import { trigger, state, style, transition, animate } from '@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 343a971..ad876ee 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
@@ -18,8 +18,7 @@
import { GroupRoutingModule } from './group-routing.module';
import { GroupComponent } from './group/group.component';
-import { SvgModule } from '../../fw/svg/svg.module';
-import { WidgetModule } from '../../fw/widget/widget.module';
+import { Gui2FwLibModule } from 'gui2-fw-lib';
import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
@@ -27,8 +26,7 @@
imports: [
CommonModule,
GroupRoutingModule,
- SvgModule,
- WidgetModule,
+ Gui2FwLibModule,
FormsModule,
RouterModule
],
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
index bcf0ca2..2b0e4e6 100644
--- 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
@@ -16,22 +16,25 @@
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 {
+ ConsoleLoggerService,
+ FnService,
+ IconService,
+ GlyphService,
+ IconComponent,
+ LoadingService,
+ LogService,
+ NavService,
+ MastService,
+ TableFilterPipe,
+ ThemeService,
+ UrlFnService,
+ WebSocketService
+} from 'gui2-fw-lib';
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';
@@ -43,16 +46,12 @@
}
}
-class MockDialogService { }
-
class MockFnService { }
class MockIconService {
loadIconDef() { }
}
-class MockKeyService { }
-
class MockLoadingService {
startAnim() { }
stop() { }
@@ -111,10 +110,8 @@
imports: [BrowserAnimationsModule, FormsModule, RouterTestingModule],
declarations: [GroupComponent, IconComponent, TableFilterPipe],
providers: [
- { provide: DialogService, useClass: MockDialogService },
{ provide: FnService, useValue: fs },
{ provide: IconService, useClass: MockIconService },
- { provide: KeyService, useClass: MockKeyService },
{ provide: LoadingService, useClass: MockLoadingService },
{ provide: LogService, useValue: log },
{ provide: ThemeService, useClass: MockThemeService },
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 fc6e9bd..c7fa497 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
@@ -14,12 +14,15 @@
* limitations under the License.
*/
import { Component, OnInit, OnDestroy } from '@angular/core';
-import { LogService } from '../../../log.service';
-import { FnService } from '../../../fw/util/fn.service';
-import { LoadingService } from '../../../fw/layer/loading.service';
-import { WebSocketService } from '../../../fw/remote/websocket.service';
+import {
+ FnService,
+ LoadingService,
+ LogService,
+ WebSocketService,
+ LionService,
+ SortDir, TableBaseImpl, TableResponse
+} from 'gui2-fw-lib';
import { ActivatedRoute } from '@angular/router';
-import { TableResponse, TableBaseImpl, SortDir } from '../../../fw/widget/table.base';
/**
* Model of the response from WebSocket
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 93d0a59..2bb8321 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
@@ -18,16 +18,14 @@
import { HostRoutingModule } from './host-routing.module';
import { HostComponent } from './host/host.component';
-import { SvgModule } from '../../fw/svg/svg.module';
-import { WidgetModule } from '../../fw/widget/widget.module';
+import { Gui2FwLibModule } from 'gui2-fw-lib';
import { HostDetailsComponent } from './hostdetails/hostdetails.component';
@NgModule({
imports: [
CommonModule,
HostRoutingModule,
- WidgetModule,
- SvgModule
+ Gui2FwLibModule
],
declarations: [HostComponent, HostDetailsComponent]
})
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
index 6d915c7..d482cb2 100644
--- 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
@@ -19,20 +19,22 @@
import { FormsModule } from '@angular/forms';
import { DebugElement } from '@angular/core';
import { By } from '@angular/platform-browser';
-
-import { LogService } from '../../../log.service';
+import {
+ FnService,
+ IconService,
+ GlyphService,
+ IconComponent,
+ LoadingService,
+ LogService,
+ NavService,
+ MastService,
+ TableFilterPipe,
+ ThemeService,
+ UrlFnService,
+ WebSocketService
+} from 'gui2-fw-lib';
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';
@@ -43,16 +45,12 @@
}
}
-class MockDialogService { }
-
class MockFnService { }
class MockIconService {
loadIconDef() { }
}
-class MockKeyService { }
-
class MockLoadingService {
startAnim() { }
stop() { }
@@ -110,10 +108,8 @@
imports: [BrowserAnimationsModule, FormsModule],
declarations: [HostComponent, HostDetailsComponent, IconComponent, TableFilterPipe],
providers: [
- { provide: DialogService, useClass: MockDialogService },
{ provide: FnService, useValue: fs },
{ provide: IconService, useClass: MockIconService },
- { provide: KeyService, useClass: MockKeyService },
{ provide: LoadingService, useClass: MockLoadingService },
{ provide: LogService, useValue: logSpy },
{ provide: ThemeService, useClass: MockThemeService },
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 c13e2f5..3ea91c7 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
@@ -14,11 +14,13 @@
* limitations under the License.
*/
import { Component, OnInit, OnDestroy } from '@angular/core';
-import { FnService } from '../../../fw/util/fn.service';
-import { LoadingService } from '../../../fw/layer/loading.service';
-import { LogService } from '../../../log.service';
-import { TableBaseImpl, TableResponse, SortDir } from '../../../fw/widget/table.base';
-import { WebSocketService } from '../../../fw/remote/websocket.service';
+import {
+ FnService,
+ LoadingService,
+ LogService,
+ WebSocketService,
+ SortDir, TableBaseImpl, TableResponse
+} from 'gui2-fw-lib';
interface HostTableResponse extends TableResponse {
hosts: Host[];
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
index 0ce1ba0..2526c47 100644
--- 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
@@ -18,13 +18,14 @@
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 {
+ FnService,
+ IconService,
+ LogService,
+ UrlFnService,
+ WebSocketService,
+ IconComponent
+} from 'gui2-fw-lib';
import { of } from 'rxjs';
import { } from 'jasmine';
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 7d1132d..18cf106 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
@@ -16,13 +16,13 @@
import { Component, Input, OnInit, OnDestroy, OnChanges } from '@angular/core';
import { trigger, state, style, animate, transition } from '@angular/animations';
-
-import { FnService } from '../../../fw/util/fn.service';
-import { LoadingService } from '../../../fw/layer/loading.service';
-import { LogService } from '../../../log.service';
-import { WebSocketService } from '../../../fw/remote/websocket.service';
-
-import { DetailsPanelBaseImpl } from '../../../fw/widget/detailspanel.base';
+import {
+ FnService,
+ LoadingService,
+ LogService,
+ DetailsPanelBaseImpl,
+ WebSocketService
+} from 'gui2-fw-lib';
/**
* The details view when a host row is clicked from the Host view
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 b5d6e64..d935e08 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
@@ -18,19 +18,15 @@
import { IntentRoutingModule } from './intent-routing.module';
import { IntentComponent } from './intent/intent.component';
-import { SvgModule } from '../../fw/svg/svg.module';
-import { WidgetModule } from '../../fw/widget/widget.module';
+import { Gui2FwLibModule } from 'gui2-fw-lib';
import { RouterModule } from '@angular/router';
-import { LayerModule } from '../../fw/layer/layer.module';
@NgModule({
imports: [
CommonModule,
- SvgModule,
- WidgetModule,
+ Gui2FwLibModule,
RouterModule,
IntentRoutingModule,
- LayerModule
],
declarations: [IntentComponent],
exports: [IntentComponent]
diff --git a/web/gui2/src/main/webapp/app/view/intent/intent/intent.component.spec.ts b/web/gui2/src/main/webapp/app/view/intent/intent/intent.component.spec.ts
index b32538b..9a0a082 100644
--- a/web/gui2/src/main/webapp/app/view/intent/intent/intent.component.spec.ts
+++ b/web/gui2/src/main/webapp/app/view/intent/intent/intent.component.spec.ts
@@ -19,16 +19,18 @@
import { FormsModule } from '@angular/forms';
import { DebugElement } from '@angular/core';
import { By } from '@angular/platform-browser';
-import { ConfirmComponent } from '../../../fw/layer/confirm/confirm.component';
-import { FlashComponent } from '../../../fw/layer/flash/flash.component';
+import {
+ FnService,
+ IconService,
+ IconComponent,
+ ConfirmComponent,
+ FlashComponent,
+ LoadingService,
+ LogService,
+ TableFilterPipe,
+ WebSocketService
+} from 'gui2-fw-lib';
-import { LogService } from '../../../log.service';
-import { FnService } from '../../../fw/util/fn.service';
-import { IconComponent } from '../../../fw/svg/icon/icon.component';
-import { IconService } from '../../../fw/svg/icon.service';
-import { LoadingService } from '../../../fw/layer/loading.service';
-import { TableFilterPipe } from '../../../fw/widget/tablefilter.pipe';
-import { WebSocketService } from '../../../fw/remote/websocket.service';
import { of } from 'rxjs';
import { } from 'jasmine';
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 df94ed1..6719564 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
@@ -14,12 +14,13 @@
* limitations under the License.
*/
import { Component, OnInit, OnDestroy } from '@angular/core';
-import { LogService } from '../../../log.service';
-import { FnService } from '../../../fw/util/fn.service';
-import { LoadingService } from '../../../fw/layer/loading.service';
-import { DialogService } from '../../../fw/layer/dialog.service';
-import { WebSocketService } from '../../../fw/remote/websocket.service';
-import { TableResponse, TableBaseImpl, SortDir } from '../../../fw/widget/table.base';
+import {
+ FnService,
+ LoadingService,
+ LogService,
+ WebSocketService,
+ SortDir, TableBaseImpl, TableResponse
+} from 'gui2-fw-lib';
const RESUBMITINTENT = 'resubmitIntent';
const REMOVEINTENT = 'removeIntent';
@@ -87,7 +88,6 @@
constructor(
protected log: LogService,
protected fs: FnService,
- private ds: DialogService,
protected ls: LoadingService,
protected wss: WebSocketService,
) {
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 92276b0..0cf2cc2 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,16 +16,14 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { LinkComponent } from './link/link.component';
-import { SvgModule } from '../../fw/svg/svg.module';
+import { Gui2FwLibModule } from 'gui2-fw-lib';
import { LinkRoutingModule } from './link-routing.module';
-import { WidgetModule } from '../../fw/widget/widget.module';
@NgModule({
imports: [
CommonModule,
LinkRoutingModule,
- SvgModule,
- WidgetModule
+ Gui2FwLibModule
],
declarations: [
LinkComponent
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
index 699e535..c50ed46 100644
--- 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
@@ -18,12 +18,14 @@
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 {
+ FnService,
+ IconService,
+ IconComponent,
+ LoadingService,
+ LogService,
+ WebSocketService
+} from 'gui2-fw-lib';
import { DebugElement } from '@angular/core';
import { By } from '@angular/platform-browser';
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 eeb7c33..3e0b21f 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
@@ -14,11 +14,13 @@
* limitations under the License.
*/
import { Component, OnInit, OnDestroy } from '@angular/core';
-import { LogService } from '../../../log.service';
-import { TableBaseImpl, TableResponse, SortDir } from '../../../fw/widget/table.base';
-import { FnService } from '../../../fw/util/fn.service';
-import { LoadingService } from '../../../fw/layer/loading.service';
-import { WebSocketService } from '../../../fw/remote/websocket.service';
+import {
+ FnService,
+ LoadingService,
+ LogService,
+ WebSocketService,
+ SortDir, TableBaseImpl, TableResponse
+} from 'gui2-fw-lib';
/**
* Model of the response from WebSocket
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 90263b2..cd90d85 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,9 +15,7 @@
*/
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
-import { SvgModule } from '../../fw/svg/svg.module';
-import { WidgetModule } from '../../fw/widget/widget.module';
-
+import { Gui2FwLibModule } from 'gui2-fw-lib';
import { MeterRoutingModule } from './meter-routing.module';
import { MeterComponent } from './meter/meter.component';
@@ -27,10 +25,9 @@
@NgModule({
imports: [
CommonModule,
- SvgModule,
+ Gui2FwLibModule,
MeterRoutingModule,
- FormsModule,
- WidgetModule
+ FormsModule
],
declarations: [MeterComponent]
})
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 e17ff50..1337cb8 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
@@ -20,18 +20,21 @@
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 {
+ FnService,
+ IconService,
+ GlyphService,
+ IconComponent,
+ LionService,
+ LoadingService,
+ LogService,
+ NavService,
+ MastService,
+ TableFilterPipe,
+ ThemeService,
+ UrlFnService,
+ WebSocketService
+} from 'gui2-fw-lib';
import { of, Subject } from 'rxjs';
import { } from 'jasmine';
import { RouterTestingModule } from '@angular/router/testing';
@@ -45,16 +48,12 @@
}
-class MockDialogService { }
-
class MockFnService { }
class MockIconService {
loadIconDef() { }
}
-class MockKeyService { }
-
class MockLoadingService {
startAnim() { }
stop() { }
@@ -120,10 +119,8 @@
imports: [BrowserAnimationsModule, FormsModule, RouterTestingModule],
declarations: [MeterComponent, IconComponent, TableFilterPipe],
providers: [
- { provide: DialogService, useClass: MockDialogService },
{ provide: FnService, useValue: fs },
{ provide: IconService, useClass: MockIconService },
- { provide: KeyService, useClass: MockKeyService },
{
provide: LionService, useFactory: (() => {
return {
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 e026e1c..b534c0a 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
@@ -14,11 +14,13 @@
* limitations under the License.
*/
import { Component, OnDestroy, OnInit } from '@angular/core';
-import { SortDir, TableBaseImpl, TableResponse } from '../../../fw/widget/table.base';
-import { WebSocketService } from '../../../fw/remote/websocket.service';
-import { LogService } from '../../../log.service';
-import { LoadingService } from '../../../fw/layer/loading.service';
-import { FnService } from '../../../fw/util/fn.service';
+import {
+ FnService,
+ LoadingService,
+ LogService,
+ WebSocketService,
+ SortDir, TableBaseImpl, TableResponse
+} from 'gui2-fw-lib';
import { ActivatedRoute } from '@angular/router';
/**
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 69e9832..2e79afc 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,8 +15,7 @@
*/
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
-import { SvgModule } from '../../fw/svg/svg.module';
-import { WidgetModule } from '../../fw/widget/widget.module';
+import { Gui2FwLibModule } from 'gui2-fw-lib';
import { PartitionRoutingModule } from './partition-routing.module';
import { PartitionComponent } from './partition/partition.component';
@@ -24,8 +23,7 @@
@NgModule({
imports: [
CommonModule,
- SvgModule,
- WidgetModule,
+ Gui2FwLibModule,
PartitionRoutingModule
],
declarations: [PartitionComponent]
diff --git a/web/gui2/src/main/webapp/app/view/partition/partition/partition.component.spec.ts b/web/gui2/src/main/webapp/app/view/partition/partition/partition.component.spec.ts
index ed9697e..ff43f9e 100644
--- a/web/gui2/src/main/webapp/app/view/partition/partition/partition.component.spec.ts
+++ b/web/gui2/src/main/webapp/app/view/partition/partition/partition.component.spec.ts
@@ -17,12 +17,14 @@
import { ActivatedRoute, Params } from '@angular/router';
import { DebugElement } from '@angular/core';
import { By } from '@angular/platform-browser';
-import { LogService } from '../../../log.service';
-import { FnService } from '../../../fw/util/fn.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 {
+ FnService,
+ IconService,
+ IconComponent,
+ LoadingService,
+ LogService,
+ WebSocketService
+} from 'gui2-fw-lib';
import { of } from 'rxjs';
import { } from 'jasmine';
import { RouterTestingModule } from '@angular/router/testing';
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 552574f..aec5e85 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
@@ -14,11 +14,13 @@
* limitations under the License.
*/
import { Component, OnDestroy, OnInit } from '@angular/core';
-import { TableBaseImpl, SortDir } from '../../../fw/widget/table.base';
-import { WebSocketService } from '../../../fw/remote/websocket.service';
-import { LogService } from '../../../log.service';
-import { LoadingService } from '../../../fw/layer/loading.service';
-import { FnService } from '../../../fw/util/fn.service';
+import {
+ FnService,
+ LoadingService,
+ LogService,
+ WebSocketService,
+ SortDir, TableBaseImpl, TableResponse
+} from 'gui2-fw-lib';
import { ActivatedRoute } from '@angular/router';
/**
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 dd622dc..105312c 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,19 +16,17 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { PortComponent } from './port/port.component';
-import { SvgModule } from '../../fw/svg/svg.module';
+import { Gui2FwLibModule } from 'gui2-fw-lib';
import { FormsModule } from '@angular/forms';
-import { WidgetModule } from '../../fw/widget/widget.module';
import { PortRoutingModule } from './port-routing.module';
import { PortDetailsComponent } from './portdetails/portdetails.component';
@NgModule({
imports: [
CommonModule,
- SvgModule,
+ Gui2FwLibModule,
PortRoutingModule,
- FormsModule,
- WidgetModule
+ FormsModule
],
declarations: [PortComponent, PortDetailsComponent]
})
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
index 233b34e..a53bd1c 100644
--- 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
@@ -19,25 +19,26 @@
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 {
+ FnService,
+ IconService,
+ GlyphService,
+ IconComponent,
+ LoadingService,
+ LogService,
+ NavService,
+ MastService,
+ PrefsService,
+ TableFilterPipe,
+ ThemeService,
+ WebSocketService
+} from 'gui2-fw-lib';
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();
@@ -58,8 +59,6 @@
class MockGlyphService { }
-class MockKeyService { }
-
class MockLoadingService {
startAnim() { }
stop() { }
@@ -116,7 +115,6 @@
{ provide: FnService, useValue: fs },
{ provide: IconService, useClass: MockIconService },
{ provide: GlyphService, useClass: MockGlyphService },
- { provide: KeyService, useClass: MockKeyService },
{ provide: LoadingService, useClass: MockLoadingService },
{ provide: MastService, useClass: MockMastService },
{ provide: NavService, useClass: MockNavService },
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 1c86c9c..0dcd114 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
@@ -14,13 +14,15 @@
* limitations under the License.
*/
import { Component, OnDestroy, OnInit } from '@angular/core';
-import { SortDir, TableBaseImpl, TableResponse } from '../../../fw/widget/table.base';
-import { FnService } from '../../../fw/util/fn.service';
-import { LoadingService } from '../../../fw/layer/loading.service';
-import { LogService } from '../../../log.service';
+import {
+ FnService,
+ LoadingService,
+ LogService,
+ PrefsService,
+ WebSocketService,
+ SortDir, TableBaseImpl, TableResponse
+} from 'gui2-fw-lib';
import { ActivatedRoute } from '@angular/router';
-import { WebSocketService } from '../../../fw/remote/websocket.service';
-import { PrefsService } from '../../../fw/util/prefs.service';
/**
* Model of the response from WebSocket
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
index 18dc37b..9cae299 100644
--- 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
@@ -18,12 +18,14 @@
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 {
+ FnService,
+ IconService,
+ LogService,
+ WebSocketService,
+ IconComponent
+} from 'gui2-fw-lib';
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';
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 1fd62d3..0960cd6 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
@@ -15,12 +15,14 @@
*/
import { Component, Input, OnChanges, OnDestroy, OnInit } from '@angular/core';
import { animate, state, style, transition, trigger } from '@angular/animations';
-import { DetailsPanelBaseImpl } from '../../../fw/widget/detailspanel.base';
-import { FnService } from '../../../fw/util/fn.service';
-import { LoadingService } from '../../../fw/layer/loading.service';
-import { LogService } from '../../../log.service';
-import { IconService } from '../../../fw/svg/icon.service';
-import { WebSocketService } from '../../../fw/remote/websocket.service';
+import {
+ FnService,
+ IconService,
+ LoadingService,
+ LogService,
+ DetailsPanelBaseImpl,
+ WebSocketService
+} from 'gui2-fw-lib';
/**
* The details view when a port row is clicked from the Port view
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 961925a..2cf5e42 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,8 +15,7 @@
*/
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
-import { SvgModule } from '../../fw/svg/svg.module';
-import { WidgetModule } from '../../fw/widget/widget.module';
+import { Gui2FwLibModule } from 'gui2-fw-lib';
import { ProcessorRoutingModule } from './processor-routing.module';
import { ProcessorComponent } from './processor/processor.component';
@@ -24,8 +23,7 @@
imports: [
CommonModule,
ProcessorRoutingModule,
- SvgModule,
- WidgetModule
+ Gui2FwLibModule
],
declarations: [ProcessorComponent]
})
diff --git a/web/gui2/src/main/webapp/app/view/processor/processor/processor.component.spec.ts b/web/gui2/src/main/webapp/app/view/processor/processor/processor.component.spec.ts
index 6abded1..53ad34c 100644
--- a/web/gui2/src/main/webapp/app/view/processor/processor/processor.component.spec.ts
+++ b/web/gui2/src/main/webapp/app/view/processor/processor/processor.component.spec.ts
@@ -17,12 +17,14 @@
import { ActivatedRoute, Params } from '@angular/router';
import { DebugElement } from '@angular/core';
import { By } from '@angular/platform-browser';
-import { LogService } from '../../../log.service';
-import { FnService } from '../../../fw/util/fn.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 {
+ FnService,
+ IconService,
+ IconComponent,
+ LoadingService,
+ LogService,
+ WebSocketService
+} from 'gui2-fw-lib';
import { of } from 'rxjs';
import { } from 'jasmine';
import { RouterTestingModule } from '@angular/router/testing';
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 a7840ec..a42912f 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
@@ -14,11 +14,13 @@
* limitations under the License.
*/
import { Component, OnDestroy, OnInit } from '@angular/core';
-import { SortDir, TableBaseImpl, TableResponse } from '../../../fw/widget/table.base';
-import { WebSocketService } from '../../../fw/remote/websocket.service';
-import { LogService } from '../../../log.service';
-import { LoadingService } from '../../../fw/layer/loading.service';
-import { FnService } from '../../../fw/util/fn.service';
+import {
+ FnService,
+ LoadingService,
+ LogService,
+ WebSocketService,
+ SortDir, TableBaseImpl, TableResponse
+} from 'gui2-fw-lib';
import { ActivatedRoute } from '@angular/router';
/**
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 eeed435..5b6505b 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
@@ -18,16 +18,14 @@
import { SettingsRoutingModule } from './settings-routing.module';
import { SettingsComponent } from './settings/settings.component';
-import { SvgModule } from '../../fw/svg/svg.module';
-import { WidgetModule } from '../../fw/widget/widget.module';
+import { Gui2FwLibModule } from 'gui2-fw-lib';
import { SettingsDetailsComponent } from './settingsdetails/settingsdetails.component';
@NgModule({
imports: [
CommonModule,
SettingsRoutingModule,
- SvgModule,
- WidgetModule
+ Gui2FwLibModule
],
declarations: [SettingsComponent, SettingsDetailsComponent]
})
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 6ceb4ad..7e0d8de 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
@@ -18,12 +18,14 @@
import { SettingsComponent } from './settings.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 {
+ FnService,
+ IconService,
+ IconComponent,
+ LoadingService,
+ LogService,
+ WebSocketService
+} from 'gui2-fw-lib';
import { DebugElement } from '@angular/core';
import { By } from '@angular/platform-browser';
import { SettingsDetailsComponent } from '../settingsdetails/settingsdetails.component';
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 bc74b6a..a2bf6c4 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
@@ -14,11 +14,13 @@
* limitations under the License.
*/
import { Component, OnInit, OnDestroy } from '@angular/core';
-import { TableBaseImpl, TableResponse, SortDir } from '../../../fw/widget/table.base';
-import { FnService } from '../../../fw/util/fn.service';
-import { LoadingService } from '../../../fw/layer/loading.service';
-import { LogService } from '../../../log.service';
-import { WebSocketService } from '../../../fw/remote/websocket.service';
+import {
+ FnService,
+ LoadingService,
+ LogService,
+ WebSocketService,
+ SortDir, TableBaseImpl, TableResponse
+} from 'gui2-fw-lib';
/**
* 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.spec.ts b/web/gui2/src/main/webapp/app/view/settings/settingsdetails/settingsdetails.component.spec.ts
index 41200fc..f8060fe 100644
--- a/web/gui2/src/main/webapp/app/view/settings/settingsdetails/settingsdetails.component.spec.ts
+++ b/web/gui2/src/main/webapp/app/view/settings/settingsdetails/settingsdetails.component.spec.ts
@@ -18,12 +18,14 @@
import { SettingsDetailsComponent } from './settingsdetails.component';
import { ActivatedRoute, Params } from '@angular/router';
import { of } from 'rxjs';
-import { FnService } from '../../../fw/util/fn.service';
-import { LogService } from '../../../log.service';
+import {
+ FnService,
+ IconService,
+ LogService,
+ WebSocketService,
+ IconComponent
+} from 'gui2-fw-lib';
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';
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 e818360..39cc9b8 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
@@ -14,11 +14,14 @@
* limitations under the License.
*/
import { Component, OnInit, Input, OnDestroy, OnChanges } from '@angular/core';
-import { FnService } from '../../../fw/util/fn.service';
-import { DetailsPanelBaseImpl } from '../../../fw/widget/detailspanel.base';
-import { LoadingService } from '../../../fw/layer/loading.service';
-import { LogService } from '../../../log.service';
-import { WebSocketService } from '../../../fw/remote/websocket.service';
+import {
+ FnService,
+ IconService,
+ LoadingService,
+ LogService,
+ DetailsPanelBaseImpl,
+ WebSocketService
+} from 'gui2-fw-lib';
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/tunnel.module.ts b/web/gui2/src/main/webapp/app/view/tunnel/tunnel.module.ts
index 56e03b6..0e2018b 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
@@ -18,15 +18,13 @@
import { TunnelRoutingModule } from './tunnel-routing.module';
import { TunnelComponent } from './tunnel/tunnel.component';
-import { SvgModule } from '../../fw/svg/svg.module';
-import { WidgetModule } from '../../fw/widget/widget.module';
+import { Gui2FwLibModule } from 'gui2-fw-lib';
@NgModule({
imports: [
CommonModule,
TunnelRoutingModule,
- SvgModule,
- WidgetModule
+ Gui2FwLibModule
],
declarations: [
TunnelComponent
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
index 3b2611e..30c5ead 100644
--- 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
@@ -18,12 +18,14 @@
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 {
+ FnService,
+ IconService,
+ IconComponent,
+ LoadingService,
+ LogService,
+ WebSocketService
+} from 'gui2-fw-lib';
import { DebugElement } from '@angular/core';
import { By } from '@angular/platform-browser';
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 bbd4b67..388e69e 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
@@ -14,11 +14,13 @@
* limitations under the License.
*/
import { Component, OnInit, OnDestroy } from '@angular/core';
-import { TableResponse, TableBaseImpl, SortDir } from '../../../fw/widget/table.base';
-import { FnService } from '../../../fw/util/fn.service';
-import { LoadingService } from '../../../fw/layer/loading.service';
-import { LogService } from '../../../log.service';
-import { WebSocketService } from '../../../fw/remote/websocket.service';
+import {
+ FnService,
+ LoadingService,
+ LogService,
+ WebSocketService,
+ SortDir, TableBaseImpl, TableResponse
+} from 'gui2-fw-lib';
/**
* Model of the response from WebSocket