From 47fc603b864b52a70157515f29ec741dd9192f3a Mon Sep 17 00:00:00 2001
From: Herbert Eiselt <herbert.eiselt@highstreet-technologies.com>
Date: Fri, 7 Jun 2019 17:55:16 +0200
Subject: SDNR align ODLUX

Add missing chart view to UX Performance app

Issue-ID: SDNC-790
Signed-off-by: Herbert Eiselt <herbert.eiselt@highstreet-technologies.com>
Change-Id: I6f5af1e01d2246927b8d05f826f629c7dd5f59a5
Signed-off-by: Herbert Eiselt <herbert.eiselt@highstreet-technologies.com>
---
 .../src/services/performanceHistoryService.tsx     | 93 ----------------------
 1 file changed, 93 deletions(-)
 delete mode 100644 sdnr/wt/odlux/apps/performanceHistoryApp/src/services/performanceHistoryService.tsx

(limited to 'sdnr/wt/odlux/apps/performanceHistoryApp/src/services/performanceHistoryService.tsx')

diff --git a/sdnr/wt/odlux/apps/performanceHistoryApp/src/services/performanceHistoryService.tsx b/sdnr/wt/odlux/apps/performanceHistoryApp/src/services/performanceHistoryService.tsx
deleted file mode 100644
index a1cdcffcc..000000000
--- a/sdnr/wt/odlux/apps/performanceHistoryApp/src/services/performanceHistoryService.tsx
+++ /dev/null
@@ -1,93 +0,0 @@
-import { requestRest } from '../../../../framework/src/services/restService';
-import { Result } from '../../../../framework/src/models/elasticSearch';
-
-import { ConnectedNetworkElements } from '../models/connectedNetworkElements';
-import { DistinctLtp, Ltp } from '../models/availableLtps';
-import { Topology, TopologyNode } from '../models/topologyNetConf';
-
-/** 
- * Represents a web api accessor service for Network elements actions.
- */
-class PerformanceService {
-
-  private static networkElementTopology = (mountPoint: TopologyNode) => {
-    const mountId = mountPoint["node-id"];
-    return {
-      mountId: mountId,
-    }
-  }
-
-  /**
-   * Get all connected network elements from restconf.
-   */
-  public async getConnectedNetworkElementsList(): Promise<ConnectedNetworkElements[] | null> {
-    const path = "restconf/operational/network-topology:network-topology/topology/topology-netconf";
-    const topologyRequestPomise = requestRest<{ topology: Topology[] | null }>(path, { method: "GET" }, true);
-    const [netconfResponse] = await Promise.all([topologyRequestPomise]);
-    const topologyNetconf = netconfResponse && netconfResponse.topology && netconfResponse.topology.find(topology => topology["topology-id"] === "topology-netconf");
-    let mountPoints = topologyNetconf && topologyNetconf.node && topologyNetconf.node.filter(
-      mountPoint => mountPoint["netconf-node-topology:connection-status"] == "connected").map(mountedElement => {
-        return PerformanceService.networkElementTopology(mountedElement);
-      });
-    return mountPoints || [];
-  }
-
-  /**
-   * Get distinct ltps based on the selected network element and time period from the historicalperformance15min database table.
-   */
-  public async getDistinctLtpsFrom15minDatabase(networkElement: string): Promise<Ltp[] | null> {
-    const path = 'database/sdnperformance/historicalperformance15min/_search';
-    const query = {
-      "size": 0,
-      "query": {
-        "match": {
-          "node-name": networkElement
-        }
-      },
-      "aggs": {
-        "uuid-interface": {
-          "terms": {
-            "field": "uuid-interface"
-          }
-        }
-      }
-    };
-    const result = await requestRest<Result<DistinctLtp>>(path, { method: "POST", body: JSON.stringify(query) });
-    if(result && result.aggregations) {
-    }
-    return result && result.aggregations && result.aggregations["uuid-interface"].buckets.map(ne=>({
-      key:ne.key
-    }))|| null;
-  }
-
-  /**
-   * Get distinct ltps based on the selected network element and time period from the historicalperformance24h database table.
-   */
-  public async getDistinctLtpsFrom24hoursDatabase(networkElement: string): Promise<Ltp[] | null> {
-    const path = 'database/sdnperformance/historicalperformance24h/_search';
-    const query = {
-      "size": 0,
-      "query": {
-        "match": {
-          "node-name": networkElement
-        }
-      },
-      "aggs": {
-        "uuid-interface": {
-          "terms": {
-            "field": "uuid-interface"
-          }
-        }
-      }
-    };
-    const result = await requestRest<Result<DistinctLtp>>(path, { method: "POST", body: JSON.stringify(query) });
-    if(result && result.aggregations) {
-    }
-    return result && result.aggregations && result.aggregations["uuid-interface"].buckets.map(ne=>({
-      key:ne.key
-    }))|| null;
-  }
-}
-
-export const PerformanceHistoryService = new PerformanceService();
-export default PerformanceHistoryService;
-- 
cgit 1.2.3-korg

