From f333557c8bf0a74eb7b88d6294dea2a420b1ec61 Mon Sep 17 00:00:00 2001 From: Aijana Schumann Date: Thu, 18 Feb 2021 10:55:11 +0100 Subject: Update NetworkMap and LinkCalculator Update NetworkMap and LinkCalculator to use the topology-server-v2 API, minior bugfixes for NetworkMap Issue-ID: CCSDK-3172 Signed-off-by: Aijana Schumann Change-Id: Ia5690c5039d7a9431443bc131fe398cc79d08287 --- .../apps/networkMapApp/src/model/historyEntry.ts | 4 +-- sdnr/wt/odlux/apps/networkMapApp/src/model/link.ts | 8 ++--- .../apps/networkMapApp/src/model/popupElements.ts | 22 ++++++++++++++ sdnr/wt/odlux/apps/networkMapApp/src/model/site.ts | 34 +++++++++++++--------- 4 files changed, 48 insertions(+), 20 deletions(-) create mode 100644 sdnr/wt/odlux/apps/networkMapApp/src/model/popupElements.ts (limited to 'sdnr/wt/odlux/apps/networkMapApp/src/model') diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/model/historyEntry.ts b/sdnr/wt/odlux/apps/networkMapApp/src/model/historyEntry.ts index 707ff3d2a..d7197a4d1 100644 --- a/sdnr/wt/odlux/apps/networkMapApp/src/model/historyEntry.ts +++ b/sdnr/wt/odlux/apps/networkMapApp/src/model/historyEntry.ts @@ -16,7 +16,7 @@ * ============LICENSE_END========================================================================== */ -import { site } from "./site"; +import { Site } from "./site"; import { link } from "./link"; -export type HistoryEntry={id: string, data: site|link}; \ No newline at end of file +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 index e11be1a68..d992c66db 100644 --- a/sdnr/wt/odlux/apps/networkMapApp/src/model/link.ts +++ b/sdnr/wt/odlux/apps/networkMapApp/src/model/link.ts @@ -23,8 +23,8 @@ export type link = {id: string, type: string, siteA: string, siteB: string, - azimuthA: number, - azimuthB: number, - locationA: { lon: number, lat: number, amsl?:number, antennaHeight?: number }, - locationB: { lon: number, lat: number, amsl?:number, antennaHeight?: number }, + azimuthA: number | null, + azimuthB: number | null, + locationA: { lon: number, lat: number, amsl:number | null, antennaHeight: number | null }, + locationB: { lon: number, lat: number, amsl:number | null, antennaHeight: number | 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 new file mode 100644 index 000000000..320d7ca6e --- /dev/null +++ b/sdnr/wt/odlux/apps/networkMapApp/src/model/popupElements.ts @@ -0,0 +1,22 @@ +/** + * ============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/site.ts b/sdnr/wt/odlux/apps/networkMapApp/src/model/site.ts index 79af65377..b9102e871 100644 --- a/sdnr/wt/odlux/apps/networkMapApp/src/model/site.ts +++ b/sdnr/wt/odlux/apps/networkMapApp/src/model/site.ts @@ -18,26 +18,32 @@ import { link } from "./link"; -export type site = { +export type Site = { id: string, name: string, - address?: string, - heighAGLInMeters?: number, //AboveGroundLevel - antennaHeightAGLInMeters?: number, + address: Address, + heightAmslInMeters?: number, //AboveGroundLevel + antennaHeightAmslInMeters?: number, type?: string, operator: string, - geoLocation:{lon: number, lat: number}, + location:{lon: number, lat: number}, devices: Device[], links: link[] } -export type Device = { - id: string, - type: string, - name: string, - manufacture: string, - owner: string, - status?: string, - port: number[], - simulatorId?: 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 -- cgit 1.2.3-korg