aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/apps/networkMapApp
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2022-02-03 16:41:14 +0000
committerGerrit Code Review <gerrit@onap.org>2022-02-03 16:41:14 +0000
commit652d7ca972652ef437769cc2e88afddbb7f06ca2 (patch)
tree08da4fc171617be44aa95cf7d80a5cec1468de8d /sdnr/wt/odlux/apps/networkMapApp
parentf23a3d5d957c4c510a7436c0acba57d95e4a13ce (diff)
parent1a868116614dd9996c78e69941b537e9da19460b (diff)
Merge "Update ODLUX"
Diffstat (limited to 'sdnr/wt/odlux/apps/networkMapApp')
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/.babelrc17
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/icons/README.md29
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/icons/apartment.pngbin1717 -> 0 bytes
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/icons/apartment.png.d.ts2
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/icons/customize.pngbin399 -> 0 bytes
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/icons/customize.png.d.ts2
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/icons/datacenter.pngbin2603 -> 0 bytes
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/icons/datacenter.png.d.ts2
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/icons/datacenterred.pngbin1814 -> 0 bytes
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/icons/datacenterred.png.d.ts2
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/icons/factory.pngbin1285 -> 0 bytes
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/icons/factory.png.d.ts2
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/icons/factoryred.pngbin1336 -> 0 bytes
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/icons/factoryred.png.d.ts2
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/icons/lamp.pngbin2233 -> 0 bytes
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/icons/lamp.png.d.ts2
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/icons/lampred.pngbin1853 -> 0 bytes
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/icons/lampred.png.d.ts2
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/package.json44
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/pom.xml159
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/App.tsx32
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/actions/connectivityAction.ts63
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/actions/detailsAction.ts161
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/actions/mapActions.ts84
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/actions/popupActions.ts40
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/actions/searchAction.ts25
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/actions/settingsAction.ts85
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/components/customize/customizationView.tsx291
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/components/customize/themeElement.tsx47
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/components/denseTable.tsx139
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/components/details/details.tsx204
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/components/details/linkDetails.tsx130
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/components/details/siteDetails.tsx248
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/components/details/stadokDetailsPopup.tsx274
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/components/map/connectionInfo.tsx59
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/components/map/iconSwitch.tsx53
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/components/map/map.tsx697
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/components/map/mapPopup.tsx94
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/components/map/searchBar.tsx161
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/components/map/statistics.tsx57
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/config.ts50
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/handlers/connectivityReducer.ts41
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/handlers/detailsReducer.ts76
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/handlers/mapReducer.ts81
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/handlers/popupReducer.ts51
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/handlers/rootReducer.ts53
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/handlers/searchReducer.ts33
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/handlers/settingsReducer.ts61
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/index.html30
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/model/Feature.ts25
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/model/count.ts19
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/model/historyEntry.ts22
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/model/link.ts36
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/model/popupElements.ts22
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/model/settings.ts34
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/model/site.ts50
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/model/stadokOrder.ts56
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/model/stadokSite.ts54
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/pluginTransport.tsx117
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/services/mapImagesService.ts66
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/services/settingsService.ts43
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/styles/index.css13
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/styles/mapbox-gl.css1
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/utils/mapLayers.ts332
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/utils/mapUtils.ts146
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src/utils/utils.ts25
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src2/main/java/org/onap/ccsdk/features/sdnr/wt/odlux/bundles/MyOdluxBundle.java68
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src2/main/resources/OSGI-INF/blueprint/blueprint.xml9
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src2/test/java/org/onap/ccsdk/features/sdnr/wt/odlux/bundles/test/TestBundleRes.java46
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/src2/test/resources/test.js5
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/tsconfig.json37
-rw-r--r--sdnr/wt/odlux/apps/networkMapApp/webpack.config.js200
72 files changed, 0 insertions, 5111 deletions
diff --git a/sdnr/wt/odlux/apps/networkMapApp/.babelrc b/sdnr/wt/odlux/apps/networkMapApp/.babelrc
deleted file mode 100644
index 3d8cd1260..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/.babelrc
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "presets": [
- ["@babel/preset-react"],
- ["@babel/preset-env", {
- "targets": {
- "chrome": "66"
- },
- "spec": true,
- "loose": false,
- "modules": false,
- "debug": false,
- "useBuiltIns": "usage",
- "forceAllTransforms": true
- }]
- ],
- "plugins": []
-}
diff --git a/sdnr/wt/odlux/apps/networkMapApp/icons/README.md b/sdnr/wt/odlux/apps/networkMapApp/icons/README.md
deleted file mode 100644
index b26fbc29b..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/icons/README.md
+++ /dev/null
@@ -1,29 +0,0 @@
-Copyright of icons is as followes:
-
-<!--
- * ============LICENSE_START========================================================================
- * apartment.png - Material Icons
- * =================================================================================================
- * Copyright (C) 2020 Google. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
- -->
-
-datacenter.png and lamp.png
-
-Taken from MS Word
-
-According to https://support.microsoft.com/en-us/office/insert-icons-in-microsoft-office-e2459f17-3996-4795-996e-b9a13486fa79 (date: October 9th, 2019)
-"These icons are free to use; there's no royalty or copyright."
-
- \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/icons/apartment.png b/sdnr/wt/odlux/apps/networkMapApp/icons/apartment.png
deleted file mode 100644
index d4a1c5e7c..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/icons/apartment.png
+++ /dev/null
Binary files differ
diff --git a/sdnr/wt/odlux/apps/networkMapApp/icons/apartment.png.d.ts b/sdnr/wt/odlux/apps/networkMapApp/icons/apartment.png.d.ts
deleted file mode 100644
index bf398f5a4..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/icons/apartment.png.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-declare const apartment: string;
-export default apartment; \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/icons/customize.png b/sdnr/wt/odlux/apps/networkMapApp/icons/customize.png
deleted file mode 100644
index 91dbf6824..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/icons/customize.png
+++ /dev/null
Binary files differ
diff --git a/sdnr/wt/odlux/apps/networkMapApp/icons/customize.png.d.ts b/sdnr/wt/odlux/apps/networkMapApp/icons/customize.png.d.ts
deleted file mode 100644
index 7bcffb2ca..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/icons/customize.png.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-declare const customize: string;
-export default customize; \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/icons/datacenter.png b/sdnr/wt/odlux/apps/networkMapApp/icons/datacenter.png
deleted file mode 100644
index eb2a6278d..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/icons/datacenter.png
+++ /dev/null
Binary files differ
diff --git a/sdnr/wt/odlux/apps/networkMapApp/icons/datacenter.png.d.ts b/sdnr/wt/odlux/apps/networkMapApp/icons/datacenter.png.d.ts
deleted file mode 100644
index a58a9f5af..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/icons/datacenter.png.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-declare const datacenter: string;
-export default datacenter; \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/icons/datacenterred.png b/sdnr/wt/odlux/apps/networkMapApp/icons/datacenterred.png
deleted file mode 100644
index 5d5a6c523..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/icons/datacenterred.png
+++ /dev/null
Binary files differ
diff --git a/sdnr/wt/odlux/apps/networkMapApp/icons/datacenterred.png.d.ts b/sdnr/wt/odlux/apps/networkMapApp/icons/datacenterred.png.d.ts
deleted file mode 100644
index 33f3061e2..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/icons/datacenterred.png.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-declare const datacenterred: string;
-export default datacenterred; \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/icons/factory.png b/sdnr/wt/odlux/apps/networkMapApp/icons/factory.png
deleted file mode 100644
index a38781baa..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/icons/factory.png
+++ /dev/null
Binary files differ
diff --git a/sdnr/wt/odlux/apps/networkMapApp/icons/factory.png.d.ts b/sdnr/wt/odlux/apps/networkMapApp/icons/factory.png.d.ts
deleted file mode 100644
index b5c4f19d9..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/icons/factory.png.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-declare const factory: string;
-export default factory; \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/icons/factoryred.png b/sdnr/wt/odlux/apps/networkMapApp/icons/factoryred.png
deleted file mode 100644
index 959603ab1..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/icons/factoryred.png
+++ /dev/null
Binary files differ
diff --git a/sdnr/wt/odlux/apps/networkMapApp/icons/factoryred.png.d.ts b/sdnr/wt/odlux/apps/networkMapApp/icons/factoryred.png.d.ts
deleted file mode 100644
index 1fac0a943..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/icons/factoryred.png.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-declare const factoryRed: string;
-export default factoryRed; \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/icons/lamp.png b/sdnr/wt/odlux/apps/networkMapApp/icons/lamp.png
deleted file mode 100644
index f5ea00138..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/icons/lamp.png
+++ /dev/null
Binary files differ
diff --git a/sdnr/wt/odlux/apps/networkMapApp/icons/lamp.png.d.ts b/sdnr/wt/odlux/apps/networkMapApp/icons/lamp.png.d.ts
deleted file mode 100644
index 9634b1275..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/icons/lamp.png.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-declare const lamp: string;
-export default lamp; \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/icons/lampred.png b/sdnr/wt/odlux/apps/networkMapApp/icons/lampred.png
deleted file mode 100644
index 4678ce91c..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/icons/lampred.png
+++ /dev/null
Binary files differ
diff --git a/sdnr/wt/odlux/apps/networkMapApp/icons/lampred.png.d.ts b/sdnr/wt/odlux/apps/networkMapApp/icons/lampred.png.d.ts
deleted file mode 100644
index 12a8f91cb..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/icons/lampred.png.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-declare const lampred: string;
-export default lampred; \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/package.json b/sdnr/wt/odlux/apps/networkMapApp/package.json
deleted file mode 100644
index 160537045..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/package.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
- "name": "@odlux/transport-app",
- "version": "0.1.0",
- "description": "A react based modular UI to display event log from a database.",
- "main": "index.js",
- "scripts": {
- "start": "webpack-dev-server --env debug",
- "build": "webpack --env release --config webpack.config.js",
- "build:dev": "webpack --env debug --config webpack.config.js"
- },
- "repository": {
- "type": "git",
- "url": "https://git.mfico.de/highstreet-technologies/odlux.git"
- },
- "keywords": [
- "reactjs",
- "redux",
- "ui",
- "framework"
- ],
- "author": "Aijana Schumann",
- "license": "Apache-2.0",
- "dependencies": {
- "@odlux/framework": "*",
- "@types/mapbox-gl": "^1.10.2",
- "mapbox-gl": "^1.11.0",
- "object.values": "^1.1.1"
- },
- "peerDependencies": {
- "@types/react": "17.0.3",
- "@types/react-dom": "17.0.2",
- "@types/react-router-dom": "5.1.7",
- "@material-ui/core": "4.11.4",
- "@material-ui/icons": "4.11.2",
- "@types/classnames": "2.2.6",
- "@types/flux": "3.1.8",
- "@types/jquery": "3.3.10",
- "jquery": "3.3.1",
- "react": "17.0.1",
- "react-dom": "17.0.1",
- "react-router-dom": "5.2.0"
-
- }
-}
diff --git a/sdnr/wt/odlux/apps/networkMapApp/pom.xml b/sdnr/wt/odlux/apps/networkMapApp/pom.xml
deleted file mode 100644
index b0349786a..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/pom.xml
+++ /dev/null
@@ -1,159 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ ============LICENSE_START=======================================================
- ~ ONAP : ccsdk features
- ~ ================================================================================
- ~ Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
- ~ ================================================================================
- ~ 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.
- ~ ============LICENSE_END=======================================================
- ~
- -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.onap.ccsdk.parent</groupId>
- <artifactId>binding-parent</artifactId>
- <version>2.3.2</version>
- <relativePath/>
- </parent>
-
- <groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
- <artifactId>sdnr-wt-odlux-app-networkMapApp</artifactId>
- <version>1.3.0-SNAPSHOT</version>
- <packaging>bundle</packaging>
-
- <name>ccsdk-features :: ${project.artifactId}</name>
- <licenses>
- <license>
- <name>Apache License, Version 2.0</name>
- <url>http://www.apache.org/licenses/LICENSE-2.0</url>
- </license>
- </licenses>
-
- <properties>
- <maven.javadoc.skip>true</maven.javadoc.skip>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sdnr-wt-odlux-core-model</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sdnr-wt-odlux-core-provider</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <sourceDirectory>src2/main/java</sourceDirectory>
- <resources>
- <resource>
- <directory>dist</directory>
- <targetPath>odlux</targetPath>
- </resource>
- <resource>
- <directory>src2/main/resources</directory>
- </resource>
- <resource>
- <directory>src2/test/resources</directory>
- </resource>
- </resources>
- <plugins>
- <plugin>
- <artifactId>maven-clean-plugin</artifactId>
- <configuration>
- <filesets>
- <fileset>
- <directory>dist</directory>
- <followSymlinks>false</followSymlinks>
- </fileset>
- <fileset>
- <directory>node</directory>
- <followSymlinks>false</followSymlinks>
- </fileset>
- <fileset>
- <directory>node_modules</directory>
- <followSymlinks>false</followSymlinks>
- </fileset>
- <fileset>
- <directory>../node_modules</directory>
- <followSymlinks>false</followSymlinks>
- </fileset>
- <!-- eclipse bug build bin folder in basedir -->
- <fileset>
- <directory>bin</directory>
- <followSymlinks>false</followSymlinks>
- </fileset>
- </filesets>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>add-test-source</id>
- <phase>generate-test-sources</phase>
- <goals>
- <goal>add-test-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>src2/test/java</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>de.jacks-it-lab</groupId>
- <artifactId>frontend-maven-plugin</artifactId>
- <version>1.7.2</version>
- <executions>
- <execution>
- <id>install node and yarn</id>
- <goals>
- <goal>install-node-and-yarn</goal>
- </goals>
- <!-- optional: default phase is "generate-resources" -->
- <phase>initialize</phase>
- <configuration>
- <nodeVersion>v12.13.0</nodeVersion>
- <yarnVersion>v1.22.10</yarnVersion>
- </configuration>
- </execution>
- <execution>
- <id>yarn build</id>
- <goals>
- <goal>yarn</goal>
- </goals>
- <configuration>
- <arguments>run build</arguments>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/App.tsx b/sdnr/wt/odlux/apps/networkMapApp/src/App.tsx
deleted file mode 100644
index 5840d1842..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/App.tsx
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-import * as React from 'react';
-import Map from './components/map/map'
-import Details from './components/details/details'
-
-function MainView() {
- return (
- <div className="App" style={{display: 'flex', flexDirection:'row', flexGrow:1, height:"100%"}}>
- <Map />
- <Details />
- </div>
- );
-}
-
-export default MainView;
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/actions/connectivityAction.ts b/sdnr/wt/odlux/apps/networkMapApp/src/actions/connectivityAction.ts
deleted file mode 100644
index 63f52c8f9..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/actions/connectivityAction.ts
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-import { Action } from "../../../../framework/src/flux/action";
-import { Dispatch } from "../../../../framework/src/flux/store";
-import { IApplicationStoreState } from "../../../../framework/src/store/applicationStore";
-
-
-export class IsTopologyServerReachableAction extends Action{
- constructor(public reachable: boolean){
- super();
- }
-}
-
-export class IsTileServerReachableAction extends Action{
- constructor(public reachable: boolean){
- super();
- }
-}
-
-export class IsBusycheckingConnectivityAction extends Action{
- constructor(public isBusy: boolean){
- super();
- }
-}
-
-export const verifyResponse = (response: Response) =>{
-
- if(response.ok){
- return response
- }else{
- throw Error(`Connection Error: ${response.status} | ${response.statusText} | ${response.url}`)
- }
-}
-
-export const handleConnectionError = (error: Error) => (dispatcher: Dispatch, getState: () => IApplicationStoreState)=>{
- const {network:{connectivity: {isToplogyServerAvailable}}} = getState();
- if(isToplogyServerAvailable){
- dispatcher(new IsTopologyServerReachableAction(false))
- }
-}
-
-export const setTileServerReachableAction = (isReachable: boolean) => (dispatcher: Dispatch, getState: () => IApplicationStoreState)=>{
- const {network:{connectivity: {isTileServerAvailable}}} = getState();
- if(isReachable !== isTileServerAvailable){
- dispatcher(new IsTileServerReachableAction(isReachable))
- }
-} \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/actions/detailsAction.ts b/sdnr/wt/odlux/apps/networkMapApp/src/actions/detailsAction.ts
deleted file mode 100644
index a9bea4fc2..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/actions/detailsAction.ts
+++ /dev/null
@@ -1,161 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-import { Action } from '../../../../framework/src/flux/action';
-import { requestRest } from '../../../../framework/src/services/restService';
-
-
-import { Site, Device } from "../model/site";
-import { link } from '../model/link';
-import { HistoryEntry } from "../model/historyEntry";
-import { IApplicationStoreState } from '../../../../framework/src/store/applicationStore';
-import { Dispatch } from '../../../../framework/src/flux/store';
-import { SITEDOC_URL } from '../config';
-
-export class SelectSiteAction extends Action {
- constructor(public site: Site){
- super()
- }
-}
-
-export class SelectLinkAction extends Action {
- constructor(public link: link){
- super();
- }
-}
-
-export class ClearDetailsAction extends Action{
- constructor(){
- super();
- }
-}
-
-export class AddToHistoryAction extends Action {
- constructor(public entry: HistoryEntry){
- super();
- }
-}
-
-export class ClearHistoryAction extends Action {
- constructor(){
- super();
- }
-}
-
-export class IsBusyCheckingDeviceListAction extends Action{
- constructor(public isBusy: boolean){
- super();
- }
-}
-
-export class FinishedLoadingDeviceListAction extends Action{
- constructor(public devices: Device[]){
- super();
- }
-}
-
-export class ClearLoadedDevicesAction extends Action{
- constructor(){
- super();
- }
-}
-
-export class InitializeLoadedDevicesAction extends Action{
- constructor(public devices: Device[]){
- super();
- }
-}
-
-export class IsSitedocReachableAction extends Action{
- constructor(public isReachable: boolean){
- super();
- }
-}
-
-let running=false;
-
-export const UpdateDetailsView = (nodeId: string) =>(dispatcher: Dispatch, getState: () => IApplicationStoreState) =>{
- const {network:{details:{checkedDevices}}} = getState();
- if(checkedDevices!==null){
- const index = checkedDevices.findIndex(item=>item.name===nodeId)
- if(index!==-1)
- requestRest<any>("/rests/operational/network-topology:network-topology/topology/topology-netconf/node/"+nodeId, { method: "GET" })
- .then(result =>{
- if(result!==null){
- checkedDevices[index].status = result.node[0]["netconf-node-topology:connection-status"];
-
- }else{
- checkedDevices[index].status = "Not connected";
- }
- dispatcher(new FinishedLoadingDeviceListAction(checkedDevices));
-
- });
- }
-}
-
-export const CheckDeviceList = (list: Device[]) => async (dispatcher: Dispatch, getState: () => IApplicationStoreState) =>{
-if(running) return;
-running=true;
- dispatcher(new IsBusyCheckingDeviceListAction(true));
-
- const promises = list.map((device)=>{
- if(device.name){
- return requestRest<any>("/rests/data/network-topology:network-topology/topology=topology-netconf/node="+device.name, { method: "GET" })
- }else{
- return device;
- }
-
- })
-
- Promise.all(promises).then((result)=>{
- running=false;
-
-
- result.forEach((res: any, index)=>{
- if(res !==null && res["network-topology:node"]){
- list[index].status = res["network-topology:node"][0]["netconf-node-topology:connection-status"];
- }else{
- list[index].status = "Not connected";
- }
- });
-
- dispatcher(new FinishedLoadingDeviceListAction(list));
- dispatcher(new IsBusyCheckingDeviceListAction(false));
-
- })
- .catch(err=>{
- console.error(err);
-
- dispatcher(new IsBusyCheckingDeviceListAction(false));
-
- });
-}
-
-export const checkSitedockReachablity = () => async (dispatcher: Dispatch, getState: () => IApplicationStoreState) =>{
- console.log("searching for sitedoc server...")
- requestRest<any>(SITEDOC_URL+'/app/versioninfo').then(response =>{
- console.log(response);
- if(response){
-
- dispatcher(new IsSitedocReachableAction(true));
-
- }else{
- dispatcher(new IsSitedocReachableAction(false));
- }
- })
-} \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/actions/mapActions.ts b/sdnr/wt/odlux/apps/networkMapApp/src/actions/mapActions.ts
deleted file mode 100644
index 9830c06e4..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/actions/mapActions.ts
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-import { Action } from '../../../../framework/src/flux/action';
-import { Dispatch } from '../../../../framework/src/flux/store';
-
-
-import { link } from "../model/link";
-import { Site } from "../model/site";
-import { Feature } from '../model/Feature';
-import { URL_API } from '../config';
-
-
-export class HighlightLinkAction extends Action{
- constructor(public link: link){
- super();
- }
-}
-
-export class HighlightSiteAction extends Action{
- constructor(public site: Site){
- super();
- }
-}
-
-export class RemoveHighlightingAction extends Action {
- constructor(){
- super();
- }
-}
-
-export class ZoomToSearchResultAction extends Action{
- constructor(public lat: number, public lon: number){
- super();
- }
-}
-
-export class AddAlarmAction extends Action{
- constructor(public site: Site){
- super();
- }
-}
-
-export class SetCoordinatesAction extends Action{
- constructor(public lat: number, public lon: number, public zoom: number){
- super();
- }
-}
-
-export class SetStatistics extends Action{
- constructor(public siteCount: string, public linkCount: string){
- super();
- }
-}
-
-export class SetIconSwitchAction extends Action{
- constructor(public enable:boolean){
- super();
- }
-}
-
-export const findSiteToAlarm = (alarmedNodeId: string) => (dispatcher: Dispatch) =>{
- //TODO: fix!
- fetch(URL_API+"/sites/devices/"+alarmedNodeId)
- .then(res => res.json())
- .then(result=>{
- dispatcher(new AddAlarmAction(result));
- });
-} \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/actions/popupActions.ts b/sdnr/wt/odlux/apps/networkMapApp/src/actions/popupActions.ts
deleted file mode 100644
index a8c54d4df..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/actions/popupActions.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-import { PopupElement } from '../model/popupElements';
-import { Action } from '../../../../framework/src/flux/action';
-
-export class SetPopupPositionAction extends Action {
- constructor(public top: number, public left: number){
- super()
- }
-}
-
-export class SelectMultipleLinksAction extends Action {
- constructor(public elements: PopupElement[]) {
- super();
- }
-}
-
-
-
-export class SelectMultipleSitesAction extends Action {
- constructor(public elements: PopupElement[]) {
- super();
- }
-} \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/actions/searchAction.ts b/sdnr/wt/odlux/apps/networkMapApp/src/actions/searchAction.ts
deleted file mode 100644
index a553319da..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/actions/searchAction.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-import { Action } from '../../../../framework/src/flux/action';
-
-export class SetSearchValueAction extends Action{
- constructor(public value: string){
- super();
- }
-}
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/actions/settingsAction.ts b/sdnr/wt/odlux/apps/networkMapApp/src/actions/settingsAction.ts
deleted file mode 100644
index 5b8982368..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/actions/settingsAction.ts
+++ /dev/null
@@ -1,85 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2021 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-import { NetworkMapSettings, NetworkMapThemes, NetworkSettings } from '../model/settings';
-import { Action } from '../../../../framework/src/flux/action';
-import { Dispatch } from '../../../../framework/src/flux/store';
-import { settingsService } from '../services/settingsService';
-
-export class SetMapSettingsAction extends Action{
-
- constructor(public settings:NetworkMapSettings) {
- super();
- }
-}
-
-export class SetThemeSettingsAction extends Action{
-
- constructor(public settings:NetworkMapThemes) {
- super();
- }
-}
-
-export class SetSettingsAction extends Action{
-
- constructor(public settings:NetworkSettings) {
- super();
- }
-}
-
-export class SetBusyLoadingAction extends Action{
-
- constructor(public busy: boolean) {
- super();
-
- }
-}
-
-
-export const getSettings = () => async (dispatcher: Dispatch) => {
- dispatcher(new SetBusyLoadingAction(true));
- console.log("getting settings in action..")
- settingsService.getMapSettings().then(result =>{
- if(result){
- if(result.networkMap && result.networkMapThemes){
- const mapSettings : NetworkSettings = { networkMap: result.networkMap, networkMapThemes: result.networkMapThemes}
- dispatcher(new SetSettingsAction(mapSettings));
- }else if(result.networkMap){
- dispatcher(new SetMapSettingsAction(result));
- }else if(result.networkMapThemes){
- dispatcher(new SetThemeSettingsAction(result));
- }
- }
- else{
- console.warn("settings couldn't be loaded.");
- }
- dispatcher(new SetBusyLoadingAction(false));
- });
-}
-
-export const updateSettings = (mapSettings: NetworkMapSettings) => async (dispatcher: Dispatch) =>{
-
- const result = await settingsService.updateMapSettings(mapSettings);
- console.log("update settings");
- dispatcher(new SetMapSettingsAction(mapSettings));
-
- console.log(result);
- if(result){
- }
-
-}
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/components/customize/customizationView.tsx b/sdnr/wt/odlux/apps/networkMapApp/src/components/customize/customizationView.tsx
deleted file mode 100644
index 82e7b795b..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/components/customize/customizationView.tsx
+++ /dev/null
@@ -1,291 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2021 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-import { Button, Grid, InputLabel, makeStyles, MenuItem, Select, Slider, TextField, Typography } from '@material-ui/core';
-import { NetworkMapSettings, ThemeElement } from '../../model/settings';
-import * as React from 'react'
-import connect, { Connect, IDispatcher } from '../../../../../framework/src/flux/connect';
-import { IApplicationStoreState } from '../../../../../framework/src/store/applicationStore';
-import { updateSettings } from '../../actions/settingsAction';
-import ThemeEntry from './themeElement'
-import * as mapboxgl from 'mapbox-gl';
-import { OSM_STYLE } from '../../config';
-import mapLayerService from '../../utils/mapLayers';
-import { requestRest } from '../../../../../framework/src/services/restService';
-import { NavigateToApplication } from '../../../../../framework/src/actions/navigationActions';
-
-type props = Connect<typeof mapProps, typeof mapDispatch>;
-let map: mapboxgl.Map;
-let myMapRef = React.createRef<HTMLDivElement>();
-const default_boundingbox = "12.882544785787754,52.21421979821472,13.775455214211949,52.80406241672602";
-
-
-const mapProps = (state: IApplicationStoreState) => ({
- settings: state.network.settings,
-});
-
-const mapDispatch = (dispatcher: IDispatcher) => ({
- updateSettings: (mapSettings: NetworkMapSettings) => dispatcher.dispatch(updateSettings(mapSettings)),
- navigateToApplication: (applicationName: string) => dispatcher.dispatch(new NavigateToApplication(applicationName)),
-
-
-});
-
-const styles = makeStyles({
- sectionMargin: {
- marginTop: "30px",
- marginBottom: "15px"
- },
- elementMargin: {
-
- marginLeft: "10px"
- }
-});
-
-const CustomizationView: React.FunctionComponent<props> = (props) => {
-
- const [opacity, setOpacity] = React.useState(Number(props.settings.mapSettings?.networkMap.tileOpacity) || 100);
- const [theme, setTheme] = React.useState(props.settings.mapSettings?.networkMap.styling.theme || '');
- const [latitude, setLatitude] = React.useState<number>(Number(props.settings.mapSettings?.networkMap.startupPosition.latitude)|| 52.5);
- const [longitude, setLongitude] = React.useState<number>(Number(props.settings.mapSettings?.networkMap.startupPosition.longitude)|| 13.35);
- const [zoom, setZoom] = React.useState<number>(Number(props.settings.mapSettings?.networkMap.startupPosition.zoom) || 10);
-
-
- //used to make opacity available within the map event-listeners
- //(hook state values are snapshotted at initalization and not updated afterwards, thus use a ref here)
- const myOpacityRef = React.useRef(opacity);
- const setOpacityState = (data:any) => {
- myOpacityRef.current = data;
- setOpacity(data);
- };
-
- const classes = styles();
- const currentTheme = props.settings.themes.networkMapThemes.themes.find(el => el.key === theme);
-
-
- React.useEffect(() => {
- mapLayerService.settings = props.settings.themes;
-
- map = new mapboxgl.Map({
- container: myMapRef.current!,
- style: OSM_STYLE as any,
- center: [longitude, latitude],
- zoom: zoom,
- accessToken: ''
- });
-
- map.on('load', (ev) => {
-
- mapLayerService.addBaseSources(map, null, null);
- if(props.settings.mapSettings?.networkMap.styling.theme !== theme){
- mapLayerService.addBaseLayers(map, currentTheme);
-
- }else{
- mapLayerService.addBaseLayers(map);
- }
-
- mapLayerService.changeMapOpacity(map, myOpacityRef.current);
-
- getData();
- });
-
- map.on('moveend', () => {
- const center = map.getCenter();
- setZoom(Number(map.getZoom().toFixed(4)));
- setLatitude(Number(center.lat.toFixed(4)));
- setLongitude(Number(center.lng.toFixed(4)));
- });
-
- }, []);
-
- React.useEffect(() => {
- recenterMap();
- }, [latitude, longitude, zoom]);
-
- const setState = () => {
- if (props.settings.mapSettings?.networkMap.styling) {
- setTheme(props.settings.mapSettings.networkMap.styling.theme);
- mapLayerService.changeTheme(map, props.settings.mapSettings.networkMap.styling.theme);
- }
-
- const propOpacity = props.settings.mapSettings?.networkMap.tileOpacity;
- if (propOpacity) {
- setOpacityState(propOpacity);
- }
- }
-
- React.useEffect(() => {
- setState();
- }, [props.settings.mapSettings]);
-
- const onOpacityChange = (event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>, newValue: number) => {
- setOpacity(newValue);
- mapLayerService.changeMapOpacity(map, newValue);
-
- };
-
- const onChangeTheme = (e: any) => {
-
- const newTheme = e.target.value;
- setTheme(newTheme);
- mapLayerService.changeTheme(map, newTheme);
- }
-
- const onCancel = (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {
- e.preventDefault();
- props.navigateToApplication("network");
- }
-
- const onSaveSettings = async (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {
- e.preventDefault();
-
- const updatedSettings: NetworkMapSettings = {
- networkMap: {
- tileOpacity: opacity.toString(),
- styling: { theme: theme },
- startupPosition: {
- latitude: latitude.toString(),
- longitude: longitude.toString(),
- zoom: zoom.toString()
- }
- }
- };
-
- console.log(updatedSettings);
-
- await props.updateSettings(updatedSettings)
- props.navigateToApplication("network");
-
- }
-
- const recenterMap = () => {
-
- if (!isNaN(latitude) && !isNaN(longitude) && !isNaN(zoom))
-
- map.flyTo({
- center: [
- longitude,
- latitude
- ], zoom: zoom,
- essential: false
- });
- }
-
-
-
- const getData = () => {
-
- //get data of boundingbox from networkmap
-
- const links = requestRest<any>("/topology/network/links/geojson/" + default_boundingbox);
- const sites = requestRest<any>("/topology/network/sites/geojson/" + default_boundingbox);
-
- Promise.all([links, sites]).then(results => {
- if (map.getSource('lines')) {
- (map.getSource('lines') as mapboxgl.GeoJSONSource).setData(results[0]);
- }
-
- if (map.getSource('points')) {
- (map.getSource('points') as mapboxgl.GeoJSONSource).setData(results[1]);
- }
-
- if (map.getSource('selectedPoints')) {
- (map.getSource('selectedPoints') as mapboxgl.GeoJSONSource).setData(results[1].features[0]);
- }
- });
- }
-
- /**
- * Style property names to readable text
- * @param text propretyName
- * @returns readable text
- */
- const styleText = (text: string) => {
- const textParts = text.split(/(?=[A-Z])/); //split on uppercase character
- const newText = textParts.join(" ");
- return newText.charAt(0).toUpperCase() + newText.slice(1);
- }
-
-
- return (<>
- <h3>Settings</h3>
- <div style={{ display: 'flex', flexDirection: 'row', flexGrow: 1, height: "100%", position: 'relative' }}>
- <div style={{ width: "60%", flexDirection: 'column', position:'relative' }}>
- <Typography variant="body1" style={{ fontWeight: "bold" }} gutterBottom>Startup Position</Typography>
- <div style={{ display: 'flex', flexDirection: 'row' }}>
- <TextField type="number" value={latitude} onChange={(e) => setLatitude(e.target.value as any)} style={{ marginLeft: 10 }} label="Latitude" />
- <TextField type="number" value={longitude} onChange={(e) => setLongitude(e.target.value as any)} style={{ marginLeft: 5 }} label="Longitude" />
- <TextField type="number" value={zoom} onChange={(e) => setZoom(e.target.value as any)} style={{ marginLeft: 5 }} label="Zoom" />
- </div>
-
- <Typography className={classes.sectionMargin} variant="body1" style={{ fontWeight: "bold" }} gutterBottom>
- Tile Opacity
- </Typography>
- <Grid className={classes.elementMargin} container spacing={2} style={{ width: '50%' }}>
- <Grid item>0</Grid>
- <Grid item xs>
- <Slider color="secondary" min={0} max={100} value={opacity} onChange={onOpacityChange} aria-labelledby="continuous-slider" />
- </Grid>
- <Grid item>100</Grid>
- </Grid>
-
- <Typography className={classes.sectionMargin} variant="body1" style={{ fontWeight: "bold" }} gutterBottom>
- Style of properties
- </Typography>
- <InputLabel id="theme-select-label">Theme</InputLabel>
- <Select
- className={classes.elementMargin}
- value={theme}
- onChange={onChangeTheme}
- labelId="theme-select-label"
- style={{ marginLeft: 10 }}>
- {
- props.settings.themes.networkMapThemes.themes.map(el => <MenuItem value={el.key}>{el.key}</MenuItem>)
- }
-
- </Select>
-
- {
- currentTheme && <div style={{ marginLeft: 60 }}>
- { //skip the 'key' (theme name) entry
- Object.keys(currentTheme).slice(1).map(el => <ThemeEntry text={styleText(el)} color={(currentTheme as any)[el]} />)
- }
- </div>
- }
-
-
- <div className={classes.sectionMargin} style={{ position: 'absolute', right: 0, top: '60%' }}>
- <Button className={classes.elementMargin} variant="contained"
- color="primary" onClick={onCancel}>Cancel</Button>
-
- <Button className={classes.elementMargin} variant="contained"
- color="secondary" onClick={onSaveSettings}>Save</Button>
- </div>
- </div>
- <div id="map" ref={myMapRef} style={{ width: "35%", height: "50%" }}>
-
- </div>
- </div>
-
- </>)
-
-}
-
-export default connect(mapProps, mapDispatch)(CustomizationView);
-
-
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/components/customize/themeElement.tsx b/sdnr/wt/odlux/apps/networkMapApp/src/components/customize/themeElement.tsx
deleted file mode 100644
index c991aaf63..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/components/customize/themeElement.tsx
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2021 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-import { Typography } from '@material-ui/core';
-import * as React from 'react'
-
-
-type props={
- color: string,
- text: string
-};
-
-const ThemeEntry = (props: props) =>{
-
- var circleStyle = {
- padding:10,
- margin:20,
- backgroundColor: props.color,
- borderRadius: "50%",
- width:10,
- height:10,
- left:0,
- top:0};
-
- return <div style={{display: 'flex', flexDirection:'row'}}>
- <div style={circleStyle} />
- <Typography variant="body1" style={{marginTop:24}}>{props.text}</Typography>
- </div>
-
-}
-
-export default ThemeEntry; \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/components/denseTable.tsx b/sdnr/wt/odlux/apps/networkMapApp/src/components/denseTable.tsx
deleted file mode 100644
index e04fda547..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/components/denseTable.tsx
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-import * as React from 'react';
-import Table from '@material-ui/core/Table';
-import TableBody from '@material-ui/core/TableBody';
-import TableCell from '@material-ui/core/TableCell';
-import TableContainer from '@material-ui/core/TableContainer';
-import TableHead from '@material-ui/core/TableHead';
-import TableRow from '@material-ui/core/TableRow';
-import Paper from '@material-ui/core/Paper';
-import { makeStyles, Button, Tooltip } from '@material-ui/core';
-
-type props = { headers: string[],
- height: number,
- navigate?(applicationName: string, path?: string): void,
- onLinkClick?(id: string): void, data: any[],
- hover: boolean,
- ariaLabelRow: string,
- ariaLabelColumn?: string[],
- verticalTable?: boolean,
- onClick?(id: string): void,
- actions?: boolean };
-
-
-const styles = makeStyles({
- container: {
- overflow: "auto"
- },
- button: {
- margin: 0,
- padding: "6px 6px",
- minWidth: 'unset'
- }
-
-});
-
-
-const DenseTable: React.FunctionComponent<props> = (props) => {
-
- const classes = styles();
-
- const handleClick = (event: any, id: string) => {
- event.preventDefault();
- props.onClick !== undefined && props.onClick(id);
-
- }
-
- const handleHover = (event: any, id: string) => {
- event.preventDefault();
-
- }
-
- return (
- <Paper style={{ borderRadius: "0px" }}>
- <div style={{ height: props.height, overflow: "auto" }}>
- <Table stickyHeader size="small" aria-label="a dense table" >
- <TableHead>
- <TableRow>
- {
- props.headers.map((data) => {
- return <TableCell>{data}</TableCell>
- })
- }
- </TableRow>
- </TableHead>
- <TableBody>
- {props.data.map((row, index) => {
- var values = Object.keys(row).map(function (e) { return row[e]; });
- return (
- <TableRow aria-label={props.ariaLabelRow} key={index} hover={props.hover} onMouseOver={e => handleHover(e, row.name)} onClick={e => handleClick(e, row.name)}>
-
- {
- values.map((data: any, i) => {
- if (data !== undefined) {
-
- if (!props.verticalTable) {
- const ariaLabel = props.ariaLabelColumn === undefined ? props.headers[i].toLowerCase() : props.ariaLabelColumn[i];
- if (ariaLabel.length > 0) {
- return <TableCell aria-label={ariaLabel}>{data}</TableCell>
- } else {
- return <TableCell>{data}</TableCell>
- }
- }
- else {
- // skip adding aria label to 'header' column
- if (i === 0) {
- return <TableCell>{data}</TableCell>
- } else {
- const ariaLabel = props.ariaLabelColumn === undefined ? props.headers[index].toLowerCase() : props.ariaLabelColumn[index];
- return <TableCell aria-label={ariaLabel}>{data}</TableCell>
- }
- }
- }
- else
- return null;
- })
- }
- {
-
- props.actions && <TableCell >
- <div style={{ display: "flex" }}>
- <Tooltip title="Configure">
- <Button className={classes.button} disabled={row.status !== "connected"} onClick={(e: any) => { e.preventDefault(); e.stopPropagation(); props.navigate && props.navigate("configuration", row.simulatorId ? row.simulatorId : row.name) }}>C</Button>
- </Tooltip>
- <Tooltip title="Fault">
- <Button className={classes.button} disabled={row.status !== "connected"} onClick={(e: any) => { e.preventDefault(); e.stopPropagation(); props.navigate && props.navigate("fault", row.simulatorId ? row.simulatorId : row.name) }}>F</Button>
- </Tooltip>
- </div>
- </TableCell>
- }
- </TableRow>)
- })
- }
-
- </TableBody>
- </Table>
- </div>
- </Paper>
- );
-
-}
-
-export default DenseTable; \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/components/details/details.tsx b/sdnr/wt/odlux/apps/networkMapApp/src/components/details/details.tsx
deleted file mode 100644
index 2540b20a7..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/components/details/details.tsx
+++ /dev/null
@@ -1,204 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-import * as React from 'react'
-
-import connect, { IDispatcher, Connect } from '../../../../../framework/src/flux/connect';
-
-import { Site, Device } from '../../model/site';
-import Typography from '@material-ui/core/Typography';
-import { link } from '../../model/link';
-import { Breadcrumbs, Link, Paper } from '@material-ui/core';
-import SiteDetails from './siteDetails';
-import LinkDetails from './linkDetails';
-import { URL_API, URL_BASEPATH } from '../../config';
-import { SelectSiteAction, SelectLinkAction, AddToHistoryAction, ClearHistoryAction, CheckDeviceList, ClearDetailsAction } from '../../actions/detailsAction';
-import { HistoryEntry } from '../../model/historyEntry';
-import { HighlightLinkAction, HighlightSiteAction, RemoveHighlightingAction } from '../../actions/mapActions';
-import { isSite } from '../../utils/utils';
-import { IApplicationStoreState } from '../../../../../framework/src/store/applicationStore';
-import { NavigateToApplication } from '../../../../../framework/src/actions/navigationActions';
-import { RouteComponentProps, withRouter } from 'react-router-dom';
-
-
-const Details: React.FunctionComponent<porps> = (props) => {
-
- const [message, setMessage] = React.useState("No data selected.");
-
-
- //on mount
- React.useEffect(() => {
- const detailsId = getDetailsIdFromUrl();
- if (detailsId !== null && props.data?.name !== detailsId) {
- loadDetailsData(detailsId)
- }
-
- }, []);
-
- // if url changed, load details data
- React.useEffect(() => {
- const detailsId = getDetailsIdFromUrl();
- if (detailsId !== null && props.data?.name !== detailsId) {
- loadDetailsData(detailsId)
- }
- else if(detailsId===null){
- setMessage("No data selected.");
- props.clearDetails();
- props.undoMapSelection();
- }
-
- }, [props.location.pathname]);
-
- //update url if new element loaded
- React.useEffect(() => {
- if (props.data !== null) {
- const currentUrl = window.location.href;
- const parts = currentUrl.split(URL_BASEPATH);
- const detailsPath = parts[1].split("/details/");
- props.history.replace(`/${URL_BASEPATH}${detailsPath[0]}/details/${props.data.name}`)
- }
-
- }, [props.data])
-
- const onLinkClick = async (id: string) => {
- const result = await fetch(`${URL_API}/links/${id}`);
- if(result.ok){
- const resultAsJson = await result.json();
- const link = resultAsJson as link;
- props.selectLink(link);
- props.addHistory({ id: props.data!.name, data: props.data! });
- props.highlightLink(link);
-
- }
- }
-
- const backClick = (e: any) => {
- if (isSite(props.breadcrumbs[0].data)) {
- props.selectSite(props.breadcrumbs[0].data)
- props.highlightSite(props.breadcrumbs[0].data);
-
- } else {
- props.selectLink(props.breadcrumbs[0].data);
- props.highlightLink(props.breadcrumbs[0].data);
-
- }
-
- props.clearHistory();
- e.preventDefault();
- }
-
- const createDetailPanel = (data: Site | link) => {
- if (isSite(data)) {
- return <SiteDetails site={data} onLinkClick={onLinkClick} />
- } else {
- return <LinkDetails link={data} />
- }
- }
-
- const getDetailsIdFromUrl = () =>{
- const currentUrl = window.location.href;
- const parts = currentUrl.split(URL_BASEPATH);
- const detailsPath = parts[1].split("/details/")
- return detailsPath[1] ? detailsPath[1] : null;
- }
-
- const loadDetailsData = (id: string) =>{
-
- fetch(`${URL_API}/links/${id}`)
- .then(res => {
- if (res.ok)
- return res.json()
- else
- return Promise.reject()
-
- })
- .then(result => {
- props.selectLink(result)
- props.highlightLink(result);
-
- })
- .catch(error => {
-
- fetch(`${URL_API}/sites/name/${id}`)
- .then(res => {
- if (res.ok)
- return res.json()
- else return Promise.reject();
- })
- .then(result => {
- props.selectSite(result);
- props.highlightSite(result);
- })
- .catch(error =>{
- setMessage("No element with name " + id + " found");
- props.clearDetails();
- props.undoMapSelection();
- });
- })
- }
-
- const panelId = props.data!== null ? (isSite(props.data) ? 'site-details-panel' : 'link-details-panel' ): 'details-panel';
-
- return (<div style={{ width: '30%', background: "#bbbdbf", padding: "20px", alignSelf:"stretch" }}>
- <Paper style={{ height:"100%"}} id={panelId} aria-label={panelId} >
- {
- props.breadcrumbs.length > 0 &&
- <Breadcrumbs style={{ marginLeft: "15px", marginTop: "5px" }} aria-label="breadcrumbs-navigation">
- <Link aria-label="parent-element" color="inherit" href="/" onClick={backClick}>
- {props.breadcrumbs[0].id}
- </Link>
- <Link aria-label="child-element" color="textSecondary">
- {props.data?.name}
- </Link>
- </Breadcrumbs>
- }
- {
- props.data !== null ?
- createDetailPanel(props.data)
- : <Typography aria-label="details-panel-alt-message" style={{ marginTop: "5px" }} align="center" variant="body1">{message}</Typography>
-
- }
- </Paper>
- </div>)
-}
-
-type porps = RouteComponentProps & Connect<typeof mapStateToProps, typeof mapDispatchToProps>;
-
-//select always via details?
-const mapStateToProps = (state: IApplicationStoreState) => ({
- data: state.network.details?.data,
- breadcrumbs: state.network.details.history,
- updatedDevices: state.network.details.checkedDevices
-});
-
-const mapDispatchToProps = (dispatcher: IDispatcher) => ({
- selectSite: (site: Site) => dispatcher.dispatch(new SelectSiteAction(site)),
- selectLink: (link: link) => dispatcher.dispatch(new SelectLinkAction(link)),
- clearDetails: () => dispatcher.dispatch(new ClearDetailsAction()),
- addHistory: (newEntry: HistoryEntry) => dispatcher.dispatch(new AddToHistoryAction(newEntry)),
- clearHistory: () => dispatcher.dispatch(new ClearHistoryAction()),
- highlightLink: (link: link) => dispatcher.dispatch(new HighlightLinkAction(link)),
- highlightSite: (site: Site) => dispatcher.dispatch(new HighlightSiteAction(site)),
- loadDevices: async (networkElements: Device[]) => { await dispatcher.dispatch(CheckDeviceList(networkElements)) },
- navigateToApplication: (applicationName: string, path?: string) => dispatcher.dispatch(new NavigateToApplication(applicationName, path, "test3")),
- undoMapSelection: () => dispatcher.dispatch(new RemoveHighlightingAction())
-
-})
-
-
-export default withRouter(connect(mapStateToProps, mapDispatchToProps)(Details)); \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/components/details/linkDetails.tsx b/sdnr/wt/odlux/apps/networkMapApp/src/components/details/linkDetails.tsx
deleted file mode 100644
index 96727cc0d..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/components/details/linkDetails.tsx
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-import * as React from 'react';
-
-import { link } from '../../model/link';
-import { TextField, Tabs, Tab, Typography, AppBar, Button, Link } from '@material-ui/core';
-import DenseTable from '../denseTable';
-import { LatLonToDMS } from '../../utils/mapUtils';
-
-type panelId = "siteA" | "siteB";
-type props = { link: link };
-
-const LinkDetails: React.FunctionComponent<props> = (props) => {
-
- const [value, setValue] = React.useState<panelId>("siteA");
- const [height, setHeight] = React.useState(330);
-
- const handleResize = () =>{
- const el = document.getElementById('link-details-panel')?.getBoundingClientRect();
- const el2 = document.getElementById('site-tabs')?.getBoundingClientRect();
-
- if(el && el2){
- if(props.link.type==="microwave")
- setHeight(el!.height - el2!.y -50);
- else
- setHeight(el!.height - el2!.y +20);
-
- }
- }
-
- //on mount
- React.useEffect(()=>{
- handleResize();
-
- //window.addEventListener("resize", handleResize);
- },[]);
-
- React.useEffect(()=>{
- handleResize();
- }, [props.link])
-
- const onHandleTabChange = (event: React.ChangeEvent<{}>, newValue: panelId) => {
- setValue(newValue);
- }
-
- const onCalculateLinkClick = (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) =>{
- e.preventDefault();
- const siteA= props.link.locationA;
- const siteB =props.link.locationB;
- const nameA = props.link.siteA;
- const nameB = props.link.siteB;
- const distance = props.link.length > 0 ? props.link.length : props.link.calculatedLength;
- const azimuthA = props.link.azimuthA;
- const azimuthB = props.link.azimuthB;
- const antennaA = props.link.locationA.antenna;
- const antennaB = props.link.locationB.antenna;
-
-
- let antennaData = "";
- if(antennaA!==null && antennaB!==null){
- antennaData = `&antennaNameA=${antennaA.name}&antennaGainA=${antennaA.gain}&waveguideLossA=${antennaA.waveguideLossIndB}&antennaNameB=${antennaB.name}&antennaGainB=${antennaB.gain}&waveguideLossB=${antennaB.waveguideLossIndB}`;
- }
-
-
-
- const baseUrl = window.location.pathname.split('#')[0];
- window.open(`${baseUrl}#/linkCalculation?lat1=${siteA.lat}&lon1=${siteA.lon}&lat2=${siteB.lat}&lon2=${siteB.lon}&siteA=${nameA}&siteB=${nameB}&azimuthA=${azimuthA}&azimuthB=${azimuthB}&distance=${distance}&amslSiteA=${siteA.amsl}&AGLsiteA=${siteA.antennaHeight}&amslSiteB=${siteB.amsl}&AGLsiteB=${siteB.antennaHeight}${antennaData}`)
-
- }
-
- const onLineofSightClick = (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) =>{
- e.preventDefault();
-
- const siteA= props.link.locationA;
- const siteB =props.link.locationB;
-
- //TODO: add check if available
- let heightPart = `&amslA=${siteA.amsl}&antennaHeightA=${siteA.antennaHeight}&amslB=${siteB.amsl}&antennaHeightB=${siteB.antennaHeight}`;
-
-
- const baseUrl = window.location.pathname.split('#')[0];
- window.open(`${baseUrl}#/lineofsight/los?lat1=${siteA.lat}&lon1=${siteA.lon}&lat2=${siteB.lat}&lon2=${siteB.lon}${heightPart}`);
- }
-
- const data = [
-
- {name:"Site Name", val1: props.link.siteA, val2: props.link.siteB},
- {name:"Latitude", val1: LatLonToDMS(props.link.locationA.lat), val2: LatLonToDMS(props.link.locationB.lat)},
- {name:"Longitude", val1: LatLonToDMS(props.link.locationA.lon, true), val2: LatLonToDMS(props.link.locationB.lon, true)},
- props.link.azimuthA!= null && props.link.azimuthB != null && {name:"Azimuth in °", val1: props.link.azimuthA.toFixed(2), val2: props.link.azimuthB.toFixed(2)}
-];
-
- return (<div style={{ paddingLeft: "15px", paddingRight: "15px", paddingTop: "0px", display: 'flex', flexDirection: 'column' }}>
- <h2>{props.link.name}</h2>
- <TextField inputProps={{ 'aria-label': 'operator' }} disabled style={{ marginTop: "5px" }} value="Unkown" label="Operator" />
- <TextField inputProps={{ 'aria-label': 'type' }} disabled style={{ marginTop: "5px" }} value={props.link.type} label="Type" />
- <TextField inputProps={{ 'aria-label': 'planned-distance-in-km' }} disabled style={{ marginTop: "5px" }} value={props.link.length.toFixed(2)} label="Distance planned in km" />
- <TextField inputProps={{ 'aria-label': 'calculated-distance-in-km' }} disabled style={{ marginTop: "5px" }} value={props.link.calculatedLength.toFixed(2)} label="Distance calculated in km" />
-
- <AppBar position="static" id="site-tabs" style={{ marginTop: "20px", background: '#2E3B55' }}>
- <Typography aria-label="details-of-link-sites" style={{ margin:"5px"}}>SITE DETAILS</Typography>
- </AppBar>
- <DenseTable ariaLabelRow="site-information-table-entry" ariaLabelColumn={["site-name", "latitude", "longitude", "azimuth"]} verticalTable height={height} hover={false} headers={["", "Site A", "Site B"]} data={data} />
- {
- props.link.type==="microwave" &&<>
- <Button style={{marginTop:20}} fullWidth variant="contained" color="primary" onClick={onCalculateLinkClick}>Calculate link</Button>
- <Button style={{marginTop:20}} fullWidth variant="contained" color="primary" onClick={onLineofSightClick}>Line of Sight</Button>
-
- </>
- }
- </div>)
-}
-
-export default LinkDetails; \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/components/details/siteDetails.tsx b/sdnr/wt/odlux/apps/networkMapApp/src/components/details/siteDetails.tsx
deleted file mode 100644
index 7f0c1c926..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/components/details/siteDetails.tsx
+++ /dev/null
@@ -1,248 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-import * as React from 'react';
-import { TextField, Tabs, Tab, Typography, AppBar, Button, Tooltip } from '@material-ui/core';
-
-
-import MaterialTable, { ColumnModel, ColumnType, MaterialTableCtorType } from "../../../../../framework/src/components/material-table";
-
-
-import { Site, Device, Address } from '../../model/site';
-import DenseTable from '../denseTable';
-import { LatLonToDMS } from '../../utils/mapUtils';
-import { CheckDeviceList, InitializeLoadedDevicesAction } from '../../actions/detailsAction';
-import { NavigateToApplication } from '../../../../../framework/src/actions/navigationActions';
-import connect, { Connect, IDispatcher } from '../../../../../framework/src/flux/connect';
-import { IApplicationStoreState } from '../../../../../framework/src/store/applicationStore';
-import StadokSite from '../../model/stadokSite';
-import { requestRest } from '../../../../../framework/src/services/restService';
-import StadokDetailsPopup from './stadokDetailsPopup';
-
-type linkRow = { name: string, azimuth?: string}
-type deviceRow = { id: string;type: string,name: string,manufacturer: string,owner: string,status?: string,port: number[]}
-
-
-type panelId="links" | "nodes";
-type siteDetailProps = {
- site: Site,
- onLinkClick(id: string): void,
-} & props;
-
-type props = Connect<typeof mapStateToProps, typeof mapDispatchToProps>;
-
-
-const SiteDetails: React.FunctionComponent<siteDetailProps> = (props) => {
-
- const [value, setValue] = React.useState<panelId>("links");
- const [height, setHeight] = React.useState(330);
- const [openPopup, setOpenPopup] = React.useState(false);
- const [staSite, setStaSite] = React.useState<StadokSite|null>(null);
-
- const handleResize = () =>{
- const el = document.getElementById('site-details-panel')?.getBoundingClientRect();
- const el2 = document.getElementById('site-tabs')?.getBoundingClientRect();
-
- if(el && el2){
- setHeight(el!.height - el2!.y +20);
- }
-
- }
-
- //on mount
- React.useEffect(()=>{
- handleResize();
-
- window.addEventListener("resize", ()=>{console.log("really got resized.")});
- },[]);
-
- // on update
- React.useEffect(()=>{
-
- if(props.site.devices!== null && props.site.devices.length>0){
- props.initializeDevices(props.site.devices);
- props.loadDevices(props.site.devices);
- }
-
- handleResize();
-
- }, [props.site]);
-
- const onHandleTabChange = (event: React.ChangeEvent<{}>, newValue: panelId) => {
- setValue(newValue);
- }
-
- const getFurtherInformation = (url: string) =>{
-
- const request = requestRest<StadokSite>(url, { method: "GET"});
-
- request.then(result =>{
- if(result){
- setStaSite(result);
- setOpenPopup(true);
- }else{
- console.error(result);
- }
-
-
- });
- }
-
- const closePopup = () =>{
- setOpenPopup(false);
- }
-
- //prepare link table
-
- let hasAzimuth = false;
- const linkRows: linkRow[] = props.site.links?.map(link=>
- {
- if(link.azimuthB!==null){
- hasAzimuth=true;
- return {name: link.name, azimuth: link.azimuthB.toFixed(2) }
-
- }else{
- return {name: link.name }
- }
- });
-
- const linkTableHeader = hasAzimuth ? ["Link Name", "Azimuth in °"] : ["Link Name"];
-
- //prepare device table
- const deviceRows : deviceRow[] = props.updatedDevices?.map(device=>{
- return{
- id: device.id,
- name: device.name,
- type: device.type,
- status: device.status,
- manufacturer: device.manufacturer,
- owner: device.owner,
- port: device.port
- }
- });
-
-
- const adressString = props.site.address == null ? null : buildAdress(props.site.address);
-
-
- return (<div style={{ padding: '15px', display: "flex", flexDirection:"column", minWidth:0, minHeight:0 }}>
- <h2 >{props.site.name}</h2>
- {
- props.site.operator !== '' && props.site.operator !== null ?
- <TextField inputProps={{ 'aria-label': 'operator' }} disabled={true} value={props.site.operator} label="Operator" /> :
- <TextField inputProps={{ 'aria-label': 'operator' }} disabled={true} value="Unkown" label="Operator" style={{ marginTop: "5px" }} />
- }
- {
- props.site.type !== undefined && props.site.type.length > 0 &&
- <TextField inputProps={{ 'aria-label': 'type' }} disabled={true} value={props.site.type} label="Type" style={{ marginTop: "5px" }} />
- }
- {
- adressString !== null &&
- <TextField inputProps={{ 'aria-label': 'adress' }} disabled={true} value={adressString} label="Address" style={{ marginTop: "5px" }} />
- }
- {
- props.site.heightAmslInMeters !== undefined && props.site.heightAmslInMeters > 0 &&
- <TextField inputProps={{ 'aria-label': 'amsl-in-meters' }} disabled={true} value={props.site.heightAmslInMeters} label="AMSL in meters" style={{ marginTop: "5px" }} />
- }
- {
- props.site.antennaHeightAmslInMeters !== undefined && props.site.antennaHeightAmslInMeters > 0 &&
- <TextField inputProps={{ 'aria-label': 'antenna-above-ground-in-meters' }} disabled={true} value={props.site.antennaHeightAmslInMeters} label="Atenna above ground in meters" style={{ marginTop: "5px" }} />
- }
-
- <TextField inputProps={{ 'aria-label': 'latitude' }} style={{ marginTop: "5px" }} disabled={true} value={LatLonToDMS(props.site.location.lat)} label="Latitude" />
- <TextField inputProps={{ 'aria-label': 'longitude' }} style={{ marginTop: "5px" }} disabled={true} value={LatLonToDMS(props.site.location.lon, true)} label="Longitude" />
-
- <AppBar position="static" style={{ marginTop: "5px", background: '#2E3B55' }}>
- <Tabs id="site-tabs" value={value} onChange={onHandleTabChange} aria-label="simple tabs example">
- <Tab label="Links" value="links" />
- <Tab label="Nodes" value="nodes" />
- </Tabs>
- </AppBar>
- {
- value === "links" &&
- <>
- {
- props.site.links==null &&
- <Typography aria-label="no-links-available" variant="body1" style={{ marginTop: '10px' }}>No links available.</Typography>
- }
-
- {
- props.site.links?.length > 0 &&
- <DenseTable ariaLabelRow="available-links-table" ariaLabelColumn={["link-name", "azimuth"]} height={height} hover={true} headers={linkTableHeader} data={linkRows} onClick={props.onLinkClick} ></DenseTable>
- }
-
- </>
-
- }
- {
- value === "nodes" &&
- <>
- {
- props.site.devices === null &&
- <Typography aria-label="no-nodes-avilable" variant="body1" style={{ marginTop: '10px' }}>No nodes available.</Typography>
- }
-
- {
- props.site.devices?.length>0 && props.updatedDevices !== null &&
- <DenseTable ariaLabelRow="available-nodes-table" ariaLabelColumn={["id","name","type","status", "manufacturer","owner", "ports", "actions"]} navigate={props.navigateToApplication} height={height} hover={false} headers={["ID","Name","Type","Status", "Manufacturer","Owner", "Ports", "Actions"]} actions={true} data={deviceRows!} />
- }
- </>
- }
- {
- props.isSitedocReachable && props.site.furtherInformation!==null && props.site.furtherInformation.length>0 &&
- <Button style={{marginTop:20}} fullWidth variant="contained" color="primary" onClick={e => getFurtherInformation(props.site.furtherInformation) }>Further information available</Button>
- }
-
- {
- staSite !== null && openPopup && <StadokDetailsPopup site={staSite} onClose={closePopup} open={true} />
- }
-
- </div>
- )
-}
-
-const buildAdress = (adress: Address) =>{
-
- switch(adress.country){
- case "de":
- return `${adress.streetAndNr}, ${adress.zipCode!== null? adress.zipCode : ''} ${adress.city}`
-
- case "us":
- return `${adress.streetAndNr}, ${adress.city} ${adress.zipCode!== null? adress.zipCode : ''}`
-
- default:
- console.log("address formatting for country {"+adress.country+"} not recognized, defaulting.");
- return `${adress.streetAndNr}, ${adress.zipCode!== null? adress.zipCode : ''} ${adress.city}`
- }
-
-
-}
-
-const mapStateToProps = (state: IApplicationStoreState) => ({
- updatedDevices: state.network.details.checkedDevices,
- isSitedocReachable: state.network.details.isSitedocReachable
-});
-
-const mapDispatchToProps = (dispatcher: IDispatcher) => ({
- initializeDevices: (devices: Device[]) => {dispatcher.dispatch(new InitializeLoadedDevicesAction(devices))},
- loadDevices: async (networkElements: Device[]) => { await dispatcher.dispatch(CheckDeviceList(networkElements)) },
- navigateToApplication: (applicationName: string, path?: string) => dispatcher.dispatch(new NavigateToApplication(applicationName, path, "test3")),
-
-})
-
-export default connect(mapStateToProps, mapDispatchToProps)(SiteDetails); \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/components/details/stadokDetailsPopup.tsx b/sdnr/wt/odlux/apps/networkMapApp/src/components/details/stadokDetailsPopup.tsx
deleted file mode 100644
index 4f3235db7..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/components/details/stadokDetailsPopup.tsx
+++ /dev/null
@@ -1,274 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2021 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-import * as React from 'react';
-
-import MuiDialogTitle from '@material-ui/core/DialogTitle';
-import { AppBar, Dialog, DialogContent, IconButton, Tab, Tabs, TextField, Typography } from '@material-ui/core';
-import CloseIcon from '@material-ui/icons/Close';
-import { withStyles, WithStyles, createStyles, Theme, makeStyles } from '@material-ui/core/styles';
-
-
-import StadokSite from '../../model/stadokSite';
-import { LatLonToDMS } from '../../utils/mapUtils';
-import DenseTable from '../../components/denseTable';
-import { requestRest } from '../../../../../framework/src/services/restService';
-import { OrderToDisplay, StadokOrder } from '../../model/stadokOrder';
-import { CSSProperties } from '@material-ui/core/styles/withStyles';
-import { SITEDOC_URL } from '../../config';
-
-
-type props = { site: StadokSite; onClose(): void; open:boolean };
-
-const styles = (theme: Theme) => createStyles({
- root: {
- margin: 0,
- padding: theme.spacing(2),
- },
- closeButton: {
- position: 'absolute',
- right: theme.spacing(1),
- top: theme.spacing(1),
- color: theme.palette.grey[500],
- },
-});
-
-const useStyles = makeStyles({
- largeImage:{cursor:'pointer', width:300},
- smallImage:{cursor:'pointer', width: 50, marginTop:'10px', marginLeft:'10px'}
-});
-
-const StadokDetailsPopup: React.FunctionComponent<props> = (props) => {
- const classes = useStyles();
-
- const [open, setOpen] = React.useState(props.open);
- const [value, setValue] = React.useState("devices");
- const [orders, setOrders] = React.useState<OrderToDisplay[]|null>(null);
-
- const DialogTitle = withStyles(styles)((props: any) => {
- const { children, classes, onClose, ...other } = props;
- return (
- <MuiDialogTitle disableTypography className={classes.root} {...other}>
- <Typography variant="h6">{children}</Typography>
- {onClose ? (
- <IconButton aria-label="close" style={{position: 'absolute', top:0, right:0, color: 'black'}} onClick={onClose}>
- <CloseIcon />
- </IconButton>
- ) : null}
- </MuiDialogTitle>
- );
- });
-
- const getContacts = (site: StadokSite) =>{
- const contacts = [];
-
- if(site.createdBy){
- contacts.push({h: "Site Creator",col1: site.createdBy.firstName, col2: site.createdBy.lastName, col3: site.createdBy.email, col4: site.createdBy.telephoneNumber });
- }
-
- if(site.contacts.manager){
- contacts.push({h: "Manager",col1: site.contacts.manager.firstName, col2: site.contacts.manager.lastName, col3: site.contacts.manager.email, col4: site.contacts.manager.telephoneNumber });
- }
-
- if(site.contacts.owner){
- contacts.push({h: "Owner",col1: site.contacts.owner.firstName, col2: site.contacts.owner.lastName, col3: site.contacts.owner.email, col4: site.contacts.owner.telephoneNumber });
- }
- return contacts;
- }
-
- const onClose = () =>{
- // setOpen(false);
- props.onClose()
- }
-
- //todo: use a set 'panelId' -> which values are allowed
- const onHandleTabChange = (event: React.ChangeEvent<{}>, newValue: string) => {
- setValue(newValue);
-}
-console.log(props.site)
- const contacts = getContacts(props.site);
-
- const orderUrl=`${SITEDOC_URL}/site/${props.site.siteId}/orders`;
-
- if(orders==null){
- requestRest<StadokOrder[]>(orderUrl,{ method: "GET"}).then(result =>{
- if(result){
- const orderList = result.map(order =>{
- return OrderToDisplay.parse(order);
- });
- setOrders(orderList);
-
- }else{
- setOrders([]);
- }
- });
- }
-
- const createOrderInfo = () => {
-
- if (orders === null) {
- return (<div style={{ height: 300 }}>
- <Typography variant="body1" style={{ marginTop: '10px' }}>
- Loading orders
- </Typography>
- </div>)
- } else if (orders.length === 0) {
- return (<div style={{ height: 300 }}>
- <Typography variant="body1" style={{ marginTop: '10px' }}>
- No orders available
- </Typography>
- </div>)
- } else {
- return <DenseTable data={orders} height={300} headers={["Person", "State", "Current Task"]} hover={false} ariaLabelRow="activity-log-table" />
- }
- }
-
- const displayImages = () => {
-
- if (props.site.images.length === 1) {
- return stadokImage(props.site.siteId, props.site.images[0],"large")
- } else {
- return <>
- {
- stadokImage(props.site.siteId, props.site.images[0], "large")
- }
- <div style={{ display: 'flex', flexDirection: 'row', flexWrap:'wrap' }}>
-
- {
- props.site.images.length<=9 ?
- props.site.images.slice(1, props.site.images.length).map(image =>
- stadokImage(props.site.siteId, image, "small")
- )
- :
- <>
- {
- props.site.images.slice(1, 9).map(image =>
- stadokImage(props.site.siteId, image, "small")
- )
- }
-
- </>
- }
- </div>
- </>
- }
-
- }
-
- const stadokImage = (siteId: string, imagename: string, size: 'large' | 'small') => {
- const url = `${SITEDOC_URL}/site/${siteId}/files/${imagename}`;
- const className = size === "small" ? classes.smallImage : classes.largeImage;
- return <img className={className} src={url} onClick={e => window.open(url)} />
-
- }
-
-
- return (<Dialog onClose={onClose} fullWidth maxWidth="md" aria-labelledby="customized-dialog-title" open={open}>
- <DialogTitle id="customized-dialog-title" onClose={onClose}>
- {props.site.siteId}
- </DialogTitle>
- <DialogContent style={{minWidth:'900px'}} dividers>
- <div style={{ display: 'flex', flexDirection: 'row', flexGrow: 1 }}>
- <div style={{ width: '60%', display:'flex', flexDirection: 'column' }}>
-
- <TextField inputProps={{ 'aria-label': 'type' }} disabled={true} value={props.site.updatedOn} label="Updated on" style={{ marginTop: "5px" }} />
-
-
- {
- props.site.type !== undefined && props.site.type.length > 0 &&
- <TextField inputProps={{ 'aria-label': 'type' }} disabled={true} value={props.site.type} label="Type" style={{ marginTop: "5px" }} />
- }
-
-
- <TextField inputProps={{ 'aria-label': 'adress' }} disabled={true} value={`${props.site.address.streetAndNr}, ${props.site.address.zipCode !== null ? props.site.address.zipCode : ''} ${props.site.address.city}`} label="Address" style={{ marginTop: "5px" }} />
-
-
- <TextField inputProps={{ 'aria-label': 'latitude' }} style={{ marginTop: "5px" }} disabled={true} value={LatLonToDMS(props.site.location.lat)} label="Latitude" />
- <TextField inputProps={{ 'aria-label': 'longitude' }} style={{ marginTop: "5px" }} disabled={true} value={LatLonToDMS(props.site.location.lon, true)} label="Longitude" />
- <AppBar position="static" style={{ marginTop: "5px", background: '#2E3B55' }}>
- <Tabs id="site-tabs" variant="scrollable" scrollButtons="on" value={value} onChange={onHandleTabChange} aria-label="simple tabs example">
- <Tab label="Devices" value="devices" />
- <Tab label="Contacts" value="contacts" />
- <Tab label="Saftey" value="safteyInfo" />
- <Tab label="Logs" value="logs" />
- <Tab label="Orders" value="orders" />
- </Tabs>
- </AppBar>
- {
- value == "devices" && (props.site.devices?.length>0 ?
- <DenseTable data={props.site.devices} height={300} headers={["Device", "Antenna"]} hover={false} ariaLabelRow="devices-table" />
- :
- <div style={{height:300}}>
- <Typography variant="body1" style={{ marginTop: '10px' }}>
- No devices available
- </Typography>
- </div>)
- }
- {
- value == "contacts" && (contacts.length>0 ?
- <DenseTable data={contacts} height={300} headers={["Person", "Firstname", "Lastname", "Email", "Phone No."]} hover={false} ariaLabelRow="contacts-table" ariaLabelColumn={["person", "firstname", "lastname", "email", "phoneno"]} />
- :
- <div style={{height:300}}>
- <Typography variant="body1" style={{ marginTop: '10px' }}>
- No contacts available
- </Typography>
- </div>)
- }
- {
- value == "safteyInfo" && (props.site.safteyNotices.length>0 ?
- <DenseTable data={props.site.safteyNotices} height={300} headers={["Note"]} hover={false} ariaLabelRow="saftey-info-table" />
- :
- <div style={{height:300}}>
- <Typography variant="body1" style={{ marginTop: '10px' }}>
- No saftey notices applicable
- </Typography>
- </div>)
- }
- {
- value == "logs" && (props.site.logs.length>0 ?
- <DenseTable data={props.site.logs} height={300} headers={["Date","Person", "Activity"]} hover={false} ariaLabelRow="activity-log-table" />
- :
- <div style={{height:300}}>
- <Typography variant="body1" style={{ marginTop: '10px' }}>
- No activity log available
- </Typography>
- </div>)
- }
-
- {
- value ==="orders" && createOrderInfo()
- }
-
- </div>
- <div style={{padding: '10px', display: 'flex', alignItems:'center', flexDirection:'column', justifyContent: 'start', width:'40%'}}>
- {
- props.site.images.length == 0 ?
- <Typography variant="body1" style={{ marginTop: '10px' }}>
- No images available
- </Typography>
- : displayImages()
- }
- </div>
- </div>
-
- </DialogContent>
- </Dialog>)
-
-}
-
-export default StadokDetailsPopup; \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/components/map/connectionInfo.tsx b/sdnr/wt/odlux/apps/networkMapApp/src/components/map/connectionInfo.tsx
deleted file mode 100644
index 3b5a15ce5..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/components/map/connectionInfo.tsx
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-import * as React from 'react'
-
-import { IApplicationStoreState } from "../../../../../framework/src/store/applicationStore";
-import connect, { IDispatcher, Connect } from "../../../../../framework/src/flux/connect";
-import { Paper, Typography } from "@material-ui/core";
-import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
-import { faExclamationTriangle } from '@fortawesome/free-solid-svg-icons';
-
-
-type props = Connect<typeof mapStateToProps, typeof mapDispatchToProps>;
-
-const ConnectionInfo: React.FunctionComponent<props> = (props) => {
-
- return ((props.isTopoServerReachable === false || props.isTileServerReachable === false )? <Paper style={{padding:5, position: 'absolute', top: 160, width: 230, left:"40%", zIndex:1}}>
- <div style={{display: 'flex', flexDirection: 'column'}}>
- <div style={{'alignSelf': 'center', marginBottom:5}}> <Typography> <FontAwesomeIcon icon={faExclamationTriangle} /> Connection Error</Typography></div>
- {props.isTileServerReachable === false && <Typography> Tile data can't be loaded.</Typography>}
- {props.isTopoServerReachable === false && <Typography > Network data can't be loaded.</Typography>}
- </div>
- </Paper> : null
-)
-
-}
-
-const mapStateToProps = (state: IApplicationStoreState) => ({
- isTopoServerReachable: state.network.connectivity.isToplogyServerAvailable,
- isTileServerReachable: state.network.connectivity.isTileServerAvailable
-
-});
-
-
-
-const mapDispatchToProps = (dispatcher: IDispatcher) => ({
-
- //zoomToSearchResult: (lat: number, lon: number) => dispatcher.dispatch(new ZoomToSearchResultAction(lat, lon))
-
-});;
-
-
-export default connect(mapStateToProps,mapDispatchToProps)(ConnectionInfo)
-
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/components/map/iconSwitch.tsx b/sdnr/wt/odlux/apps/networkMapApp/src/components/map/iconSwitch.tsx
deleted file mode 100644
index 221e7dab8..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/components/map/iconSwitch.tsx
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-import * as React from 'react';
-import { FormControlLabel, Switch, Paper } from "@material-ui/core";
-import connect, { Connect, IDispatcher } from '../../../../../framework/src/flux/connect';
-import { IApplicationStoreState } from '../../../../../framework/src/store/applicationStore';
-import { SetIconSwitchAction } from '../../actions/mapActions';
-
-type props = Connect<typeof mapStateToProps, typeof mapDispatchToProps> & {visible: boolean}
-
-const IconSwitch: React.FunctionComponent<props> = (props) =>{
-
- const toggleChecked = () => {
- props.toogle(!props.areIconsEnabled)
- };
-
- return (
- props.visible ?
- <FormControlLabel style={{ padding:5, position: 'absolute',top: 190, zIndex:1}}
- value="end"
- control={<Switch color="secondary" style={{zIndex:1}} checked={props.areIconsEnabled} onChange={toggleChecked} />}
- label="Show icons"
- labelPlacement="end"
- />: null)
-}
-
-const mapStateToProps = (state: IApplicationStoreState) => ({
- areIconsEnabled: state.network.map.allowIconSwitch
-});
-
-
-const mapDispatchToProps = (dispatcher: IDispatcher) => ({
- toogle : (enable:boolean) => dispatcher.dispatch(new SetIconSwitchAction(enable))
-
-});;
-
-export default (connect(mapStateToProps,mapDispatchToProps)(IconSwitch))
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/components/map/map.tsx b/sdnr/wt/odlux/apps/networkMapApp/src/components/map/map.tsx
deleted file mode 100644
index 1314edbba..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/components/map/map.tsx
+++ /dev/null
@@ -1,697 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-import * as React from 'react'
-import * as mapboxgl from 'mapbox-gl';
-import { RouteComponentProps, withRouter } from 'react-router-dom';
-
-
-import { Site } from '../../model/site';
-import { SelectSiteAction, ClearHistoryAction, SelectLinkAction } from '../../actions/detailsAction';
-import { OSM_STYLE, URL_API, URL_BASEPATH, URL_TILE_API } from '../../config';
-import { link } from '../../model/link';
-import MapPopup from './mapPopup';
-import { SetPopupPositionAction, SelectMultipleLinksAction, SelectMultipleSitesAction } from '../../actions/popupActions';
-import { Feature } from '../../model/Feature';
-import { HighlightLinkAction, HighlightSiteAction, SetCoordinatesAction, SetStatistics } from '../../actions/mapActions';
-import { addDistance, getUniqueFeatures, increaseBoundingBox } from '../../utils/mapUtils';
-import { IApplicationStoreState } from '../../../../../framework/src/store/applicationStore';
-import connect, { IDispatcher, Connect } from '../../../../../framework/src/flux/connect';
-import SearchBar from './searchBar';
-import { verifyResponse, IsTileServerReachableAction, handleConnectionError, setTileServerReachableAction, IsBusycheckingConnectivityAction } from '../../actions/connectivityAction';
-import ConnectionInfo from './connectionInfo'
-import mapLayerService from '../../utils/mapLayers';
-import Statistics from './statistics';
-import IconSwitch from './iconSwitch';
-import { addImages } from '../../services/mapImagesService';
-import { PopupElement } from '../../model/popupElements';
-import { Button } from '@material-ui/core';
-import { NavigateToApplication } from '../../../../../framework/src/actions/navigationActions';
-import customize from '../../../icons/customize.png';
-
-type coordinates = { lat: number, lon: number, zoom: number }
-
-let alarmElements: Feature[] = [];
-let map: mapboxgl.Map;
-let isLoadingInProgress = false;
-let notLoadedBoundingBoxes: mapboxgl.LngLatBounds[] = [];
-
-let lastBoundingBox: mapboxgl.LngLatBounds | null = null;
-let myRef = React.createRef<HTMLDivElement>();
-
-import 'mapbox-gl/dist/mapbox-gl.css';
-
-class Map extends React.Component<mapProps, { isPopupOpen: boolean }> {
-
- constructor(props: mapProps) {
- super(props);
- //any state stuff
- this.state = { isPopupOpen: false }
-
- }
-
- updateTheme(){
- mapLayerService.settings=this.props.settings.themes;
- if(this.props.settings.mapSettings?.networkMap.styling.theme){
- mapLayerService.selectedTheme = this.props.settings.mapSettings?.networkMap.styling.theme;
- }
- }
-
- updateOpacity(){
- if(this.props.settings.mapSettings && this.props.settings.mapSettings.networkMap.tileOpacity){
- mapLayerService.changeMapOpacity(map, Number(this.props.settings.mapSettings.networkMap.tileOpacity));
- }
- }
-
- async componentDidMount() {
-
- // resize the map, if menu gets collapsed
- window.addEventListener("menu-resized", this.handleResize);
-
- //pass themes to mapLayerService
- this.updateTheme();
-
- // try if connection to tile + topologyserver are available
-
- try {
- const tiles = await fetch(URL_TILE_API + '/10/0/0.png');
- if (tiles.ok) {
- this.props.setTileServerLoaded(true);
- }else{
- this.props.setTileServerLoaded(false);
- }
-
- } catch (error) {
- this.props.setTileServerLoaded(false);
- console.error("tileserver " + URL_TILE_API + " can't be reached.");
- }
-
- try {
- const topology = await fetch(URL_API + "/info/count/all");
- verifyResponse(topology);
- } catch (error) {
- this.props.handleConnectionError(error)
- }
-
- //both done
- this.props.setConnectivityCheck(false);
- //map loaded in componentDidUpdate
- }
-
- setupMap = () => {
-
- let lat = this.props.lat;
- let lon = this.props.lon;
- let zoom = this.props.zoom;
-
- if(this.props.settings.mapSettings){
- if(this.props.settings.mapSettings.networkMap.startupPosition.latitude){
- lat = Number(this.props.settings.mapSettings.networkMap.startupPosition.latitude)
- }
-
- if(this.props.settings.mapSettings.networkMap.startupPosition.longitude){
- lon = Number(this.props.settings.mapSettings.networkMap.startupPosition.longitude)
- }
-
- if(this.props.settings.mapSettings.networkMap.startupPosition.zoom){
- zoom = Number(this.props.settings.mapSettings.networkMap.startupPosition.zoom)
- }
-
- }
-
- const coordinates = this.extractCoordinatesFromUrl();
- // override lat/lon/zoom with coordinates from url, if available
- if (this.areCoordinatesValid(coordinates)) {
- lat = coordinates.lat;
- lon = coordinates.lon;
- zoom = !Number.isNaN(coordinates.zoom) ? coordinates.zoom : zoom;
- }
-
- map = new mapboxgl.Map({
- container: myRef.current!,
- style: OSM_STYLE as any,
- center: [lon, lat],
- zoom: zoom,
- accessToken: ''
- });
-
- map.on('load', (ev) => {
-
- map.setMaxZoom(18);
- const bbox = map.getBounds();
- this.props.updateMapPosition(bbox.getCenter().lat, bbox.getCenter().lng, map.getZoom())
-
- mapLayerService.addBaseSources(map, this.props.selectedSite, this.props.selectedLink);
-
- addImages(map, (result: boolean)=>{
- if(map.getZoom()>11 && this.props.showIcons)
- {
- mapLayerService.addIconLayers(map, this.props.selectedSite?.properties.id)
- }else{
- mapLayerService.addBaseLayers(map);
- }
- this.updateOpacity();
-
- });
-
- const boundingBox = increaseBoundingBox(map);
-
- fetch(`${URL_API}/links/geojson/${boundingBox.west},${boundingBox.south},${boundingBox.east},${boundingBox.north}`)
- .then(result => verifyResponse(result))
- .then(result => result.json())
- .then(features => {
- if (map.getSource('lines')) {
- (map.getSource('lines') as mapboxgl.GeoJSONSource).setData(features);
- }
- })
- .catch(error => this.props.handleConnectionError(error));
-
-
- fetch(`${URL_API}/sites/geojson/${boundingBox.west},${boundingBox.south},${boundingBox.east},${boundingBox.north}`)
- .then(result => verifyResponse(result))
- .then(result => result.json())
- .then(features => {
- if (map.getSource('points')) {
- (map.getSource('points') as mapboxgl.GeoJSONSource).setData(features);
- }
- })
- .catch(error => this.props.handleConnectionError(error));
-
- map.on('click', this.mapClick);
- map.on('moveend', this.mapMoveEnd);
- map.on('move', this.mapMove);
-
- });
- }
-
- mapMove = () => {
-
- const mapZoom = map.getZoom();
-
- const boundingBox = map.getBounds();
-
- this.loadNetworkData(boundingBox);
- if (mapZoom > 9) {
-
- if (map.getLayer('points')) {
- map.setLayoutProperty('selectedPoints', 'visibility', 'visible');
- map.setPaintProperty('points', 'circle-radius', 7);
- }
- } else {
-
- // reduce size of points / lines if zoomed out
- map.setPaintProperty('points', 'circle-radius', 2);
- map.setLayoutProperty('selectedPoints', 'visibility', 'none');
-
- if (mapZoom <= 4) {
- map.setPaintProperty('fibre-lines', 'line-width', 1);
- map.setPaintProperty('microwave-lines', 'line-width', 1);
-
- } else {
- map.setPaintProperty('fibre-lines', 'line-width', 2);
- map.setPaintProperty('microwave-lines', 'line-width', 2);
- }
- }
- };
-
- mapClick = (e: any) => {
-
-
- if (map.getLayer('points')) { // data is shown as points
-
- var clickedLines = getUniqueFeatures(map.queryRenderedFeatures([[e.point.x - 5, e.point.y - 5],
- [e.point.x + 5, e.point.y + 5]], {
- layers: ['microwave-lines', 'fibre-lines']
- }), "id");
-
- const clickedPoints = getUniqueFeatures(map.queryRenderedFeatures(e.point, { layers: ['points'] }), "id");
- const alarmedSites = getUniqueFeatures(map.queryRenderedFeatures(e.point, { layers: ['alarmedPoints'] }), "id");
-
- if (clickedPoints.length != 0) {
-
-
- if (alarmedSites.length > 0) {
- alarmedSites.forEach(alarm => {
- const index = clickedPoints.findIndex(item => item.properties!.id === alarm.properties!.id);
-
- if (index !== -1) {
- clickedPoints[index].properties!.alarmed = true;
- clickedPoints[index].properties!.type = "alarmed";
- }
- });
- }
-
- this.showSitePopup(clickedPoints, e.point.x, e.point.y);
- } else if (clickedLines.length != 0) {
- this.showLinkPopup(clickedLines, e.point.x, e.point.y);
- }
-
-
- } else { // data is shown as icons
-
- const clickedSites = getUniqueFeatures(map.queryRenderedFeatures(e.point, { layers: ['point-lamps', 'point-building', 'point-data-center', 'point-factory', 'point-remaining'] }), "id");
- const clickedLines = getUniqueFeatures(map.queryRenderedFeatures([[e.point.x - 5, e.point.y - 5],
- [e.point.x + 5, e.point.y + 5]], {
- layers: ['microwave-lines', 'fibre-lines']
- }), "id");
-
- if (clickedSites.length > 0)
- this.showSitePopup(clickedSites, e.point.x, e.point.y);
- else if (clickedLines.length != 0) {
- this.showLinkPopup(clickedLines, e.point.x, e.point.y);
- }
- }
- };
-
- mapMoveEnd = () => {
-
- const mapZoom = Number(map.getZoom().toFixed(2));
- const lat = Number(map.getCenter().lat.toFixed(4));
- const lon = Number(map.getCenter().lng.toFixed(4));
-
-
- if (this.props.lat !== lat || this.props.lon !== lon || this.props.zoom !== mapZoom) {
- this.props.updateMapPosition(lat, lon, mapZoom)
- }
-
- // update the url to current lat,lon,zoom values
-
- const currentUrl = window.location.href;
- const parts = currentUrl.split(URL_BASEPATH);
- if (parts.length > 0) {
-
- const detailsPath = parts[1].split("/details/");
-
- if (detailsPath[1] !== undefined && detailsPath[1].length > 0) {
- this.props.history.replace(`/${URL_BASEPATH}/${map.getCenter().lat.toFixed(4)},${map.getCenter().lng.toFixed(4)},${mapZoom.toFixed(2)}/details/${detailsPath[1]}`)
- }
- else {
- this.props.history.replace(`/${URL_BASEPATH}/${map.getCenter().lat.toFixed(4)},${map.getCenter().lng.toFixed(4)},${mapZoom.toFixed(2)}`)
- }
- }
-
-
- //switch icon layers if applicable
-
- mapLayerService.showIconLayers(map, this.props.showIcons, this.props.selectedSite?.properties.id);
-
- //update statistics
- const boundingBox = map.getBounds();
-
- fetch(`${URL_API}/info/count/${boundingBox.getWest()},${boundingBox.getSouth()},${boundingBox.getEast()},${boundingBox.getNorth()}`)
- .then(result => verifyResponse(result))
- .then(res => res.json())
- .then(result => {
- if (result.links !== this.props.linkCount || result.sites !== this.props.siteCount) {
- this.props.setStatistics(result.links, result.sites);
- }
- })
- .catch(error => this.props.handleConnectionError(error));;
- }
-
- componentDidUpdate(prevProps: mapProps, prevState: {}) {
-
- if(prevProps !== this.props){
- //(load map)
- //triggered if either settings were done loading or tile/topology server connectivity checked
- if(prevProps.settings !== this.props.settings || this.props.isConnectivityCheckBusy !== prevProps.isConnectivityCheckBusy){
-
- //update theme if settings changed
- if(prevProps.settings !== this.props.settings){
- this.updateTheme();
- }
-
- //if everything done loading/reachable, load map
- if(!this.props.isConnectivityCheckBusy && this.props.isTileServerReachable && !this.props.settings.isLoadingData && (prevProps.settings.isLoadingData !==this.props.settings.isLoadingData || prevProps.isConnectivityCheckBusy !== this.props.isConnectivityCheckBusy)){
-
- if(map == undefined){
- this.setupMap();
- }
- else
- if(map.getContainer() !== myRef.current){
- // reload map, because the current container (fresh div) doesn't hold the map and changing containers isn't supported
- map.remove();
- this.setupMap();
- }
- }
- }
-
- if (map !== undefined) {
- if (prevProps.selectedSite?.properties.id !== this.props.selectedSite?.properties.id) {
-
- if (this.props.selectedSite != null) {
- if (map.getSource("selectedLine") !== undefined) {
- (map.getSource("selectedLine") as mapboxgl.GeoJSONSource).setData({ type: "FeatureCollection", features: [] });
- (map.getSource("selectedPoints") as mapboxgl.GeoJSONSource).setData({ type: "FeatureCollection", features: [this.props.selectedSite] });
- }
-
-
- if (map.getLayer('point-lamps') !== undefined) {
-
- map.setFilter('point-lamps', ['==', 'type', 'street lamp']);
- map.setFilter('point-data-center', ['==', 'type', 'data center']);
- map.setFilter('point-building', ['==', 'type', 'high rise building']);
- map.setFilter('point-factory', ['==', 'type', 'factory']);
-
- if (this.props.selectedSite?.properties.type !== undefined) {
- switch (this.props.selectedSite?.properties.type) {
- case 'street lamp':
- map.setFilter('point-lamps', ["all", ['==', 'type', 'street lamp'], ['!=', 'id', this.props.selectedSite.properties.id]]);
- break;
- case 'data center':
- map.setFilter('point-data-center', ["all", ['==', 'type', 'data center'], ['!=', 'id', this.props.selectedSite.properties.id]]);
- break;
- case 'high rise building':
- map.setFilter('point-building', ["all", ['==', 'type', 'high rise building'], ['!=', 'id', this.props.selectedSite.properties.id]])
- break;
- case 'factory':
- map.setFilter('point-factory', ["all", ['==', 'type', 'factory'], ['!=', 'id', this.props.selectedSite.properties.id]]);
- break;
- }
- }
- }
-
-
- }
- else
- {
- if (map.getSource("selectedPoints") !== undefined)
- (map.getSource("selectedPoints") as mapboxgl.GeoJSONSource).setData({ type: "FeatureCollection", features: [] });
-
- }
- }
-
- if (prevProps.selectedLink !== this.props.selectedLink) {
- if (this.props.selectedLink != null) {
-
- if (map.getLayer('point-lamps') !== undefined) {
- map.setFilter('point-lamps', ['==', 'type', 'street lamp']);
- map.setFilter('point-data-center', ['==', 'type', 'data center']);
- map.setFilter('point-building', ['==', 'type', 'high rise building']);
- map.setFilter('point-factory', ['==', 'type', 'factory']);
- }
-
- if (map.getSource("selectedLine") !== undefined) {
- (map.getSource("selectedPoints") as mapboxgl.GeoJSONSource).setData({ type: "FeatureCollection", features: [] });
- (map.getSource("selectedLine") as mapboxgl.GeoJSONSource).setData({ type: "FeatureCollection", features: [this.props.selectedLink] });
- }
- }
- else
- {
- if (map.getSource("selectedLine") !== undefined)
- (map.getSource("selectedLine") as mapboxgl.GeoJSONSource).setData({ type: "FeatureCollection", features: [] });
- }
- }
-
- if (prevProps.location.pathname !== this.props.location.pathname) {
- if (map) {
- const coordinates = this.extractCoordinatesFromUrl();
- this.moveMapToCoordinates(coordinates);
- }
- }
-
- if (prevProps.alarmlement !== this.props.alarmlement) {
- if (this.props.alarmlement !== null && !alarmElements.includes(this.props.alarmlement)) {
- if (map.getSource("alarmedPoints"))
- (map.getSource("alarmedPoints") as mapboxgl.GeoJSONSource).setData({ type: "FeatureCollection", features: alarmElements });
- alarmElements.push(this.props.alarmlement)
- }
- }
-
- if (prevProps.showIcons !== this.props.showIcons) {
- if (map && map.getZoom() > 11) {
- mapLayerService.showIconLayers(map, this.props.showIcons, this.props.selectedSite?.properties.id);
- }
- }
-
- if (prevProps.zoomToElement !== this.props.zoomToElement) {
- if (this.props.zoomToElement !== null) {
- const currentZoom = map?.getZoom();
-
- map.flyTo({
- center: [
- this.props.zoomToElement.lon,
- this.props.zoomToElement.lat
- ], zoom: currentZoom < 10 ? 10 : currentZoom,
- essential: true
- });
- }
- }
- }
- }
- }
-
- componentWillUnmount(){
-
- //unregister events
- window.removeEventListener("menu-resized", this.handleResize);
-
- if(map){
- map.off('click', this.mapClick);
- map.off('moveend', this.mapMoveEnd);
- map.off('move', this.mapMove);
- }
-
- lastBoundingBox=null;
-
- // will be checked again on next load
- this.props.setConnectivityCheck(true);
- }
-
- handleResize = () => {
- if (map) {
- // wait a moment until resizing actually happened
- window.setTimeout(() => map.resize(), 500);
- }
- }
-
- extractCoordinatesFromUrl = (): coordinates => {
- const currentUrl = window.location.href;
- const mainPathParts = currentUrl.split(URL_BASEPATH);
- const coordinatePathPart = mainPathParts[1].split("/details/"); // split by details if present
- const allCoordinates = coordinatePathPart[0].replace("/", "");
- const coordinates = allCoordinates.split(",");
- return { lat: Number(coordinates[0]), lon: Number(coordinates[1]), zoom: Number(coordinates[2]) }
- }
-
- areCoordinatesValid = (coordinates: coordinates) => {
-
- if ((!Number.isNaN(coordinates.lat)) && (!Number.isNaN(coordinates.lon))) {
- return true;
- } else {
- return false;
- }
- }
-
- moveMapToCoordinates = (coordinates: coordinates) => {
-
- if (this.areCoordinatesValid(coordinates)) {
- let zoom = -1;
-
- if (!Number.isNaN(coordinates.zoom)) {
- zoom = coordinates.zoom;
- }
-
- map.flyTo({
- center: [
- coordinates.lon,
- coordinates.lat
- ], zoom: zoom !== -1 ? zoom : this.props.zoom,
- essential: true
- })
- }
- }
-
- loadNetworkData = async (bbox: mapboxgl.LngLatBounds) => {
- if (!isLoadingInProgress) { // only load data if loading not in progress
- isLoadingInProgress = true;
-
- if (lastBoundingBox == null) {
- lastBoundingBox = bbox;
- await this.draw('lines', `${URL_API}/links/geojson/${lastBoundingBox.getWest()},${lastBoundingBox.getSouth()},${lastBoundingBox.getEast()},${lastBoundingBox.getNorth()}`);
- await this.draw('points', `${URL_API}/sites/geojson/${lastBoundingBox.getWest()},${lastBoundingBox.getSouth()},${lastBoundingBox.getEast()},${lastBoundingBox.getNorth()}`);
- } else {
-
- // new bbox is bigger than old one
- if (bbox.contains(lastBoundingBox.getNorthEast()) && bbox.contains(lastBoundingBox.getSouthWest()) && lastBoundingBox !== bbox) { //if new bb is bigger than old one
-
- lastBoundingBox = bbox;
-
- //calculate new boundingBox
- const increasedBoundingBox = increaseBoundingBox(map);
-
- await this.draw('lines', `${URL_API}/links/geojson/${increasedBoundingBox.west},${increasedBoundingBox.south},${increasedBoundingBox.east},${increasedBoundingBox.north}`);
- await this.draw('points', `${URL_API}/sites/geojson/${increasedBoundingBox.west},${increasedBoundingBox.south},${increasedBoundingBox.east},${increasedBoundingBox.north}`);
-
- } else if (lastBoundingBox.contains(bbox.getNorthEast()) && lastBoundingBox.contains(bbox.getSouthWest())) { // last one contains new one
- // bbox is contained in last one, do nothing
- isLoadingInProgress = false;
-
- } else { // bbox is not fully contained in old one, extend
-
- lastBoundingBox.extend(bbox);
-
- await this.draw('lines', `${URL_API}/links/geojson/${lastBoundingBox.getWest()},${lastBoundingBox.getSouth()},${lastBoundingBox.getEast()},${lastBoundingBox.getNorth()}`);
- await this.draw('points', `${URL_API}/sites/geojson/${lastBoundingBox.getWest()},${lastBoundingBox.getSouth()},${lastBoundingBox.getEast()},${lastBoundingBox.getNorth()}`);
- }
-
- }
-
-
- if (notLoadedBoundingBoxes.length > 0) { // load last not loaded boundingbox
- this.loadNetworkData(notLoadedBoundingBoxes.pop()!)
- notLoadedBoundingBoxes = [];
- }
-
- } else {
- notLoadedBoundingBoxes.push(bbox);
- }
- }
-
- showSitePopup = (sites: mapboxgl.MapboxGeoJSONFeature[], top: number, left: number) => {
- if (sites.length > 1) {
- const elements: PopupElement[] = sites.map(feature => {return {name: feature.properties!.name, id: feature.properties!.id}});
-
- this.props.setPopupPosition(top, left);
- this.props.selectMultipleSites(elements); //name, id object container
- this.setState({ isPopupOpen: true });
-
- } else {
- const id = sites[0].properties!.id;
-
- fetch(`${URL_API}/sites/${id}`)
- .then(result => verifyResponse(result))
- .then(res => res.json() as Promise<Site>)
- .then(result => {
- this.props.selectSite(result);
- this.props.highlightSite(result);
- this.props.clearDetailsHistory();
- })
- .catch(error => this.props.handleConnectionError(error));;
- }
- }
-
- showLinkPopup = (links: mapboxgl.MapboxGeoJSONFeature[], top: number, left: number) => {
-
- if (links.length > 1) {
-
- const elements: PopupElement[] = links.map(feature => {return {name: feature.properties!.name, id: feature.properties!.id}});
-
- this.props.setPopupPosition(top, left);
- this.props.selectMultipleLinks(elements);
- this.setState({ isPopupOpen: true });
-
- } else {
- var id = links[0].properties!.id;
-
- fetch(`${URL_API}/links/${id}`)
- .then(result => verifyResponse(result))
- .then(res => res.json() as Promise<link>)
- .then(result => {
- this.props.selectLink(result);
- this.props.highlightLink(result);
-
- this.props.clearDetailsHistory();
- })
- .catch(error => this.props.handleConnectionError(error));;
- }
- }
-
- draw = async (layer: string, url: string) => {
-
- fetch(url)
- .then(result => verifyResponse(result))
- .then(res => res.json())
- .then(result => {
- isLoadingInProgress = false;
- if (map.getSource(layer)) {
- (map.getSource(layer) as mapboxgl.GeoJSONSource).setData(result);
- }
- })
- .catch(error => this.props.handleConnectionError(error));;
- }
-
- render() {
-
- return <>
-
-{
- !this.props.settings.isLoadingData ?
-
- <div id="map" style={{ width: "70%", position: 'relative' }} ref={myRef} >
- {
- this.state.isPopupOpen &&
- <MapPopup onClose={() => { this.setState({ isPopupOpen: false }); }} />
- }
- <SearchBar />
- <Statistics />
- <IconSwitch visible={this.props.zoom>11} />
- <ConnectionInfo />
- <Button
- disabled={!this.props.isTopoServerReachable}
- style={{'position': 'absolute', 'right':5, top:5, backgroundColor:'white', zIndex:1}}
- onClick={e => this.props.navigateToApplication("network", "customize")} >
- <img src={customize} />
- </Button>
- </div>
- :<div style={{ width: "70%", position: 'relative' }} />
-
- }
- </>
- }
-
-}
-
-type mapProps = RouteComponentProps & Connect<typeof mapStateToProps, typeof mapDispatchToProps>;
-
-const mapStateToProps = (state: IApplicationStoreState) => ({
- selectedLink: state.network.map.selectedLink,
- selectedSite: state.network.map.selectedSite,
- zoomToElement: state.network.map.zoomToElement,
- alarmlement: state.network.map.alarmlement,
- lat: state.network.map.lat,
- lon: state.network.map.lon,
- zoom: state.network.map.zoom,
- linkCount: state.network.map.statistics.links,
- siteCount: state.network.map.statistics.sites,
- isTopoServerReachable: state.network.connectivity.isToplogyServerAvailable,
- isTileServerReachable: state.network.connectivity.isTileServerAvailable,
- isConnectivityCheckBusy: state.network.connectivity.isBusy,
- showIcons: state.network.map.allowIconSwitch,
- settings: state.network.settings,
-});
-
-const mapDispatchToProps = (dispatcher: IDispatcher) => ({
- selectSite: (site: Site) => dispatcher.dispatch(new SelectSiteAction(site)),
- selectLink: (link: link) => dispatcher.dispatch(new SelectLinkAction(link)),
- clearDetailsHistory: () => dispatcher.dispatch(new ClearHistoryAction()),
- selectMultipleLinks: (ids: PopupElement[]) => dispatcher.dispatch(new SelectMultipleLinksAction(ids)),
- selectMultipleSites: (ids: PopupElement[]) => dispatcher.dispatch(new SelectMultipleSitesAction(ids)),
- setPopupPosition: (x: number, y: number) => dispatcher.dispatch(new SetPopupPositionAction(x, y)),
- highlightLink: (link: link) => dispatcher.dispatch(new HighlightLinkAction(link)),
- highlightSite: (site: Site) => dispatcher.dispatch(new HighlightSiteAction(site)),
- updateMapPosition: (lat: number, lon: number, zoom: number) => dispatcher.dispatch(new SetCoordinatesAction(lat, lon, zoom)),
- setStatistics: (linkCount: string, siteCount: string) => dispatcher.dispatch(new SetStatistics(siteCount, linkCount)),
- setTileServerLoaded: (reachable: boolean) => dispatcher.dispatch(setTileServerReachableAction(reachable)),
- handleConnectionError: (error: Error) => dispatcher.dispatch(handleConnectionError(error)),
- navigateToApplication: (applicationName: string, path?: string) => dispatcher.dispatch(new NavigateToApplication(applicationName, path, "test3")),
- setConnectivityCheck: (done: boolean) => dispatcher.dispatch(new IsBusycheckingConnectivityAction(done)),
-
-})
-
-export default withRouter(connect(mapStateToProps, mapDispatchToProps)(Map)); \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/components/map/mapPopup.tsx b/sdnr/wt/odlux/apps/networkMapApp/src/components/map/mapPopup.tsx
deleted file mode 100644
index 7a64f5a58..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/components/map/mapPopup.tsx
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-import * as React from 'react';
-import { Typography, Select, MenuItem, ClickAwayListener, Popper, Paper, FormGroup, Portal, Popover } from '@material-ui/core';
-import { SelectSiteAction, ClearHistoryAction, ClearDetailsAction } from '../../actions/detailsAction';
-import { Site } from '../../model/site';
-import { link } from '../../model/link';
-import { URL_API } from '../../config';
-import { HighlightLinkAction, HighlightSiteAction } from '../../actions/mapActions';
-import { IApplicationStoreState } from '../../../../../framework/src/store/applicationStore';
-import connect, { IDispatcher, Connect } from '../../../../../framework/src/flux/connect';
-import { verifyResponse, handleConnectionError } from '../../actions/connectivityAction';
-
-
-
-
-const MapPopup: React.FunctionComponent<props> = (props) => {
-
- const [value, setValue] = React.useState("");
-
- const handleChange = (event: any) => {
- setValue(event.target.value);
-
- const id = event.target.value;
-
-
- fetch(`${URL_API}/${props.type.toLocaleLowerCase()}s/${id}`)
- .then(result => verifyResponse(result))
- .then(res => res.json())
- .then(result => {
- props.clearDetailsHistory();
- props.selectElement(result);
- props.type === "link" ? props.highlightLink(result) : props.highlightSite(result)
- props.onClose();
- })
- .catch(error => {
- props.handleConnectionError(error);
- props.onClose();
- // props.clearDetails();
- });
- };
-
- return <>
- <Popover open={true} anchorEl={undefined} onClose={props.onClose} anchorReference="anchorPosition" anchorPosition={{ top: props.position.left, left: props.position.top }}>
- <Paper style={{ padding: "15px" }}>
- <Typography variant="h5">{`Multiple ${props.type.toLowerCase()}s were selected`}</Typography>
- <Typography variant="body1">Please select one.</Typography>
- <Select style={{ width: 300 }} onChange={handleChange} value={value} native>
- <option value={""} disabled>{props.type} ids</option>
- {
- props.elements.map(el => <option key={el.id} value={el.id}>{el.name}</option>)
- }
- </Select>
- </Paper>
- </Popover>
- </>
-}
-
-type props = Connect<typeof mapStateToProps, typeof mapDispatchToProps>& { onClose(): void }
-
-const mapStateToProps = (state: IApplicationStoreState) => ({
- elements: state.network.popup.selectionPendingForElements,
- type: state.network.popup.pendingDataType,
- position: state.network.popup.position
-
-});
-
-const mapDispatchToProps = (dispatcher: IDispatcher) => ({
- selectElement: (site: Site) => dispatcher.dispatch(new SelectSiteAction(site)),
- clearDetailsHistory:()=> dispatcher.dispatch(new ClearHistoryAction()),
- highlightLink: (link: link) => dispatcher.dispatch(new HighlightLinkAction(link)),
- highlightSite: (site: Site) => dispatcher.dispatch(new HighlightSiteAction(site)),
- handleConnectionError: (error:Error) => dispatcher.dispatch(handleConnectionError(error)),
- clearDetails: () => dispatcher.dispatch(new ClearDetailsAction()),
-
-});
-
-export default (connect(mapStateToProps, mapDispatchToProps))(MapPopup); \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/components/map/searchBar.tsx b/sdnr/wt/odlux/apps/networkMapApp/src/components/map/searchBar.tsx
deleted file mode 100644
index 307c5d203..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/components/map/searchBar.tsx
+++ /dev/null
@@ -1,161 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-import * as React from 'react';
-import { makeStyles, Paper, InputBase, IconButton, Divider, Popover, Typography } from '@material-ui/core';
-import SearchIcon from '@material-ui/icons/Search';
-
-import { URL_API } from '../../config';
-import { isSite } from '../../utils/utils';
-import { Site } from '../../model/site';
-import { link } from '../../model/link';
-import { SelectSiteAction, SelectLinkAction } from '../../actions/detailsAction';
-import { HighlightLinkAction, HighlightSiteAction, ZoomToSearchResultAction } from '../../actions/mapActions';
-import { calculateMidPoint } from '../../utils/mapUtils';
-import { SetSearchValueAction } from '../../actions/searchAction';
-import connect,{ Connect, IDispatcher } from '../../../../../framework/src/flux/connect';
-import { IApplicationStoreState } from '../../../../../framework/src/store/applicationStore';
-
-
-
-
-
-
-const styles = makeStyles({
- root: {
- //{ padding:5, position: 'absolute', display:'flex', flexDirection:"column",top: 150, width: 200}
- padding: '2px 4px',
- position: 'absolute',
- display:'flex',
- alignItems: 'center',
- top: 15,
- marginLeft: 5,
- width: 400,
- zIndex:1
- },
- input: {
- flex: 1,
- marginLeft: 5
- },
- iconButton: {
- padding: 10,
- },
- divider: {
- height: 28,
- margin: 4,
- },
- });
-
-
-const SearchBar: React.FunctionComponent<searchBarProps> = (props) =>{
-
- const classes = styles();
- const [anchorEl, setAnchorEl] = React.useState<any>(null);
- const [errorMessage, setErrorMessage] = React.useState("");
-
- const divRef = React.useRef();
-
- const handleClick = (e: any) =>{
-
- setAnchorEl(null);
- if(props.searchterm.length>0){
-
- const siteResult = fetch(`${URL_API}/sites/name/${props.searchterm}`)
-
- const linkResult = fetch(`${URL_API}/links/${props.searchterm}`);
-
- Promise.all([ siteResult, linkResult]).then((result)=>{
- const suceededResults = result.filter(el=> el.ok);
-
- if(suceededResults.length==0){
- setAnchorEl(divRef.current);
- setErrorMessage("No element found.")
- // hide message after 3 sec
- window.setTimeout(()=>{setAnchorEl(null)}, 3000);
-
- }else{
- suceededResults[0].json().then(result =>{
- if(isSite(result)){
- props.selectSite(result);
- props.highlightSite(result);
- props.zoomToSearchResult(result.location.lat, result.location.lon);
- }else{
- props.selectLink(result);
- props.highlightLink(result);
- const midPoint = calculateMidPoint(result.locationA.lat, result.locationA.lon, result.locationB.lat, result.locationB.lon);
- props.zoomToSearchResult(midPoint[1], midPoint[0])
- }
- });
- }
- });
- }
- e.preventDefault();
-}
-
- const open = Boolean(anchorEl);
-
- const reachabe = props.isTopoServerReachable && props.isTileServerReachable;
-
- return (
- <>
- <Paper ref={divRef} component="form" className={classes.root}>
- <InputBase
- disabled={!reachabe}
- className={classes.input}
- placeholder="Find sites or links by name"
- inputProps={{ 'aria-label': 'networkmap-searchbar' }}
- value={props.searchterm}
- onChange={e=> props.setSearchTerm(e.currentTarget.value)}
- />
- <Divider className={classes.divider} orientation="vertical" />
- <IconButton type="submit" className={classes.iconButton} aria-label="search" onClick={handleClick}>
- <SearchIcon />
- </IconButton>
- </Paper>
- <Popover open={open} onClose={e=> setAnchorEl(null)} anchorEl={anchorEl} anchorOrigin={{
- vertical: "bottom",
- horizontal: "left"
- }}>
- <Paper style={{width: 380, padding:10}}>
- <Typography variant="body1">{errorMessage}</Typography>
- </Paper>
- </Popover>
- </>
- );
-}
-
-const mapStateToProps = (state: IApplicationStoreState) => ({
- searchterm: state.network.search.value,
- isTopoServerReachable: state.network.connectivity.isToplogyServerAvailable,
- isTileServerReachable: state.network.connectivity.isTileServerAvailable
-
-});
-
-type searchBarProps = Connect<typeof mapStateToProps, typeof mapDispatchToProps>;
-
-
-const mapDispatchToProps = (dispatcher: IDispatcher) => ({
- selectSite:(site: Site)=> dispatcher.dispatch(new SelectSiteAction(site)),
- selectLink:(link: link) => dispatcher.dispatch(new SelectLinkAction(link)),
- highlightLink:(link: link)=> dispatcher.dispatch(new HighlightLinkAction(link)),
- highlightSite: (site: Site) => dispatcher.dispatch(new HighlightSiteAction(site)),
- setSearchTerm: (value: string) => dispatcher.dispatch(new SetSearchValueAction(value)),
- zoomToSearchResult: (lat: number, lon: number) => dispatcher.dispatch(new ZoomToSearchResultAction(lat, lon)),
-});;
-
-export default (connect(mapStateToProps,mapDispatchToProps)(SearchBar)) \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/components/map/statistics.tsx b/sdnr/wt/odlux/apps/networkMapApp/src/components/map/statistics.tsx
deleted file mode 100644
index 562689198..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/components/map/statistics.tsx
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-import * as React from 'react';
-import { Paper, Typography, Tooltip } from '@material-ui/core';
-import InfoIcon from '@material-ui/icons/Info';
-
-import { IApplicationStoreState } from '../../../../../framework/src/store/applicationStore';
-import connect, { IDispatcher, Connect } from '../../../../../framework/src/flux/connect';
-
-type props = Connect<typeof mapStateToProps, typeof mapDispatchToProps>;
-
-const mapStateToProps = (state: IApplicationStoreState) => ({
- linkCount: state.network.map.statistics.links,
- siteCount: state.network.map.statistics.sites,
- isTopoServerReachable: state.network.connectivity.isToplogyServerAvailable,
- isTileServerReachable: state.network.connectivity.isTileServerAvailable,
-
-});
-
-const mapDispatchToProps = (dispatcher: IDispatcher) => ({
-});
-
-const Statistics: React.FunctionComponent<props> = (props: props) =>{
-
- const reachabe = props.isTopoServerReachable && props.isTileServerReachable;
-
-
- return (<Paper style={{ padding: 5, position: 'absolute', display: 'flex', flexDirection: "column", top: 70, width: 200, marginLeft: 5, zIndex:1 }}>
- <div style={{ display: 'flex', flexDirection: "row" }}>
- <Typography style={{ fontWeight: "bold", flex: "1", color: reachabe ? "black" : "lightgrey" }} >Statistics</Typography>
- <Tooltip style={{ alignSelf: "flex-end" }} title="Gets updated when the map stops moving.">
- <InfoIcon fontSize="small" />
- </Tooltip>
- </div>
-
- <Typography style={{ color: reachabe ? "black" : "lightgrey" }}>Sites: {props.siteCount}</Typography>
- <Typography style={{ color: reachabe ? "black" : "lightgrey" }}>Links: {props.linkCount}</Typography>
-</Paper>)
-}
-
-export default connect(mapStateToProps, mapDispatchToProps)(Statistics);
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/config.ts b/sdnr/wt/odlux/apps/networkMapApp/src/config.ts
deleted file mode 100644
index bdb7d15e6..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/config.ts
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-export const URL_API="/topology/network"
-export const SITEDOC_URL="/sitedoc";
-export const URL_TILE_API = '/tiles'; // http://tile.openstreetmap.org can be used for local testing, never commit with tile url changed! /tiles
-
-
-export const OSM_STYLE = {
- 'version': 8,
- 'sources': {
- 'raster-tiles': {
- 'type': 'raster',
- 'tiles': [
- URL_TILE_API+'/{z}/{x}/{y}.png'
- ],
- 'tileSize': 256,
- 'attribution':
- '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
- }
- },
- 'layers': [
- {
- 'id': 'simple-tiles',
- 'type': 'raster',
- 'source': 'raster-tiles',
- 'minZoom': 0,
- 'maxZoom': 18
- }
- ]
-};
-
-export const URL_BASEPATH = "network";
-
-
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/handlers/connectivityReducer.ts b/sdnr/wt/odlux/apps/networkMapApp/src/handlers/connectivityReducer.ts
deleted file mode 100644
index 8ab82f2e9..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/handlers/connectivityReducer.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-import { IActionHandler } from "../../../../framework/src/flux/action";
-import { IsTopologyServerReachableAction, IsTileServerReachableAction, IsBusycheckingConnectivityAction } from "../actions/connectivityAction";
-
-
-export type connectivityState = {isToplogyServerAvailable: boolean, isTileServerAvailable: boolean, isBusy: boolean };
-
-const initialState: connectivityState = {isToplogyServerAvailable: true, isTileServerAvailable: true, isBusy: true};
-
-export const ConnectivityReducer: IActionHandler<connectivityState> =(state=initialState, action)=> {
-
- if(action instanceof IsTopologyServerReachableAction){
- state = Object.assign({}, state, { isToplogyServerAvailable: action.reachable });
- }
- else if (action instanceof IsTileServerReachableAction){
- state = Object.assign({}, state, { isTileServerAvailable: action.reachable });
-
- }else if(action instanceof IsBusycheckingConnectivityAction){
- state = {...state, isBusy: action.isBusy}
-
- }
-
- return state;
-} \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/handlers/detailsReducer.ts b/sdnr/wt/odlux/apps/networkMapApp/src/handlers/detailsReducer.ts
deleted file mode 100644
index 8a7fc6ada..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/handlers/detailsReducer.ts
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-import { IActionHandler } from '../../../../framework/src/flux/action';
-import { link } from "../model/link";
-import { Site, Device } from "../model/site";
-import { HistoryEntry } from "../model/historyEntry";
-import { SelectSiteAction, SelectLinkAction, AddToHistoryAction, ClearHistoryAction, IsBusyCheckingDeviceListAction, FinishedLoadingDeviceListAction, ClearLoadedDevicesAction, ClearDetailsAction, InitializeLoadedDevicesAction, IsSitedocReachableAction } from '../actions/detailsAction';
-
-export type DetailsStoreState={
- data: Site | link | null,
- history: HistoryEntry[],
- isBusyCheckingDeviceList: boolean,
- checkedDevices: Device[],
- isSitedocReachable: boolean
-
-}
-
-const initialState: DetailsStoreState = {
- data: null,
- history:[],
- isBusyCheckingDeviceList: false,
- checkedDevices: [],
- isSitedocReachable: false
-}
-
-export const DetailsReducer:IActionHandler<DetailsStoreState>=(state = initialState, action)=>{
-
- if(action instanceof SelectSiteAction){
- state= Object.assign({}, state, {data: action.site});
- }
- else if(action instanceof SelectLinkAction){
- state = Object.assign({}, state, {data: action.link});
- }else if(action instanceof ClearDetailsAction){
- state = Object.assign({}, state, {data: null});
- }
- else if(action instanceof AddToHistoryAction){
- state = Object.assign({}, state, {history: [...state.history, action.entry]})
-
- }else if(action instanceof ClearHistoryAction){
- state = Object.assign({}, state, {history: []});
-
- }else if(action instanceof IsBusyCheckingDeviceListAction){
- state = Object.assign({}, state, {isBusyCheckingDeviceList: action.isBusy});
- }else if (action instanceof FinishedLoadingDeviceListAction){
- state = Object.assign({}, state, {checkedDevices: action.devices});
-
- }else if(action instanceof ClearLoadedDevicesAction){
- state = Object.assign({}, state, {checkedDevices: []});
-
- }else if(action instanceof InitializeLoadedDevicesAction){
- state = Object.assign({}, state, {checkedDevices: action.devices});
- }else if(action instanceof IsSitedocReachableAction){
- state = Object.assign({}, state, {isSitedocReachable: action.isReachable});
- }
-
-
- return state;
-
-}
-
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/handlers/mapReducer.ts b/sdnr/wt/odlux/apps/networkMapApp/src/handlers/mapReducer.ts
deleted file mode 100644
index 442a5083c..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/handlers/mapReducer.ts
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-import { IActionHandler } from '../../../../framework/src/flux/action';
-import { Feature } from "../model/Feature";
-import { HighlightLinkAction, HighlightSiteAction, ZoomToSearchResultAction, AddAlarmAction, SetCoordinatesAction, SetStatistics, SetIconSwitchAction, RemoveHighlightingAction } from '../actions/mapActions';
-
-export type location = {lat: number, lon:number}
-
-export type mapState = {
- selectedLink: Feature | null,
- selectedSite: Feature | null,
- zoomToElement: location | null,
- alarmlement: Feature|null,
- lat: number,
- lon: number,
- zoom: number,
- statistics:{links: string, sites: string},
- allowIconSwitch: boolean
-}
-
-const initialState: mapState ={
- selectedLink: null,
- selectedSite: null,
- zoomToElement: null,
- alarmlement: null,
- lat: 52.5095,
- lon: 13.3290,
- zoom: 10,
- statistics:{links:"Not counted yet.", sites: "Not counted yet."},
- allowIconSwitch: true
-}
-
-export const MapReducer: IActionHandler<mapState> = (state=initialState, action: any) => {
-
- if(action instanceof HighlightLinkAction){
-
- state = Object.assign({}, state, {selectedSite: null, selectedLink:{type: "Feature", properties:{id:action.link.id, type: action.link.type}, geometry:{type:"LineString", coordinates:[[action.link.locationA.lon,action.link.locationA.lat ],[action.link.locationB.lon,action.link.locationB.lat ]]}}})
-
-
- }
- else if(action instanceof HighlightSiteAction){
-
- state = Object.assign({}, state, {selectedLink: null, selectedSite:{type: "Feature", properties: {id: action.site.id, type:action.site.type}, geometry:{type:"Point", coordinates:[action.site.location.lon,action.site.location.lat ]}}})
-
- }else if (action instanceof ZoomToSearchResultAction){
- state = Object.assign({}, state, {zoomToElement:{lat: action.lat, lon: action.lon}});
- }else if (action instanceof AddAlarmAction){
- state = Object.assign({}, state, {alarmlement:{type: "Feature", properties: {id: action.site.id, type:action.site.type}, geometry:{type:"Point", coordinates:[action.site.location.lon,action.site.location.lat ]}}});
-
- }else if(action instanceof SetCoordinatesAction){
- state = Object.assign({}, state, {lat:action.lat, lon: action.lon, zoom:action.zoom});
-
- }else if(action instanceof SetStatistics){
- state = Object.assign({}, state, {statistics:{sites: action.siteCount, links: action.linkCount}});
-
- }else if (action instanceof SetIconSwitchAction){
- state = Object.assign({}, state, {allowIconSwitch: action.enable});
-
- }else if(action instanceof RemoveHighlightingAction){
- state = Object.assign({}, state, {selectedLink: null, selectedSite:null})
-
- }
-
- return state;
-} \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/handlers/popupReducer.ts b/sdnr/wt/odlux/apps/networkMapApp/src/handlers/popupReducer.ts
deleted file mode 100644
index deb366e09..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/handlers/popupReducer.ts
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-import { PopupElement } from 'model/popupElements';
-import { IActionHandler } from '../../../../framework/src/flux/action';
-import { SelectMultipleLinksAction, SelectMultipleSitesAction, SetPopupPositionAction } from "../actions/popupActions";
-
-export type popupStoreState = {
- selectionPendingForElements: PopupElement[],
- pendingDataType: "link"|"site"| "",
- position: { top: number, left: number }
-};
-
-const initialState: popupStoreState = {
- selectionPendingForElements: [],
- pendingDataType: "",
- position: { top: 0, left: 0 }
-};
-
-export const PopupsReducer: IActionHandler<popupStoreState> = (state = initialState, action) => {
-
- if(action instanceof SelectMultipleLinksAction){
- state = Object.assign({}, state, { selectionPendingForElements: action.elements, pendingDataType: "link", isSelectionNeeded: true });
-
- }else if(action instanceof SelectMultipleSitesAction){
- state = Object.assign({}, state, { selectionPendingForElements: action.elements, pendingDataType: "site", isSelectionNeeded: true });
-
- }else if(action instanceof SetPopupPositionAction){
- state= Object.assign({}, state, {position:{top:action.top, left: action.left}})
-
- }
-
-
- return state;
-
-} \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/handlers/rootReducer.ts b/sdnr/wt/odlux/apps/networkMapApp/src/handlers/rootReducer.ts
deleted file mode 100644
index 697dbd7a0..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/handlers/rootReducer.ts
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-import { combineActionHandler } from '../../../../framework/src/flux/middleware';
-
-import { DetailsReducer, DetailsStoreState } from "./detailsReducer";
-import { PopupsReducer, popupStoreState } from "./popupReducer";
-import { MapReducer, mapState } from "./mapReducer";
-import { SearchReducer, searchState } from "./searchReducer";
-import { connectivityState, ConnectivityReducer } from './connectivityReducer';
-import { SettingsReducer, SettingsState } from './settingsReducer';
-
-export interface INetworkAppStoreState{
- details: DetailsStoreState,
- popup: popupStoreState,
- map: mapState,
- search: searchState,
- connectivity: connectivityState,
- settings: SettingsState
-}
-
-declare module '../../../../framework/src/store/applicationStore' {
- interface IApplicationStoreState {
- network: INetworkAppStoreState
- }
- }
-
-const appHandler = {
- details: DetailsReducer,
- popup: PopupsReducer,
- map: MapReducer,
- search: SearchReducer,
- connectivity: ConnectivityReducer,
- settings: SettingsReducer};
-
-export const networkmapRootHandler = combineActionHandler<INetworkAppStoreState>(appHandler)
-
-export default networkmapRootHandler; \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/handlers/searchReducer.ts b/sdnr/wt/odlux/apps/networkMapApp/src/handlers/searchReducer.ts
deleted file mode 100644
index 68aade477..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/handlers/searchReducer.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-import { IActionHandler } from '../../../../framework/src/flux/action';
-import { SetSearchValueAction } from "../actions/searchAction";
-
-export type searchState = {value: string};
-
-const initialState: searchState = {value: ''};
-
-export const SearchReducer: IActionHandler<searchState> =(state=initialState, action)=> {
-
- if(action instanceof SetSearchValueAction){
- state = Object.assign({}, state, { value: action.value });
- }
-
- return state;
-} \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/handlers/settingsReducer.ts b/sdnr/wt/odlux/apps/networkMapApp/src/handlers/settingsReducer.ts
deleted file mode 100644
index 977a379a0..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/handlers/settingsReducer.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2021 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-import { NetworkMapSettings, NetworkMapThemes } from "../model/settings";
-import { IActionHandler } from "../../../../framework/src/flux/action";
-import { SetBusyLoadingAction, SetMapSettingsAction, SetSettingsAction, SetThemeSettingsAction } from "../actions/settingsAction";
-
-export type SettingsState = {
- mapSettings: NetworkMapSettings|null,
- themes: NetworkMapThemes,
- isLoadingData: boolean
-};
-
-
-const defaultThemes:NetworkMapThemes = {networkMapThemes:{themes: [
-
- {key: "light", site: "#11b4da", selectedSite: "#116bda", fiberLink: "#1154d9", microwaveLink: "#039903"},
- {key: "dark", site: "#000000", selectedSite: "#6e6e6e", fiberLink: "#0a2a6b", microwaveLink: "#005200"},
-]}}
-
-const initialState: SettingsState = {
- mapSettings: null,
- themes: defaultThemes,
- isLoadingData: true
-
-};
-
-export const SettingsReducer: IActionHandler<SettingsState> = (state = initialState, action) => {
-
- if(action instanceof SetSettingsAction){
- state = {
- isLoadingData: false,
- mapSettings: {networkMap: action.settings.networkMap},
- themes:{networkMapThemes: {themes: action.settings.networkMapThemes.themes}}
- };
- }else if(action instanceof SetMapSettingsAction){
- state={...state, mapSettings: action.settings};
- }else if(action instanceof SetThemeSettingsAction){
- state={...state, themes:{networkMapThemes: {themes: action.settings.networkMapThemes.themes}}};
- }else if(action instanceof SetBusyLoadingAction){
- state={...state, isLoadingData: action.busy};
- }
-
- return state;
-
-} \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/index.html b/sdnr/wt/odlux/apps/networkMapApp/src/index.html
deleted file mode 100644
index f70571152..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/index.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-
-<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <!-- <link rel="stylesheet" href="./vendor.css" > -->
- <title>Networkmap App</title>
-</head>
-
-<body>
- <div id="app"></div>
- <script type="text/javascript" src="./require.js"></script>
- <script type="text/javascript" src="./config.js"></script>
-
- <script>
- // run the application
- require(["app","connectApp","faultApp", "networkMapApp", "configurationApp", "linkCalculationApp"], function (app, connectApp, faultApp, networkMapApp, configurationApp, linkCalculationApp) {
- connectApp.register();
- faultApp.register();
- //configurationApp.register();
- linkCalculationApp.register();
- networkMapApp.register();
- app("./app.tsx").runApplication();
- });
- </script>
-</body>
-
-</html> \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/model/Feature.ts b/sdnr/wt/odlux/apps/networkMapApp/src/model/Feature.ts
deleted file mode 100644
index c4f9ad1cb..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/model/Feature.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-export type Feature = {type: "Feature", properties: {id: string, type?: string}, geometry: Geometry}
-
-export type Geometry = Point | LineString;
-
-type Point = {type: "Point", coordinates: number[]}
-
-type LineString ={type: "LineString", coordinates: number[][]} \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/model/count.ts b/sdnr/wt/odlux/apps/networkMapApp/src/model/count.ts
deleted file mode 100644
index 726e2ff76..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/model/count.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-export type elementCount ={sites: string, links: string} \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/model/historyEntry.ts b/sdnr/wt/odlux/apps/networkMapApp/src/model/historyEntry.ts
deleted file mode 100644
index d7197a4d1..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/model/historyEntry.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-import { Site } from "./site";
-import { link } from "./link";
-
-export type HistoryEntry={id: string, data: Site|link}; \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/model/link.ts b/sdnr/wt/odlux/apps/networkMapApp/src/model/link.ts
deleted file mode 100644
index c1612098d..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/model/link.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-type Antenna = {
- name:string,
- waveguideLossIndB: number,
- gain: number
-}
-
-export type link = {id: string,
- name: string,
- length: number,
- calculatedLength: number,
- type: string,
- siteA: string,
- siteB: string,
- azimuthA: number | null,
- azimuthB: number | null,
- locationA: { lon: number, lat: number, amsl:number | null, antennaHeight: number | null, antenna: Antenna |null },
- locationB: { lon: number, lat: number, amsl:number | null, antennaHeight: number | null, antenna: Antenna |null },
- }; \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/model/popupElements.ts b/sdnr/wt/odlux/apps/networkMapApp/src/model/popupElements.ts
deleted file mode 100644
index 320d7ca6e..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/model/popupElements.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-export type PopupElement = {
- name: string,
- id: string
-} \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/model/settings.ts b/sdnr/wt/odlux/apps/networkMapApp/src/model/settings.ts
deleted file mode 100644
index 521f47ccc..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/model/settings.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2021 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-export type NetworkMapSettings = {
- networkMap: {
- startupPosition: { latitude?: string, longitude?: string, zoom?: string },
- tileOpacity: string,
- styling: { theme: string } } };
-
-export type ThemeElement = {
- key: string,
- site: string,
- selectedSite: string,
- microwaveLink: string,
- fiberLink: string};
-
-export type NetworkMapThemes = {networkMapThemes: {themes: ThemeElement[]} };
-
-export type NetworkSettings = NetworkMapSettings & NetworkMapThemes; \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/model/site.ts b/sdnr/wt/odlux/apps/networkMapApp/src/model/site.ts
deleted file mode 100644
index 13a7361f6..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/model/site.ts
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-import { link } from "./link";
-
-export type Site = {
- id: string,
- name: string,
- address: Address,
- heightAmslInMeters?: number, //AboveGroundLevel
- antennaHeightAmslInMeters?: number,
- type?: string,
- operator: string,
- location:{lon: number, lat: number},
- devices: Device[],
- links: link[],
- furtherInformation:string
-}
-
-export type Address={
- streetAndNr: string,
- city: string,
- zipCode: string | null,
- country: string
-}
-
-export class Device {
- id: string;
- type: string;
- name: string;
- manufacturer: string;
- owner: string;
- status?: string;
- port: number[];
-} \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/model/stadokOrder.ts b/sdnr/wt/odlux/apps/networkMapApp/src/model/stadokOrder.ts
deleted file mode 100644
index 1aad3aa97..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/model/stadokOrder.ts
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2021 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-export type StadokOrder = {
- date: Date,
- assignedUser: string,
- state: string, //todo: type restrict
- tasks: Task[],
-
-
-};
-
-export class OrderToDisplay {
-
- static parse = (stadokOrder: StadokOrder) =>{
- let order = new OrderToDisplay();
- order.assignedUser=stadokOrder.assignedUser;
- order.state=stadokOrder.state;
-
- const firstOpenTask = stadokOrder.tasks.find(task => !task.status);
-
- if(firstOpenTask){
- order.currentTask=firstOpenTask.description;
- }else{
- order.currentTask="No task description available";
- }
-
- return order;
- }
-
- state: string;
- assignedUser: string;
- currentTask: string;
-
-};
-
-type Task = {
- type: string,
- description: string,
- status: boolean
-} \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/model/stadokSite.ts b/sdnr/wt/odlux/apps/networkMapApp/src/model/stadokSite.ts
deleted file mode 100644
index ed0ca397f..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/model/stadokSite.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2021 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-import { Address } from "./site";
-
-type StadokSite = {
-
- siteId: string;
- createdBy: Contact;
- updatedOn: Date;
- location: { lat: number, lon: number },
- address: Address;
- contacts: { manager: Contact, owner: Contact };
- safteyNotices: string[];
- images: string[];
- type: string;
- devices: Device[];
- logs: Log[];
-
-};
-
-type Contact = {
- firstName: string;
- lastName: string;
- email: string;
- telephoneNumber: string;
-};
-type Log = {
- date: Date, //string?
- person: string;
- entry: string;
-};
-
-type Device = {
- "device": string,
- "antenna": string
-};
-
-export default StadokSite; \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/pluginTransport.tsx b/sdnr/wt/odlux/apps/networkMapApp/src/pluginTransport.tsx
deleted file mode 100644
index 24a46994a..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/pluginTransport.tsx
+++ /dev/null
@@ -1,117 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-// app configuration and main entry point for the app
-
-import * as React from "react";
-import { faMapMarked } from '@fortawesome/free-solid-svg-icons'; // select app icon
-import applicationManager from '../../../framework/src/services/applicationManager';
-
-
-import { networkmapRootHandler } from './handlers/rootReducer';
-import MainView from "./App";
-import { subscribe, IFormatedMessage } from "../../../framework/src/services/notificationService";
-import applicationApi from "../../../framework/src/services/applicationApi";
-import { checkSitedockReachablity, IsSitedocReachableAction, UpdateDetailsView } from "./actions/detailsAction";
-import { findSiteToAlarm } from "./actions/mapActions";
-import { URL_BASEPATH } from "./config";
-import { Redirect, Route, RouteComponentProps, Switch, withRouter } from "react-router-dom";
-import CustomizationView from "./components/customize/customizationView";
-import { getSettings } from "./actions/settingsAction";
-import connect, { Connect, IDispatcher } from "../../../framework/src/flux/connect";
-import { IApplicationStoreState } from "../../../framework/src/store/applicationStore";
-
-const mapProps = (state: IApplicationStoreState) => ({
-});
-
-const mapDisp = (dispatcher: IDispatcher) => ({
- getSettings: () => dispatcher.dispatch(getSettings()),
- tryReachSitedoc: () => dispatcher.dispatch(checkSitedockReachablity())
-
-});
-
-
-const NetworkRouterApp = withRouter(connect(mapProps, mapDisp)((props: RouteComponentProps & Connect<typeof mapProps, typeof mapDisp>) => {
-
- React.useLayoutEffect(() => {
- (async function waitFor() {
- await props.getSettings();
- })();
-
- props.tryReachSitedoc();
-
- }, []);
-
- //props.history.action = "POP";
- return (
- <Switch>
- <Route path={`${props.match.path}/customize`} component={CustomizationView} />
- <Route path={`${props.match.path}`} component={MainView} />
- <Redirect to={`${props.match.path}`} />
- </Switch>
- )
-}));
-
-export function register() {
- applicationManager.registerApplication({
- name: URL_BASEPATH, // used as name of state as well
- icon: faMapMarked,
- rootActionHandler: networkmapRootHandler,
- rootComponent: NetworkRouterApp,
- menuEntry: "Network Map"
- });
-}
-
-type ObjectNotification = {
- counter: string;
- nodeName: string;
- objectId: string;
- timeStamp: string;
-}
-
-type FaultAlarmNotification = {
- id: string;
- nodeName: string;
- counter: number;
- timeStamp: string;
- objectId: string;
- problem: string;
- severity: null | 'Warning' | 'Minor' | 'Major' | 'Critical';
- type: string;
- sourceType: string;
-}
-/*
-// subscribe to the websocket notifications from connect
-subscribe<ObjectNotification & IFormatedMessage>(["ObjectCreationNotification", "ObjectDeletionNotification", "AttributeValueChangedNotification"], (msg => {
- const store = applicationApi.applicationStore;
-
- //store && store.dispatch(UpdateDetailsView(msg.nodeName))
-
-}));
-*/
-
-/*
-subscribe<FaultAlarmNotification & IFormatedMessage>("ProblemNotification", (fault => {
- const store = applicationApi && applicationApi.applicationStore;
- if (fault && store) {
- store.dispatch(findSiteToAlarm(fault.nodeName));
-
-
- }
-}));*/
-
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/services/mapImagesService.ts b/sdnr/wt/odlux/apps/networkMapApp/src/services/mapImagesService.ts
deleted file mode 100644
index 30714b82a..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/services/mapImagesService.ts
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-import * as mapboxgl from 'mapbox-gl';
-import apartment from '../../icons/apartment.png';
-import datacenter from '../../icons/datacenter.png';
-import factory from '../../icons/factory.png';
-import lamp from '../../icons/lamp.png';
-import datacenterred from '../../icons/datacenterred.png';
-import factoryred from '../../icons/factoryred.png';
-import lampred from '../../icons/lampred.png';
-
-
-type ImagesLoaded = (allImagesLoaded: boolean) => void;
-type MapImages = {name: string, url: string}
-
-export const Images : MapImages[] = [
- {name: 'data-center', url: datacenter},
- {name: 'house', url: apartment},
- {name: 'factory', url: factory},
- {name: 'lamp', url: lamp},
- {name: 'data-center-red', url: datacenterred},
- {name: 'factory-red', url: factoryred},
- {name: 'lamp-red', url: lampred},
-] ;
-
-export const addImages = (map: mapboxgl.Map, callback?: ImagesLoaded) =>{
-
- Images.forEach(image => {
-
- map.loadImage(
- image.url,
- function (error: any, img: any) {
- if (error) throw error;
- map.addImage(image.name, img);
- allImagesLoaded(map, callback);
- });
- });
-}
-
-const allImagesLoaded = (map: mapboxgl.Map, callback?: ImagesLoaded) =>{
-
- const loadedImages = Images.map(image =>{
- return map.hasImage(image.name);
- });
-
- const allImagesLoaded = loadedImages.filter(el => !el);
- if(allImagesLoaded.length===0){
- callback && callback(true);
- }
-} \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/services/settingsService.ts b/sdnr/wt/odlux/apps/networkMapApp/src/services/settingsService.ts
deleted file mode 100644
index 2a2f09466..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/services/settingsService.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2021 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-import { NetworkMapSettings, NetworkMapThemes, NetworkSettings } from "../model/settings";
-import { requestRest } from "../../../../framework/src/services/restService";
-
- class SettingsService{
-
- public getMapSettings = async () =>{
- const result = await requestRest<any>("/userdata", {method: "GET"});
- return result;
- }
-
- public getMapThemes = async () =>{
- const result = await requestRest<NetworkMapThemes>("/userdata/networkMapThemes", {method: "GET"});
- return result;
- }
-
- public updateMapSettings = async (newElement: NetworkMapSettings) =>{
-
- const result = await requestRest<NetworkMapSettings>("/userdata/networkMap", {method: "PUT", body: JSON.stringify(newElement.networkMap)});
- return result;
- }
-
-
- }
-
- export const settingsService = new SettingsService(); \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/styles/index.css b/sdnr/wt/odlux/apps/networkMapApp/src/styles/index.css
deleted file mode 100644
index ec2585e8c..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/styles/index.css
+++ /dev/null
@@ -1,13 +0,0 @@
-body {
- margin: 0;
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
- 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
- sans-serif;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
-}
-
-code {
- font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
- monospace;
-}
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/styles/mapbox-gl.css b/sdnr/wt/odlux/apps/networkMapApp/src/styles/mapbox-gl.css
deleted file mode 100644
index 03c479af9..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/styles/mapbox-gl.css
+++ /dev/null
@@ -1 +0,0 @@
-.mapboxgl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0);text-align:left}.mapboxgl-map:-webkit-full-screen{width:100%;height:100%}.mapboxgl-canary{background-color:salmon}.mapboxgl-canvas-container.mapboxgl-interactive,.mapboxgl-ctrl-group button.mapboxgl-ctrl-compass{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.mapboxgl-canvas-container.mapboxgl-interactive.mapboxgl-track-pointer{cursor:pointer}.mapboxgl-canvas-container.mapboxgl-interactive:active,.mapboxgl-ctrl-group button.mapboxgl-ctrl-compass:active{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate,.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate .mapboxgl-canvas{touch-action:pan-x pan-y}.mapboxgl-canvas-container.mapboxgl-touch-drag-pan,.mapboxgl-canvas-container.mapboxgl-touch-drag-pan .mapboxgl-canvas{touch-action:pinch-zoom}.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan,.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan .mapboxgl-canvas{touch-action:none}.mapboxgl-ctrl-bottom-left,.mapboxgl-ctrl-bottom-right,.mapboxgl-ctrl-top-left,.mapboxgl-ctrl-top-right{position:absolute;pointer-events:none;z-index:2}.mapboxgl-ctrl-top-left{top:0;left:0}.mapboxgl-ctrl-top-right{top:0;right:0}.mapboxgl-ctrl-bottom-left{bottom:0;left:0}.mapboxgl-ctrl-bottom-right{right:0;bottom:0}.mapboxgl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.mapboxgl-ctrl-top-left .mapboxgl-ctrl{margin:10px 0 0 10px;float:left}.mapboxgl-ctrl-top-right .mapboxgl-ctrl{margin:10px 10px 0 0;float:right}.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl{margin:0 0 10px 10px;float:left}.mapboxgl-ctrl-bottom-right .mapboxgl-ctrl{margin:0 10px 10px 0;float:right}.mapboxgl-ctrl-group{border-radius:4px;background:#fff}.mapboxgl-ctrl-group:not(:empty){-moz-box-shadow:0 0 2px rgba(0,0,0,.1);-webkit-box-shadow:0 0 2px rgba(0,0,0,.1);box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (-ms-high-contrast:active){.mapboxgl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.mapboxgl-ctrl-group button{width:29px;height:29px;display:block;padding:0;outline:none;border:0;box-sizing:border-box;background-color:transparent;cursor:pointer}.mapboxgl-ctrl-group button+button{border-top:1px solid #ddd}.mapboxgl-ctrl button .mapboxgl-ctrl-icon{display:block;width:100%;height:100%;background-repeat:no-repeat;background-position:50%}@media (-ms-high-contrast:active){.mapboxgl-ctrl-icon{background-color:transparent}.mapboxgl-ctrl-group button+button{border-top:1px solid ButtonText}}.mapboxgl-ctrl button::-moz-focus-inner{border:0;padding:0}.mapboxgl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.mapboxgl-ctrl button:disabled{cursor:not-allowed}.mapboxgl-ctrl button:disabled .mapboxgl-ctrl-icon{opacity:.25}.mapboxgl-ctrl button:not(:disabled):hover{background-color:rgba(0,0,0,.05)}.mapboxgl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.mapboxgl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.mapboxgl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.mapboxgl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.mapboxgl-ctrl-group button:focus:only-child{border-radius:inherit}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z'/%3E%3C/svg%3E")}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z'/%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z'/%3E%3C/svg%3E")}}.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z'/%3E%3C/svg%3E")}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z'/%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z'/%3E%3C/svg%3E")}}.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath d='M10.5 16l4 8 4-8h-8z' fill='%23ccc'/%3E%3C/svg%3E")}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath d='M10.5 16l4 8 4-8h-8z' fill='%23999'/%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath d='M10.5 16l4 8 4-8h-8z' fill='%23ccc'/%3E%3C/svg%3E")}}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23aaa'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath d='M14 5l1 1-9 9-1-1 9-9z' fill='red'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active-error .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e58978'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background-error .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e54e33'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-waiting .mapboxgl-ctrl-icon{-webkit-animation:mapboxgl-spin 2s linear infinite;-moz-animation:mapboxgl-spin 2s infinite linear;-o-animation:mapboxgl-spin 2s infinite linear;-ms-animation:mapboxgl-spin 2s infinite linear;animation:mapboxgl-spin 2s linear infinite}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23999'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath d='M14 5l1 1-9 9-1-1 9-9z' fill='red'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active-error .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e58978'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background-error .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e54e33'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23666'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath d='M14 5l1 1-9 9-1-1 9-9z' fill='red'/%3E%3C/svg%3E")}}@-webkit-keyframes mapboxgl-spin{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@-moz-keyframes mapboxgl-spin{0%{-moz-transform:rotate(0deg)}to{-moz-transform:rotate(1turn)}}@-o-keyframes mapboxgl-spin{0%{-o-transform:rotate(0deg)}to{-o-transform:rotate(1turn)}}@-ms-keyframes mapboxgl-spin{0%{-ms-transform:rotate(0deg)}to{-ms-transform:rotate(1turn)}}@keyframes mapboxgl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.mapboxgl-ctrl-logo{width:88px;height:23px;margin:0 0 -4px -4px;display:block;background-repeat:no-repeat;cursor:pointer;overflow:hidden;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='88' height='23' viewBox='0 0 88 23' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' fill-rule='evenodd'%3E%3Cdefs%3E%3Cpath id='a' d='M11.5 2.25c5.105 0 9.25 4.145 9.25 9.25s-4.145 9.25-9.25 9.25-9.25-4.145-9.25-9.25 4.145-9.25 9.25-9.25zM6.997 15.983c-.051-.338-.828-5.802 2.233-8.873a4.395 4.395 0 013.13-1.28c1.27 0 2.49.51 3.39 1.42.91.9 1.42 2.12 1.42 3.39 0 1.18-.449 2.301-1.28 3.13C12.72 16.93 7 16 7 16l-.003-.017zM15.3 10.5l-2 .8-.8 2-.8-2-2-.8 2-.8.8-2 .8 2 2 .8z'/%3E%3Cpath id='b' d='M50.63 8c.13 0 .23.1.23.23V9c.7-.76 1.7-1.18 2.73-1.18 2.17 0 3.95 1.85 3.95 4.17s-1.77 4.19-3.94 4.19c-1.04 0-2.03-.43-2.74-1.18v3.77c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V8.23c0-.12.1-.23.23-.23h1.4zm-3.86.01c.01 0 .01 0 .01-.01.13 0 .22.1.22.22v7.55c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V15c-.7.76-1.69 1.19-2.73 1.19-2.17 0-3.94-1.87-3.94-4.19 0-2.32 1.77-4.19 3.94-4.19 1.03 0 2.02.43 2.73 1.18v-.75c0-.12.1-.23.23-.23h1.4zm26.375-.19a4.24 4.24 0 00-4.16 3.29c-.13.59-.13 1.19 0 1.77a4.233 4.233 0 004.17 3.3c2.35 0 4.26-1.87 4.26-4.19 0-2.32-1.9-4.17-4.27-4.17zM60.63 5c.13 0 .23.1.23.23v3.76c.7-.76 1.7-1.18 2.73-1.18 1.88 0 3.45 1.4 3.84 3.28.13.59.13 1.2 0 1.8-.39 1.88-1.96 3.29-3.84 3.29-1.03 0-2.02-.43-2.73-1.18v.77c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V5.23c0-.12.1-.23.23-.23h1.4zm-34 11h-1.4c-.13 0-.23-.11-.23-.23V8.22c.01-.13.1-.22.23-.22h1.4c.13 0 .22.11.23.22v.68c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.03 5.2c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.68c0 .13-.11.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.5c0 .13-.1.23-.23.23zm53.615 0h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.71-2.39-3.65a.213.213 0 01-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.37 1.4-2.37a.34.34 0 01.3-.17h1.6c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.37 3.65 2.43 3.7c0 .05.01.09.01.13 0 .12-.09.21-.21.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.42-1.44 2.42a.34.34 0 01-.3.17zm-7.12-1.49c-1.33 0-2.42-1.12-2.42-2.51 0-1.39 1.08-2.52 2.42-2.52 1.33 0 2.42 1.12 2.42 2.51 0 1.39-1.08 2.51-2.42 2.52zm-19.865 0c-1.32 0-2.39-1.11-2.42-2.48v-.07c.02-1.38 1.09-2.49 2.4-2.49 1.32 0 2.41 1.12 2.41 2.51 0 1.39-1.07 2.52-2.39 2.53zm-8.11-2.48c-.01 1.37-1.09 2.47-2.41 2.47s-2.42-1.12-2.42-2.51c0-1.39 1.08-2.52 2.4-2.52 1.33 0 2.39 1.11 2.41 2.48l.02.08zm18.12 2.47c-1.32 0-2.39-1.11-2.41-2.48v-.06c.02-1.38 1.09-2.48 2.41-2.48s2.42 1.12 2.42 2.51c0 1.39-1.09 2.51-2.42 2.51z'/%3E%3C/defs%3E%3Cmask id='c'%3E%3Crect width='100%25' height='100%25' fill='%23fff'/%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/mask%3E%3Cg opacity='.3' stroke='%23000' stroke-width='3'%3E%3Ccircle mask='url(%23c)' cx='11.5' cy='11.5' r='9.25'/%3E%3Cuse xlink:href='%23b' mask='url(%23c)'/%3E%3C/g%3E%3Cg opacity='.9' fill='%23fff'%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/g%3E%3C/svg%3E")}a.mapboxgl-ctrl-logo.mapboxgl-compact{width:23px}@media (-ms-high-contrast:active){a.mapboxgl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='88' height='23' viewBox='0 0 88 23' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' fill-rule='evenodd'%3E%3Cdefs%3E%3Cpath id='a' d='M11.5 2.25c5.105 0 9.25 4.145 9.25 9.25s-4.145 9.25-9.25 9.25-9.25-4.145-9.25-9.25 4.145-9.25 9.25-9.25zM6.997 15.983c-.051-.338-.828-5.802 2.233-8.873a4.395 4.395 0 013.13-1.28c1.27 0 2.49.51 3.39 1.42.91.9 1.42 2.12 1.42 3.39 0 1.18-.449 2.301-1.28 3.13C12.72 16.93 7 16 7 16l-.003-.017zM15.3 10.5l-2 .8-.8 2-.8-2-2-.8 2-.8.8-2 .8 2 2 .8z'/%3E%3Cpath id='b' d='M50.63 8c.13 0 .23.1.23.23V9c.7-.76 1.7-1.18 2.73-1.18 2.17 0 3.95 1.85 3.95 4.17s-1.77 4.19-3.94 4.19c-1.04 0-2.03-.43-2.74-1.18v3.77c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V8.23c0-.12.1-.23.23-.23h1.4zm-3.86.01c.01 0 .01 0 .01-.01.13 0 .22.1.22.22v7.55c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V15c-.7.76-1.69 1.19-2.73 1.19-2.17 0-3.94-1.87-3.94-4.19 0-2.32 1.77-4.19 3.94-4.19 1.03 0 2.02.43 2.73 1.18v-.75c0-.12.1-.23.23-.23h1.4zm26.375-.19a4.24 4.24 0 00-4.16 3.29c-.13.59-.13 1.19 0 1.77a4.233 4.233 0 004.17 3.3c2.35 0 4.26-1.87 4.26-4.19 0-2.32-1.9-4.17-4.27-4.17zM60.63 5c.13 0 .23.1.23.23v3.76c.7-.76 1.7-1.18 2.73-1.18 1.88 0 3.45 1.4 3.84 3.28.13.59.13 1.2 0 1.8-.39 1.88-1.96 3.29-3.84 3.29-1.03 0-2.02-.43-2.73-1.18v.77c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V5.23c0-.12.1-.23.23-.23h1.4zm-34 11h-1.4c-.13 0-.23-.11-.23-.23V8.22c.01-.13.1-.22.23-.22h1.4c.13 0 .22.11.23.22v.68c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.03 5.2c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.68c0 .13-.11.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.5c0 .13-.1.23-.23.23zm53.615 0h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.71-2.39-3.65a.213.213 0 01-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.37 1.4-2.37a.34.34 0 01.3-.17h1.6c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.37 3.65 2.43 3.7c0 .05.01.09.01.13 0 .12-.09.21-.21.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.42-1.44 2.42a.34.34 0 01-.3.17zm-7.12-1.49c-1.33 0-2.42-1.12-2.42-2.51 0-1.39 1.08-2.52 2.42-2.52 1.33 0 2.42 1.12 2.42 2.51 0 1.39-1.08 2.51-2.42 2.52zm-19.865 0c-1.32 0-2.39-1.11-2.42-2.48v-.07c.02-1.38 1.09-2.49 2.4-2.49 1.32 0 2.41 1.12 2.41 2.51 0 1.39-1.07 2.52-2.39 2.53zm-8.11-2.48c-.01 1.37-1.09 2.47-2.41 2.47s-2.42-1.12-2.42-2.51c0-1.39 1.08-2.52 2.4-2.52 1.33 0 2.39 1.11 2.41 2.48l.02.08zm18.12 2.47c-1.32 0-2.39-1.11-2.41-2.48v-.06c.02-1.38 1.09-2.48 2.41-2.48s2.42 1.12 2.42 2.51c0 1.39-1.09 2.51-2.42 2.51z'/%3E%3C/defs%3E%3Cmask id='c'%3E%3Crect width='100%25' height='100%25' fill='%23fff'/%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/mask%3E%3Cg stroke='%23000' stroke-width='3'%3E%3Ccircle mask='url(%23c)' cx='11.5' cy='11.5' r='9.25'/%3E%3Cuse xlink:href='%23b' mask='url(%23c)'/%3E%3C/g%3E%3Cg fill='%23fff'%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/g%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){a.mapboxgl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='88' height='23' viewBox='0 0 88 23' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' fill-rule='evenodd'%3E%3Cdefs%3E%3Cpath id='a' d='M11.5 2.25c5.105 0 9.25 4.145 9.25 9.25s-4.145 9.25-9.25 9.25-9.25-4.145-9.25-9.25 4.145-9.25 9.25-9.25zM6.997 15.983c-.051-.338-.828-5.802 2.233-8.873a4.395 4.395 0 013.13-1.28c1.27 0 2.49.51 3.39 1.42.91.9 1.42 2.12 1.42 3.39 0 1.18-.449 2.301-1.28 3.13C12.72 16.93 7 16 7 16l-.003-.017zM15.3 10.5l-2 .8-.8 2-.8-2-2-.8 2-.8.8-2 .8 2 2 .8z'/%3E%3Cpath id='b' d='M50.63 8c.13 0 .23.1.23.23V9c.7-.76 1.7-1.18 2.73-1.18 2.17 0 3.95 1.85 3.95 4.17s-1.77 4.19-3.94 4.19c-1.04 0-2.03-.43-2.74-1.18v3.77c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V8.23c0-.12.1-.23.23-.23h1.4zm-3.86.01c.01 0 .01 0 .01-.01.13 0 .22.1.22.22v7.55c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V15c-.7.76-1.69 1.19-2.73 1.19-2.17 0-3.94-1.87-3.94-4.19 0-2.32 1.77-4.19 3.94-4.19 1.03 0 2.02.43 2.73 1.18v-.75c0-.12.1-.23.23-.23h1.4zm26.375-.19a4.24 4.24 0 00-4.16 3.29c-.13.59-.13 1.19 0 1.77a4.233 4.233 0 004.17 3.3c2.35 0 4.26-1.87 4.26-4.19 0-2.32-1.9-4.17-4.27-4.17zM60.63 5c.13 0 .23.1.23.23v3.76c.7-.76 1.7-1.18 2.73-1.18 1.88 0 3.45 1.4 3.84 3.28.13.59.13 1.2 0 1.8-.39 1.88-1.96 3.29-3.84 3.29-1.03 0-2.02-.43-2.73-1.18v.77c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V5.23c0-.12.1-.23.23-.23h1.4zm-34 11h-1.4c-.13 0-.23-.11-.23-.23V8.22c.01-.13.1-.22.23-.22h1.4c.13 0 .22.11.23.22v.68c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.03 5.2c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.68c0 .13-.11.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.5c0 .13-.1.23-.23.23zm53.615 0h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.71-2.39-3.65a.213.213 0 01-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.37 1.4-2.37a.34.34 0 01.3-.17h1.6c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.37 3.65 2.43 3.7c0 .05.01.09.01.13 0 .12-.09.21-.21.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.42-1.44 2.42a.34.34 0 01-.3.17zm-7.12-1.49c-1.33 0-2.42-1.12-2.42-2.51 0-1.39 1.08-2.52 2.42-2.52 1.33 0 2.42 1.12 2.42 2.51 0 1.39-1.08 2.51-2.42 2.52zm-19.865 0c-1.32 0-2.39-1.11-2.42-2.48v-.07c.02-1.38 1.09-2.49 2.4-2.49 1.32 0 2.41 1.12 2.41 2.51 0 1.39-1.07 2.52-2.39 2.53zm-8.11-2.48c-.01 1.37-1.09 2.47-2.41 2.47s-2.42-1.12-2.42-2.51c0-1.39 1.08-2.52 2.4-2.52 1.33 0 2.39 1.11 2.41 2.48l.02.08zm18.12 2.47c-1.32 0-2.39-1.11-2.41-2.48v-.06c.02-1.38 1.09-2.48 2.41-2.48s2.42 1.12 2.42 2.51c0 1.39-1.09 2.51-2.42 2.51z'/%3E%3C/defs%3E%3Cmask id='c'%3E%3Crect width='100%25' height='100%25' fill='%23fff'/%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/mask%3E%3Cg stroke='%23fff' stroke-width='3' fill='%23fff'%3E%3Ccircle mask='url(%23c)' cx='11.5' cy='11.5' r='9.25'/%3E%3Cuse xlink:href='%23b' mask='url(%23c)'/%3E%3C/g%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/svg%3E")}}.mapboxgl-ctrl.mapboxgl-ctrl-attrib{padding:0 5px;background-color:hsla(0,0%,100%,.5);margin:0}@media screen{.mapboxgl-ctrl-attrib.mapboxgl-compact{min-height:20px;padding:0;margin:10px;position:relative;background-color:#fff;border-radius:3px 12px 12px 3px}.mapboxgl-ctrl-attrib.mapboxgl-compact:hover{padding:2px 24px 2px 4px;visibility:visible;margin-top:6px}.mapboxgl-ctrl-bottom-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:hover,.mapboxgl-ctrl-top-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:hover{padding:2px 4px 2px 24px;border-radius:12px 3px 3px 12px}.mapboxgl-ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner{display:none}.mapboxgl-ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner{display:block}.mapboxgl-ctrl-attrib.mapboxgl-compact:after{content:"";cursor:pointer;position:absolute;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd'%3E%3Cpath d='M4 10a6 6 0 1012 0 6 6 0 10-12 0m5-3a1 1 0 102 0 1 1 0 10-2 0m0 3a1 1 0 112 0v3a1 1 0 11-2 0'/%3E%3C/svg%3E");background-color:hsla(0,0%,100%,.5);width:24px;height:24px;box-sizing:border-box;border-radius:12px}.mapboxgl-ctrl-bottom-right>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{bottom:0;right:0}.mapboxgl-ctrl-top-right>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{top:0;right:0}.mapboxgl-ctrl-top-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{top:0;left:0}.mapboxgl-ctrl-bottom-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{bottom:0;left:0}}@media screen and (-ms-high-contrast:active){.mapboxgl-ctrl-attrib.mapboxgl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd' fill='%23fff'%3E%3Cpath d='M4 10a6 6 0 1012 0 6 6 0 10-12 0m5-3a1 1 0 102 0 1 1 0 10-2 0m0 3a1 1 0 112 0v3a1 1 0 11-2 0'/%3E%3C/svg%3E")}}@media screen and (-ms-high-contrast:black-on-white){.mapboxgl-ctrl-attrib.mapboxgl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd'%3E%3Cpath d='M4 10a6 6 0 1012 0 6 6 0 10-12 0m5-3a1 1 0 102 0 1 1 0 10-2 0m0 3a1 1 0 112 0v3a1 1 0 11-2 0'/%3E%3C/svg%3E")}}.mapboxgl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.mapboxgl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.mapboxgl-ctrl-attrib .mapbox-improve-map{font-weight:700;margin-left:2px}.mapboxgl-attrib-empty{display:none}.mapboxgl-ctrl-scale{background-color:hsla(0,0%,100%,.75);font-size:10px;border:2px solid #333;border-top:#333;padding:0 5px;color:#333;box-sizing:border-box}.mapboxgl-popup{position:absolute;top:0;left:0;display:-webkit-flex;display:flex;will-change:transform;pointer-events:none}.mapboxgl-popup-anchor-top,.mapboxgl-popup-anchor-top-left,.mapboxgl-popup-anchor-top-right{-webkit-flex-direction:column;flex-direction:column}.mapboxgl-popup-anchor-bottom,.mapboxgl-popup-anchor-bottom-left,.mapboxgl-popup-anchor-bottom-right{-webkit-flex-direction:column-reverse;flex-direction:column-reverse}.mapboxgl-popup-anchor-left{-webkit-flex-direction:row;flex-direction:row}.mapboxgl-popup-anchor-right{-webkit-flex-direction:row-reverse;flex-direction:row-reverse}.mapboxgl-popup-tip{width:0;height:0;border:10px solid transparent;z-index:1}.mapboxgl-popup-anchor-top .mapboxgl-popup-tip{-webkit-align-self:center;align-self:center;border-top:none;border-bottom-color:#fff}.mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip{-webkit-align-self:flex-start;align-self:flex-start;border-top:none;border-left:none;border-bottom-color:#fff}.mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip{-webkit-align-self:flex-end;align-self:flex-end;border-top:none;border-right:none;border-bottom-color:#fff}.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip{-webkit-align-self:center;align-self:center;border-bottom:none;border-top-color:#fff}.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip{-webkit-align-self:flex-start;align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip{-webkit-align-self:flex-end;align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.mapboxgl-popup-anchor-left .mapboxgl-popup-tip{-webkit-align-self:center;align-self:center;border-left:none;border-right-color:#fff}.mapboxgl-popup-anchor-right .mapboxgl-popup-tip{-webkit-align-self:center;align-self:center;border-right:none;border-left-color:#fff}.mapboxgl-popup-close-button{position:absolute;right:0;top:0;border:0;border-radius:0 3px 0 0;cursor:pointer;background-color:transparent}.mapboxgl-popup-close-button:hover{background-color:rgba(0,0,0,.05)}.mapboxgl-popup-content{position:relative;background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:10px 10px 15px;pointer-events:auto}.mapboxgl-popup-anchor-top-left .mapboxgl-popup-content{border-top-left-radius:0}.mapboxgl-popup-anchor-top-right .mapboxgl-popup-content{border-top-right-radius:0}.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-content{border-bottom-left-radius:0}.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-content{border-bottom-right-radius:0}.mapboxgl-popup-track-pointer{display:none}.mapboxgl-popup-track-pointer *{pointer-events:none;user-select:none}.mapboxgl-map:hover .mapboxgl-popup-track-pointer{display:flex}.mapboxgl-map:active .mapboxgl-popup-track-pointer{display:none}.mapboxgl-marker{position:absolute;top:0;left:0;will-change:transform}.mapboxgl-user-location-dot,.mapboxgl-user-location-dot:before{background-color:#1da1f2;width:15px;height:15px;border-radius:50%}.mapboxgl-user-location-dot:before{content:"";position:absolute;-webkit-animation:mapboxgl-user-location-dot-pulse 2s infinite;-moz-animation:mapboxgl-user-location-dot-pulse 2s infinite;-ms-animation:mapboxgl-user-location-dot-pulse 2s infinite;animation:mapboxgl-user-location-dot-pulse 2s infinite}.mapboxgl-user-location-dot:after{border-radius:50%;border:2px solid #fff;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px;box-sizing:border-box;box-shadow:0 0 3px rgba(0,0,0,.35)}@-webkit-keyframes mapboxgl-user-location-dot-pulse{0%{-webkit-transform:scale(1);opacity:1}70%{-webkit-transform:scale(3);opacity:0}to{-webkit-transform:scale(1);opacity:0}}@-ms-keyframes mapboxgl-user-location-dot-pulse{0%{-ms-transform:scale(1);opacity:1}70%{-ms-transform:scale(3);opacity:0}to{-ms-transform:scale(1);opacity:0}}@keyframes mapboxgl-user-location-dot-pulse{0%{transform:scale(1);opacity:1}70%{transform:scale(3);opacity:0}to{transform:scale(1);opacity:0}}.mapboxgl-user-location-dot-stale{background-color:#aaa}.mapboxgl-user-location-dot-stale:after{display:none}.mapboxgl-user-location-accuracy-circle{background-color:rgba(29,161,242,.2);width:1px;height:1px;border-radius:100%}.mapboxgl-crosshair,.mapboxgl-crosshair .mapboxgl-interactive,.mapboxgl-crosshair .mapboxgl-interactive:active{cursor:crosshair}.mapboxgl-boxzoom{position:absolute;top:0;left:0;width:0;height:0;background:#fff;border:2px dotted #202020;opacity:.5}@media print{.mapbox-improve-map{display:none}} \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/utils/mapLayers.ts b/sdnr/wt/odlux/apps/networkMapApp/src/utils/mapLayers.ts
deleted file mode 100644
index 7ce4bfa92..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/utils/mapLayers.ts
+++ /dev/null
@@ -1,332 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-import * as mapboxgl from 'mapbox-gl';
-import { Feature } from 'model/Feature';
-import { NetworkMapThemes, ThemeElement } from 'model/settings';
-
-const fibreLinkColor = "#1154d9";
-const microwaveLinkColor = "#039903";
-
-class MapLayerService {
-
- checkedLayers = false;
- settings: NetworkMapThemes;
- selectedTheme: string | null = null;
-
- public addBaseSources = (map: mapboxgl.Map, selectedPoint: Feature | null, selectedLine: Feature | null) => {
-
-
- // make sure the sources don't already exist
- // (if the networkmap app gets opened quickly within short time periods, the prior sources might not be fully removed)
-
- if (!map.getSource("lines")) {
-
- map.addSource('lines', {
- type: 'geojson',
- data: { type: "FeatureCollection", features: [] }
- });
- }
-
- if (!map.getSource("selectedLine")) {
- const features = selectedLine !== null ? [selectedLine] : [];
- map.addSource('selectedLine', {
- type: 'geojson',
- data: { type: "FeatureCollection", features: features }
- });
- }
-
- if (!map.getSource("points")) {
- map.addSource('points', {
- type: 'geojson',
- data: { type: "FeatureCollection", features: [] }
- });
- }
-
- if (!map.getSource("selectedPoints")) {
- const selectedPointFeature = selectedPoint !== null ? [selectedPoint] : [];
- map.addSource('selectedPoints', {
- type: 'geojson',
- data: { type: "FeatureCollection", features: selectedPointFeature }
-
- });
- }
-
- if (!map.getSource("alarmedPoints")) {
- map.addSource("alarmedPoints", {
- type: 'geojson',
- data: { type: "FeatureCollection", features: [] }
- });
- }
- }
-
- private addCircleLayer = (map: mapboxgl.Map, id: string, source: string, circleColor: string, radius: number, strokeWidth: number, outerColor: string) => {
-
- map.addLayer({
- id: id,
- source: source,
- type: 'circle',
- paint: {
- 'circle-color': circleColor,
- 'circle-radius': radius,
- 'circle-stroke-width': strokeWidth,
- 'circle-stroke-color': outerColor
- }
- });
- }
-
- private addLineLayer = (map: mapboxgl.Map, id: string, source: string, color: string, width: number, filter: string[]) => {
-
- map.addLayer({
- 'id': id,
- 'type': 'line',
- 'source': source,
- 'layout': {
- 'line-join': 'round',
- 'line-cap': 'round'
- },
- 'paint': {
- 'line-color': color,
- 'line-width': width
- },
- 'filter': filter
- });
- }
-
- private addIconLayer = (map: mapboxgl.Map, id: string, source: string, iconName: string, iconSize: number, filter: (string | string[])[]) => {
- map.addLayer({
- 'id': id,
- 'type': 'symbol',
- 'source': source,
- 'layout': {
- 'icon-allow-overlap': true,
- 'icon-image': iconName,
- 'icon-size': iconSize
-
- },
- 'filter': filter,
- });
- }
-
- /**
- * Pick the correct theme based on user selection
- */
- private pickTheme = () => {
- if (this.selectedTheme !== null) {
- const result = this.settings.networkMapThemes.themes.find(el => el.key === this.selectedTheme);
- if (result)
- return result;
-
- }
-
- return this.settings.networkMapThemes.themes[0];
-
- }
-
- public addBaseLayers = (map: mapboxgl.Map, themesettings?: ThemeElement) => {
-
- const theme = !themesettings ? this.pickTheme() : themesettings;
- console.log("user selected theme: " + this.selectedTheme)
- console.log("found theme:" + theme);
-
- this.addCommonLayers(map);
-
- this.addCircleLayer(map, 'points', 'points', theme.site, 7, 1, '#fff');
- this.addCircleLayer(map, 'selectedPoints', 'selectedPoints', theme.selectedSite, 9, 1, '#fff');
- this.addCircleLayer(map, 'alarmedPoints', 'alarmedPoints', '#CC0000', 9, 1, '#fff');
- }
-
- public addIconLayers = (map: mapboxgl.Map, selectedSiteId?: string) => {
-
- this.addCommonLayers(map);
- this.createIconLayers(map, selectedSiteId);
- }
-
- private createIconLayers = (map: mapboxgl.Map, selectedSiteId?: string) => {
-
- this.addIconLayer(map, 'point-lamps', 'points', 'lamp', 0.1, this.createFilter("street lamp", selectedSiteId));
- this.addIconLayer(map, 'point-building', 'points', 'house', 0.1, this.createFilter("high rise building", selectedSiteId));
- this.addIconLayer(map, 'point-data-center', 'points', 'data-center', 0.1, this.createFilter("data center", selectedSiteId));
- this.addIconLayer(map, 'point-factory', 'points', 'factory', 0.2, this.createFilter("factory", selectedSiteId));
-
-
- //select layers
- this.addIconLayer(map, 'select-point-lamps', 'selectedPoints', 'lamp', 0.15, ['==', 'type', 'street lamp']);
- this.addIconLayer(map, 'select-point-buildings', 'selectedPoints', 'house', 0.15, ['==', 'type', 'high rise building']);
- this.addIconLayer(map, 'select-point-data-center', 'selectedPoints', 'data-center', 0.15, ['==', 'type', 'data center']);
- this.addIconLayer(map, 'select-point-factory', 'selectedPoints', 'factory', 0.3, ['==', 'type', 'factory']);
-
- //alarm layers
- this.addIconLayer(map, 'point-lamps-alarm', 'alarmedPoints', 'lamp-red', 0.3, this.createFilter("street lamp"));
- this.addIconLayer(map, 'point-building-alarm', 'alarmedPoints', 'house-red', 0.3, this.createFilter("high rise building"));
- this.addIconLayer(map, 'point-data-center-alarm', 'alarmedPoints', 'data-center-red', 0.3, this.createFilter("data center"));
- this.addIconLayer(map, 'point-factory-alarm', 'alarmedPoints', 'factory-red', 0.45, this.createFilter("factory"));
-
- map.addLayer({
- id: 'point-remaining',
- source: 'points',
- type: 'circle',
- 'filter': ['none', ['==', 'type', "high rise building"], ['==', 'type', "data center"], ['==', 'type', "factory"], ['==', 'type', "street lamp"]],
- paint: {
- 'circle-color': '#11b4da',
- 'circle-radius': 7,
- 'circle-stroke-width': 1,
- 'circle-stroke-color': '#fff'
- }
- });
- }
-
- private addCommonLayers = (map: mapboxgl.Map, themesettings?: ThemeElement) => {
-
- const theme = !themesettings ? this.pickTheme() : themesettings;
-
- this.addLineLayer(map, 'microwave-lines', 'lines', theme.microwaveLink, 2, ['==', 'type', 'microwave']);
- this.addLineLayer(map, 'fibre-lines', 'lines', theme.fiberLink, 2, ['==', 'type', 'fibre']);
- this.addLineLayer(map, 'selectedLineMicrowave', 'selectedLine', theme.microwaveLink, 4, ['==', 'type', 'microwave']);
- this.addLineLayer(map, 'selectedLineFibre', 'selectedLine', theme.fiberLink, 4, ['==', 'type', 'fibre']);
- }
-
- public removeBaseLayers = (map: mapboxgl.Map) => {
-
- map.removeLayer("points");
- map.removeLayer("lines");
- map.removeLayer('selectedPoints');
- map.removeLayer('selectedLine');
- }
-
- private removeIconLayers = (map: mapboxgl.Map) => {
-
- map.removeLayer('point-building');
- map.removeLayer('point-lamps');
- map.removeLayer('point-data-center');
- map.removeLayer('point-factory');
- map.removeLayer('point-remaining');
- map.removeLayer('select-point-data-center');
- map.removeLayer('select-point-buildings');
- map.removeLayer('select-point-lamps');
- map.removeLayer('select-point-factory');
- map.removeLayer('point-building-alarm');
- map.removeLayer('point-lamps-alarm');
- map.removeLayer('point-data-center-alarm');
- map.removeLayer('point-factory-alarm');
- }
-
-
- private createFilter = (type: 'street lamp' | 'high rise building' | 'data center' | 'factory', selectedSiteId?: string) => {
-
- return selectedSiteId === undefined ? ['==', 'type', type] : ["all", ['==', 'type', type], ['!=', 'id', selectedSiteId]]
- }
-
- public showIconLayers = (map: mapboxgl.Map, show: boolean, selectedSiteId?: string) => {
-
- const zoom = map.getZoom();
-
- if (show) {
-
- if (zoom > 11) {
-
- const bounds = map.getBounds();
-
- if (map.getLayer('points') !== undefined && map.getLayer('point-lamps') === undefined && !this.checkedLayers) {
-
- // if sites don't have a type don't change layers to icons
- const elements = map.queryRenderedFeatures(undefined, {
- layers: ['points'], filter: ['has', 'type']
- });
- this.checkedLayers = true;
-
- if (elements.length > 0 && elements.length < 1000) {
-
- if (map.getLayer('point-lamps') === undefined) {
- map.removeLayer('points');
- map.setLayoutProperty('alarmedPoints', 'visibility', 'none');
- map.setLayoutProperty('selectedPoints', 'visibility', 'none');
- this.createIconLayers(map, selectedSiteId);
- //map.moveLayer('point-remaining','selectedPoints');
-
- }
- }
- }
-
- } else {
- this.swapLayersBack(map);
- }
- } else {
- this.swapLayersBack(map);
- }
- }
-
- public swapLayersBack = (map: mapboxgl.Map) => {
- this.checkedLayers = false;
- const theme = this.pickTheme();
-
- if (map.getLayer('selectedPoints') === undefined) {
- this.addCircleLayer(map, 'selectedPoints', 'selectedPoints', theme.selectedSite, 9, 1, '#fff');
-
- }
-
- if (map.getLayer('alarmedPoints') === undefined) {
- this.addCircleLayer(map, 'alarmedPoints', 'alarmedPoints', '#CC0000', 9, 1, '#fff');
-
- }
-
-
- if (map.getLayer('points') === undefined) {
-
- map.setLayoutProperty('selectedPoints', 'visibility', 'visible');
- map.setLayoutProperty('alarmedPoints', 'visibility', 'visible');
- this.removeIconLayers(map);
-
- this.addCircleLayer(map, 'points', 'points', theme.site, 7, 1, '#fff');
-
-
- map.moveLayer('points', map.getLayer('selectedPoints').id);
- }
- }
-
- public changeMapOpacity = (map: mapboxgl.Map, newValue: number) => {
- const newOpacity = newValue / 100;
- if (map) {
- const tiles = map.getStyle().layers?.filter(el => el.id.includes("tiles"))
- tiles?.forEach(layer => {
- if (layer.type === 'symbol') {
- map.setPaintProperty(layer.id, `icon-opacity`, newOpacity);
- map.setPaintProperty(layer.id, `text-opacity`, newOpacity);
- } else {
- map.setPaintProperty(layer.id, `${layer.type}-opacity`, newOpacity);
- }
- })
- }
-
- }
-
- public changeTheme = (map: mapboxgl.Map, themeName: string) => {
- this.selectedTheme = themeName;
- const theme = this.pickTheme();
- if (theme && map.loaded()) {
- map.setPaintProperty('points', 'circle-color', theme.site);
- map.setPaintProperty('selectedPoints', 'circle-color', theme.selectedSite);
- map.setPaintProperty('microwave-lines', 'line-color', theme.microwaveLink);
- map.setPaintProperty('fibre-lines', 'line-color', theme.fiberLink);
- }
- }
-}
-
-const mapLayerService = new MapLayerService();
-export default mapLayerService;
-
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/utils/mapUtils.ts b/sdnr/wt/odlux/apps/networkMapApp/src/utils/mapUtils.ts
deleted file mode 100644
index da3e97ee3..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/utils/mapUtils.ts
+++ /dev/null
@@ -1,146 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-const EARTHRADIUSM = 6378137;
-
-type updatedCoordinates = { south: number, west: number, north: number, east: number };
-
-
-export const increaseBoundingBox = (map: mapboxgl.Map) =>{
-
- const bbox = map.getBounds();
-
- const distance = map.getCenter().distanceTo(bbox.getNorthEast()); // radius of visible area (center -> corner) (in meters)
-
- //calculate new boundingBox
- const increasedBoundingBox = addDistance(bbox.getSouth(), bbox.getWest(), bbox.getNorth(), bbox.getEast(), (distance / 1000) / 2);
- return increasedBoundingBox;
-}
-
-
-
-export const addDistance = (south: number, west: number, north: number, east: number, distanceKm: number): updatedCoordinates => {
-
- const distanceInM = distanceKm * 1000;
-
- const dLat = distanceInM / EARTHRADIUSM;
- const dLon = distanceInM / (EARTHRADIUSM * Math.cos(Math.PI * (north + south) / 360));
-
- const latOffset = dLat * 180 / Math.PI;
- const lonOffset = dLon * 180 / Math.PI;
-
- const newEast = checkLongitude(east + lonOffset);
- const newWest = checkLongitude(west - lonOffset);
- const newNorth = checkLatitude(north + latOffset);
- const newSouth = checkLatitude(south - latOffset);
-
- return { east: newEast, north: newNorth, south: newSouth, west: newWest };
-
-}
-
-
-//taken from https://www.movable-type.co.uk/scripts/latlong.html
-export const calculateMidPoint = (lat1: number, lon1: number, lat2: number, lon2: number) =>{
-
- const dLon = degrees_to_radians(lon2 - lon1);
-
- //convert to radians
- lat1 = degrees_to_radians(lat1);
- lat2 = degrees_to_radians(lat2);
- lon1 = degrees_to_radians(lon1);
-
- const Bx = Math.cos(lat2) * Math.cos(dLon);
- const By = Math.cos(lat2) * Math.sin(dLon);
- const lat3 = Math.atan2(Math.sin(lat1) + Math.sin(lat2), Math.sqrt((Math.cos(lat1) + Bx) * (Math.cos(lat1) + Bx) + By * By));
- const lon3 = lon1 + Math.atan2(By, Math.cos(lat1) + Bx);
-
- return [radians_to_degrees(lon3), radians_to_degrees(lat3)];
-}
-
-
-export const LatLonToDMS = (value:number, isLon:boolean=false) =>{
- const absoluteValue = Math.abs(value);
- const d = Math.floor(absoluteValue);
- const m = Math.floor((absoluteValue -d)* 60);
- const s = (absoluteValue - d - m / 60 ) * 3600;
- const dms=`${d}° ${m}' ${s.toFixed(2)}"`
-
- const sign = Math.sign(value);
-
- if(isLon){
- return (sign === -1 || sign === -0 ) ? dms + " W" : dms + " E";
- }else{
- return (sign === -1 || sign === -0 ) ? dms + " S" : dms + " N";
- }
-}
-
-// Because features come from tiled vector data, feature geometries may be split
-// or duplicated across tile boundaries and, as a result, features may appear
-// multiple times in query results.
-
-//taken from https://docs.mapbox.com/mapbox-gl-js/example/filter-features-within-map-view/
-
-export const getUniqueFeatures = (array: mapboxgl.MapboxGeoJSONFeature[], comparatorProperty:string) =>{
- var existingFeatureKeys: any = {};
-
- var uniqueFeatures = array.filter(function(el) {
- if (existingFeatureKeys[el.properties![comparatorProperty]]) {
- return false;
- } else {
- existingFeatureKeys[el.properties![comparatorProperty]] = true;
- return true;
- }
- });
-
- return uniqueFeatures;
- }
-
-const radians_to_degrees = (radians:number) =>{
-
- var pi = Math.PI;
- return radians * (180/pi);
-}
-
- const degrees_to_radians = (degrees: number) =>
- {
- return degrees * (Math.PI/180);
- }
-
-
-const checkLatitude = (lat: number) => {
-
- if (lat > 90)
- return 90;
- else if (lat < -90)
- return -90;
- else
- return lat;
-
-}
-
-const checkLongitude = (lon: number) => {
- if (lon > 180)
- return 180;
- else if (lon < -180)
- return -180;
- else
- return lon;
-}
-
-
-
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/utils/utils.ts b/sdnr/wt/odlux/apps/networkMapApp/src/utils/utils.ts
deleted file mode 100644
index 59085d499..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src/utils/utils.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-
-import { link } from "../model/link";
-import { Site } from "../model/site";
-
-
-export function isSite(data: link | Site): data is Site {
- return (data as Site).location !== undefined;
-} \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src2/main/java/org/onap/ccsdk/features/sdnr/wt/odlux/bundles/MyOdluxBundle.java b/sdnr/wt/odlux/apps/networkMapApp/src2/main/java/org/onap/ccsdk/features/sdnr/wt/odlux/bundles/MyOdluxBundle.java
deleted file mode 100644
index 43b072c4b..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src2/main/java/org/onap/ccsdk/features/sdnr/wt/odlux/bundles/MyOdluxBundle.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt
- * =================================================================================================
- * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-package org.onap.ccsdk.features.sdnr.wt.odlux.bundles;
-
-import org.onap.ccsdk.features.sdnr.wt.odlux.model.bundles.OdluxBundle;
-import org.onap.ccsdk.features.sdnr.wt.odlux.model.bundles.OdluxBundleLoader;
-
-public class MyOdluxBundle extends OdluxBundle {
-
- @Override
- public void initialize() {
- super.initialize();
- }
-
- @Override
- public void clean() {
- super.clean();
- }
-
- @Override
- public String getResourceFileContent(String filename) {
- return super.getResourceFileContent(filename);
- }
-
- @Override
- public boolean hasResource(String filename) {
- return super.hasResource(filename);
- }
-
- @Override
- public void setBundleName(String bundleName) {
- super.setBundleName(bundleName);
- }
-
- @Override
- public void setLoader(OdluxBundleLoader loader) {
- super.setLoader(loader);
- }
-
- @Override
- public String getBundleName() {
- return super.getBundleName();
- }
-
- @Override
- public OdluxBundleLoader getLoader() {
- return super.getLoader();
- }
-
- public MyOdluxBundle() {
- super();
- }
-}
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src2/main/resources/OSGI-INF/blueprint/blueprint.xml b/sdnr/wt/odlux/apps/networkMapApp/src2/main/resources/OSGI-INF/blueprint/blueprint.xml
deleted file mode 100644
index 4ede94477..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src2/main/resources/OSGI-INF/blueprint/blueprint.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
- <reference id="loadersvc" availability="mandatory" activation="eager" interface="org.onap.ccsdk.features.sdnr.wt.odlux.model.bundles.OdluxBundleLoader"/>
-
- <bean id="bundle" init-method="initialize" destroy-method="clean" class="org.onap.ccsdk.features.sdnr.wt.odlux.bundles.MyOdluxBundle">
- <property name="loader" ref="loadersvc"/>
- <property name="bundleName" value="networkMapApp"/>
- <property name="index" value="110"/>
- </bean>
-</blueprint> \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src2/test/java/org/onap/ccsdk/features/sdnr/wt/odlux/bundles/test/TestBundleRes.java b/sdnr/wt/odlux/apps/networkMapApp/src2/test/java/org/onap/ccsdk/features/sdnr/wt/odlux/bundles/test/TestBundleRes.java
deleted file mode 100644
index c319bb189..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src2/test/java/org/onap/ccsdk/features/sdnr/wt/odlux/bundles/test/TestBundleRes.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt
- * =================================================================================================
- * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-package org.onap.ccsdk.features.sdnr.wt.odlux.bundles.test;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import org.junit.Test;
-import org.onap.ccsdk.features.sdnr.wt.odlux.OdluxBundleLoaderImpl;
-import org.onap.ccsdk.features.sdnr.wt.odlux.bundles.MyOdluxBundle;
-
-public class TestBundleRes {
-
- @Test
- public void test() {
- OdluxBundleLoaderImpl loader = OdluxBundleLoaderImpl.getInstance();
- MyOdluxBundle b = new MyOdluxBundle();
- b.setLoader(loader);
- b.setIndex(0);
- b.setBundleName("abc");
- b.initialize();
- assertTrue(loader.getNumberOfBundles()==1);
- assertNotNull(b.getLoader());
- assertEquals("abc",b.getBundleName());
- assertTrue(b.hasResource("test.js"));
- assertNotNull(b.getResourceFileContent("test.js"));
- b.clean();
- assertTrue(loader.getNumberOfBundles()==0);
- }
-
-}
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src2/test/resources/test.js b/sdnr/wt/odlux/apps/networkMapApp/src2/test/resources/test.js
deleted file mode 100644
index b47fdc39f..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/src2/test/resources/test.js
+++ /dev/null
@@ -1,5 +0,0 @@
-asdac sad
-as
-d
-sad
- sadfa \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/networkMapApp/tsconfig.json b/sdnr/wt/odlux/apps/networkMapApp/tsconfig.json
deleted file mode 100644
index a66b5d828..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/tsconfig.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "compilerOptions": {
- "baseUrl": "./src",
- "outDir": "./dist",
- "sourceMap": true,
- "forceConsistentCasingInFileNames": true,
- "allowSyntheticDefaultImports": false,
- "allowUnreachableCode": false,
- "allowUnusedLabels": false,
- "noFallthroughCasesInSwitch": true,
- "noImplicitAny": true,
- "noImplicitReturns": true,
- "noImplicitThis": true,
- "strictNullChecks": true,
- "pretty": true,
- "newLine": "LF",
- "module": "es2015",
- "target": "es2016",
- "moduleResolution": "node",
- "experimentalDecorators": true,
- "jsx": "preserve",
- "lib": [
- "dom",
- "es2015",
- "es2016"
- ],
- "types": [
- "prop-types",
- "react",
- "react-dom"
- ]
- },
- "exclude": [
- "dist",
- "node_modules"
- ]
-}
diff --git a/sdnr/wt/odlux/apps/networkMapApp/webpack.config.js b/sdnr/wt/odlux/apps/networkMapApp/webpack.config.js
deleted file mode 100644
index 5684040b7..000000000
--- a/sdnr/wt/odlux/apps/networkMapApp/webpack.config.js
+++ /dev/null
@@ -1,200 +0,0 @@
-/**
- * Webpack 4 configuration file
- * see https://webpack.js.org/configuration/
- * see https://webpack.js.org/configuration/dev-server/
- */
-
-"use strict";
-
-const path = require("path");
-const webpack = require("webpack");
-const CopyWebpackPlugin = require("copy-webpack-plugin");
-const TerserPlugin = require('terser-webpack-plugin');
-
-// const __dirname = (path => path.replace(/^([a-z]\:)/, c => c.toUpperCase()))(process.__dirname());
-
-module.exports = (env) => {
- const distPath = path.resolve(__dirname, env === "release" ? "." : "../..", "dist");
- const frameworkPath = path.resolve(__dirname, env === "release" ? "../../framework" : "../..", "dist");
- return [{
- name: "App",
-
- mode: "none", //disable default behavior
-
- target: "web",
-
- context: path.resolve(__dirname, "src"),
-
- entry: {
- networkMapApp: ["./pluginTransport.tsx"]
- },
-
- devtool: env === "release" ? false : "source-map",
-
- resolve: {
- extensions: [".ts", ".tsx", ".js", ".jsx"]
- },
-
- output: {
- path: distPath,
- filename: "[name].js",
- library: "[name]",
- libraryTarget: "umd2",
- chunkFilename: "[name].js"
- },
- module: {
- rules: [{
- test: /\.tsx?$/,
- exclude: /node_modules/,
- use: [{
- loader: "babel-loader"
- }, {
- loader: "ts-loader"
- }]
- }, {
- test: /\.jsx?$/,
- exclude: /node_modules/,
- use: [{
- loader: "babel-loader"
- }]
- },
- {
- test: /\.(png|gif|jpg|svg)$/,
- use: [{
- loader: 'url-loader',
- options: {
- limit: 10000,
- name: './icons/[hash].[ext]'
- }
- }]
- },
- {
- test: /\.css$/i,
- use: ["style-loader", "css-loader"],
- }]
- },
-
- optimization: {
- noEmitOnErrors: true,
- namedModules: env !== "release",
- minimize: env === "release",
- minimizer: env !== "release" ? [] : [new TerserPlugin({
- terserOptions: {
- warnings: false, // false, true, "verbose"
- compress: {
- drop_console: true,
- drop_debugger: true,
- }
- }
- })],
- },
-
- plugins: [
- new webpack.DllReferencePlugin({
- context: path.resolve(__dirname, "../../framework/src"),
- manifest: require(path.resolve(frameworkPath, "vendor-manifest.json")),
- sourceType: "umd2"
- }),
- new webpack.DllReferencePlugin({
- context: path.resolve(__dirname, "../../framework/src"),
- manifest: require(path.resolve(frameworkPath, "app-manifest.json")),
- sourceType: "umd2"
- }),
- ...(env === "release") ? [
- new webpack.DefinePlugin({
- "process.env": {
- NODE_ENV: "'production'",
- VERSION: JSON.stringify(require("./package.json").version)
- }
- }),
- ] : [
- new webpack.DefinePlugin({
- "process.env": {
- NODE_ENV: "'development'",
- VERSION: JSON.stringify(require("./package.json").version)
- }
- }),
- new CopyWebpackPlugin([{
- from: 'index.html',
- to: distPath
- }]),
- ]
- ],
-
- devServer: {
- public: "http://localhost:3100",
- contentBase: frameworkPath,
-
- compress: true,
- headers: {
- "Access-Control-Allow-Origin": "*"
- },
- host: "0.0.0.0",
- port: 3100,
- disableHostCheck: true,
- historyApiFallback: true,
- inline: true,
- hot: false,
- quiet: false,
- stats: {
- colors: true
- },
- proxy: {
- "/yang-schema/": {
- target: "http://sdnr:8181",
- secure: false
- },
- "/userdata": {
- target: "http://sdnr:8181",
- secure: false
- },
- "/userdata/": {
- target: "http://sdnr:8181",
- secure: false
- },
- "/oauth2/": {
- target: "http://sdnr:8181",
- secure: false
- },
- "/database/": {
- target: "http://sdnr:8181",
- secure: false
- },
- "/restconf/": {
- target: "http://sdnr:8181",
- secure: false
- },
- "/rests/": {
- target: "http://sdnr:8181",
- secure: false
- },
- "/topology/": {
- target: "http://localhost:3002",
- secure: false
- },
- "/sitedoc/": {
- target: "http://localhost:3002",
- secure: false,
- pathRewrite(pathname) {
- return pathname.replace(/^\/sitedoc/, '/topology/stadok')
- }
- },
- "/tiles/": {
- target: "http://tile.openstreetmap.org",
- secure: false
- },
- "/help/": {
- target: "http://sdnr:8181",
- secure: false
- },
- "/websocket": {
- target: "http://sdnr:8181",
- ws: true,
- changeOrigin: true,
- secure: false
- }
- }
-
- }
- }];
-}