Unverified Commit c7bb6e87 authored by Kevin Di Lallo's avatar Kevin Di Lallo Committed by GitHub
Browse files

Merge pull request #25 from dilallkx/kd_sp30_na690_na524

Throughput measurements fix + Demo1 code cleanup
parents a3f743f0 3e5e92cb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -111,7 +111,7 @@ cd ~/AdvantEDGE/examples/demo1/

#### Configure demo specific dashboards

Follow the procedure described in [Scenario Monitoring](../../docs/use/monitoring.md#configure-dashboards). The demo specific dashboard that is loaded can also be found at `~/AdvantEDGE/examples/demo1/demo1-dashboards.json`
Follow the procedure described in [Scenario Monitoring](https://github.com/InterDigitalInc/AdvantEDGE/wiki/scenario-monitoring#configure-monitoring). The demo specific dashboard that is loaded can also be found at `~/AdvantEDGE/examples/demo1/demo1-dashboards.json`

#### Start iperf proxy

+5 −5
Original line number Diff line number Diff line
@@ -117,7 +117,7 @@
      "description": "",
      "version": 1,
      "kibanaSavedObjectMeta": {
        "searchSourceJSON": "{\"index\":\"27b98a60-bb57-11e8-a056-d1ed6789004e\",\"query\":{\"language\":\"lucene\",\"query\":\"\"},\"filter\":[{\"meta\":{\"index\":\"27b98a60-bb57-11e8-a056-d1ed6789004e\",\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"meep.log.dest\",\"value\":\"ue1-iperf\",\"params\":{\"query\":\"ue1-iperf\",\"type\":\"phrase\"}},\"query\":{\"match\":{\"meep.log.dest\":{\"query\":\"ue1-iperf\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}},{\"meta\":{\"index\":\"27b98a60-bb57-11e8-a056-d1ed6789004e\",\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"meep.log.msgType\",\"value\":\"ingressPacketStats\",\"params\":{\"query\":\"ingressPacketStats\",\"type\":\"phrase\"}},\"query\":{\"match\":{\"meep.log.msgType\":{\"query\":\"ingressPacketStats\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}]}"
        "searchSourceJSON": "{\"index\":\"27b98a60-bb57-11e8-a056-d1ed6789004e\",\"query\":{\"language\":\"lucene\",\"query\":\"\"},\"filter\":[{\"meta\":{\"index\":\"27b98a60-bb57-11e8-a056-d1ed6789004e\",\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"meep.log.msgType\",\"value\":\"ingressPacketStats\",\"params\":{\"query\":\"ingressPacketStats\",\"type\":\"phrase\"}},\"query\":{\"match\":{\"meep.log.msgType\":{\"query\":\"ingressPacketStats\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}},{\"meta\":{\"index\":\"27b98a60-bb57-11e8-a056-d1ed6789004e\",\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"meep.log.src\",\"value\":\"ue1-iperf\",\"params\":{\"query\":\"ue1-iperf\",\"type\":\"phrase\"}},\"query\":{\"match\":{\"meep.log.src\":{\"query\":\"ue1-iperf\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}]}"
      }
    }
  },
@@ -131,7 +131,7 @@
      "description": "",
      "version": 1,
      "kibanaSavedObjectMeta": {
        "searchSourceJSON": "{\"index\":\"27b98a60-bb57-11e8-a056-d1ed6789004e\",\"query\":{\"language\":\"lucene\",\"query\":\"\"},\"filter\":[{\"meta\":{\"index\":\"27b98a60-bb57-11e8-a056-d1ed6789004e\",\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"meep.log.dest\",\"value\":\"ue2-svc\",\"params\":{\"query\":\"ue2-svc\",\"type\":\"phrase\"}},\"query\":{\"match\":{\"meep.log.dest\":{\"query\":\"ue2-svc\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}},{\"meta\":{\"index\":\"27b98a60-bb57-11e8-a056-d1ed6789004e\",\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"meep.log.msgType\",\"value\":\"ingressPacketStats\",\"params\":{\"query\":\"ingressPacketStats\",\"type\":\"phrase\"}},\"query\":{\"match\":{\"meep.log.msgType\":{\"query\":\"ingressPacketStats\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}]}"
        "searchSourceJSON": "{\"index\":\"27b98a60-bb57-11e8-a056-d1ed6789004e\",\"query\":{\"language\":\"lucene\",\"query\":\"\"},\"filter\":[{\"meta\":{\"index\":\"27b98a60-bb57-11e8-a056-d1ed6789004e\",\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"meep.log.msgType\",\"value\":\"ingressPacketStats\",\"params\":{\"query\":\"ingressPacketStats\",\"type\":\"phrase\"}},\"query\":{\"match\":{\"meep.log.msgType\":{\"query\":\"ingressPacketStats\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}},{\"meta\":{\"index\":\"27b98a60-bb57-11e8-a056-d1ed6789004e\",\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"meep.log.src\",\"value\":\"ue2-svc\",\"params\":{\"query\":\"ue2-svc\",\"type\":\"phrase\"}},\"query\":{\"match\":{\"meep.log.src\":{\"query\":\"ue2-svc\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}]}"
      }
    }
  },
@@ -145,7 +145,7 @@
      "description": "",
      "version": 1,
      "kibanaSavedObjectMeta": {
        "searchSourceJSON": "{\"index\":\"27b98a60-bb57-11e8-a056-d1ed6789004e\",\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[{\"meta\":{\"index\":\"27b98a60-bb57-11e8-a056-d1ed6789004e\",\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"meep.log.dest\",\"value\":\"ue1-iperf\",\"params\":{\"query\":\"ue1-iperf\",\"type\":\"phrase\"}},\"query\":{\"match\":{\"meep.log.dest\":{\"query\":\"ue1-iperf\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}},{\"meta\":{\"index\":\"27b98a60-bb57-11e8-a056-d1ed6789004e\",\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"meep.log.msgType\",\"value\":\"ingressPacketStats\",\"params\":{\"query\":\"ingressPacketStats\",\"type\":\"phrase\"}},\"query\":{\"match\":{\"meep.log.msgType\":{\"query\":\"ingressPacketStats\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}]}"
        "searchSourceJSON": "{\"index\":\"27b98a60-bb57-11e8-a056-d1ed6789004e\",\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[{\"meta\":{\"index\":\"27b98a60-bb57-11e8-a056-d1ed6789004e\",\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"meep.log.msgType\",\"value\":\"ingressPacketStats\",\"params\":{\"query\":\"ingressPacketStats\",\"type\":\"phrase\"}},\"query\":{\"match\":{\"meep.log.msgType\":{\"query\":\"ingressPacketStats\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}},{\"meta\":{\"index\":\"27b98a60-bb57-11e8-a056-d1ed6789004e\",\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"meep.log.src\",\"value\":\"ue1-iperf\",\"params\":{\"query\":\"ue1-iperf\",\"type\":\"phrase\"}},\"query\":{\"match\":{\"meep.log.src\":{\"query\":\"ue1-iperf\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}]}"
      }
    }
  },
@@ -159,7 +159,7 @@
      "description": "",
      "version": 1,
      "kibanaSavedObjectMeta": {
        "searchSourceJSON": "{\"index\":\"27b98a60-bb57-11e8-a056-d1ed6789004e\",\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[{\"meta\":{\"index\":\"27b98a60-bb57-11e8-a056-d1ed6789004e\",\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"meep.log.dest\",\"value\":\"ue2-svc\",\"params\":{\"query\":\"ue2-svc\",\"type\":\"phrase\"}},\"query\":{\"match\":{\"meep.log.dest\":{\"query\":\"ue2-svc\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}},{\"meta\":{\"index\":\"27b98a60-bb57-11e8-a056-d1ed6789004e\",\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"meep.log.msgType\",\"value\":\"ingressPacketStats\",\"params\":{\"query\":\"ingressPacketStats\",\"type\":\"phrase\"}},\"query\":{\"match\":{\"meep.log.msgType\":{\"query\":\"ingressPacketStats\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}]}"
        "searchSourceJSON": "{\"index\":\"27b98a60-bb57-11e8-a056-d1ed6789004e\",\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[{\"meta\":{\"index\":\"27b98a60-bb57-11e8-a056-d1ed6789004e\",\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"meep.log.msgType\",\"value\":\"ingressPacketStats\",\"params\":{\"query\":\"ingressPacketStats\",\"type\":\"phrase\"}},\"query\":{\"match\":{\"meep.log.msgType\":{\"query\":\"ingressPacketStats\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}},{\"meta\":{\"index\":\"27b98a60-bb57-11e8-a056-d1ed6789004e\",\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"meep.log.src\",\"value\":\"ue2-svc\",\"params\":{\"query\":\"ue2-svc\",\"type\":\"phrase\"}},\"query\":{\"match\":{\"meep.log.src\":{\"query\":\"ue2-svc\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}]}"
      }
    }
  }
+51 −45
Original line number Diff line number Diff line
@@ -15,8 +15,8 @@
 */

// Set IDCC color theme
$mdc-theme-primary: #379DD8;
$mdc-theme-secondary: #FF9800;
$mdc-theme-primary: #379dd8;
$mdc-theme-secondary: #ff9800;
$mdc-theme-background: #fff;

// Set default margin to 0px
@@ -76,7 +76,7 @@ select {
//     padding-bottom: 4px;
// }
#idcc-title {
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
  font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;
  font-size: 22px;
}
#page-status {
@@ -92,6 +92,16 @@ select {
  padding-left: 16px;
}

// Image
.img-wrap {
  height: 100%;
  width: 100%;
  overflow: hidden;
}
#demo-svc-app-pic {
  height: 100%;
}

// IDCC Styles

.idcc-button {
@@ -110,6 +120,9 @@ select {
.idcc-fullwidth {
  width: 100%;
}
.idcc-fullheight {
  height: 100%;
}
.idcc-width-40 {
  width: 40px;
}
@@ -119,12 +132,5 @@ select {
}
.idcc-status-ra {
  font-weight: bold;
    color: #FF8000;
}


// Map
#map {
    height: 60vh;
    width: 100%;
  color: #ff8000;
}
+95 −69

File changed.

Preview size limit exceeded, changes collapsed.

+21 −65
Original line number Diff line number Diff line
@@ -24,11 +24,6 @@ import * as $ from 'jquery';
import 'material-design-icons';
import * as mdc from 'material-components-web';

import React from 'react';
import ReactDOM from 'react-dom';
import classNames from 'classnames';
import Toolbar from '@material-ui/core/Toolbar';

// Import JS dependencies
import * as demoSvcRestApiClient from '../../../demo-client/js/src/index.js';
import * as iperfTransitRestApiClient from '../../../iperf-proxy-client/js/src/index.js';
@@ -45,26 +40,17 @@ import * as im6 from '../img/azone2-edge1-svc.jpg';
const PAGE_STATUS = 'page-status-link';
const PAGE_SETTINGS = 'page-settings-link';

const STATUS_OK = 'No Conflict';
const STATUS_RA = 'Active Resolution Advisory';

const DEFAULT_REFRESH_INTERVAL_MS = 1000;


// Variables
var drawer;
var refreshIntervalTextfield;
var refreshInterval = DEFAULT_REFRESH_INTERVAL_MS;
var refreshIntervalTimer;
var mapLayerSelect;
var mapLayers = [];
var map;
var targetedUeNameDialogTextfield;
var targetedUeAppNameDialogTextfield1;
var targetedUeAppNameDialogTextfield2;
var iperfBwDialogTextfield;


// MEEP Controller REST API JS client
var basepath = 'http://' + location.host + location.pathname + 'v1/';
console.log("basepath: " + basepath);
@@ -127,7 +113,6 @@ function showTrafficGenerator() {
    $('#stop-demo-iperf-button').show();
}


/**
 * Callback function to receive the result of the getUserInfo operation.
 * @callback module:api/userApi~getUserInfoCallback
@@ -220,6 +205,7 @@ function demoIperfOnButtonCb(error, data, response) {
        console.log("response successful");
    }
}

function demoIperfOffButtonCb(error, data, response) {
    console.log("Received iperf OFF response");

@@ -300,7 +286,6 @@ function initializeUI() {
    defaultUserInfo1("ue1", "zone1 / zone1-poa1")
    defaultUserInfo2("ue2-ext", "zone1 / zone1-poa1")


    iperfBwDialogTextfield = new mdc.textField.MDCTextField(document.querySelector('#iperf-bw-tf-div'));
    iperfBwDialogTextfield.valid = true;

@@ -324,7 +309,6 @@ function initializeUI() {
        ueStateApi.updateUeState(targetedUeNameDialogTextfield.value, ueState, genTrafficCb);

        var iperfInfo = new iperfTransitRestApiClient.IperfInfo();

        iperfInfo['name'] = targetedUeNameDialogTextfield.value;

        if (portApp != "31111") {
@@ -334,7 +318,6 @@ function initializeUI() {
        }

        iperfInfo.throughput = iperfBwDialogTextfield.value;

        iperfInfoApi.handleIperfInfo(iperfInfo, demoIperfOnButtonCb);
    });
    // STOP TRAFFIC BUTTON
@@ -348,7 +331,6 @@ function initializeUI() {
        ueStateApi.updateUeState(targetedUeNameDialogTextfield.value, ueState, genTrafficCb);

        var iperfInfo = new iperfTransitRestApiClient.IperfInfo();

        iperfInfo['name'] = targetedUeNameDialogTextfield.value;

        if (portApp != "31111") {
@@ -358,12 +340,9 @@ function initializeUI() {
        }

        iperfInfo.throughput = "0"

        iperfInfoApi.handleIperfInfo(iperfInfo, demoIperfOffButtonCb);
    });



    // Set Status page
    setMainContent(PAGE_STATUS);

@@ -386,7 +365,6 @@ function setMainContent(targetId) {

        // Refresh form field values here to update UI
        refreshIntervalTextfield.value = refreshIntervalTextfield.value;
        mapLayerSelect.value = mapLayerSelect.value;
    }
}

@@ -406,30 +384,12 @@ function startAutomaticRefresh() {
    }
}

// Stop automatic visualization updates
function stopAutomaticRefresh() {
    console.log("Stopping automatic refresh");
    clearInterval(refreshIntervalTimer);
}

// Update Map layer visualization
function setMapLayer(style) {
    console.log("Setting map style to: " + style);
    for (var i = 0; i < mapLayers.length; ++i) {
        if (mapLayers[i].type == 'TILE') {
            mapLayers[i].setVisible(MAP_STYLES[i] === style);
        }
    }
}


// Initialize variables and listeners when document ready
$(document).ready(function () {

    // Initialize variables
    drawer = new mdc.drawer.MDCPersistentDrawer(document.querySelector('#main-drawer'));
    refreshIntervalTextfield = new mdc.textField.MDCTextField(document.querySelector('#refresh-interval-tf-div'));
    mapLayerSelect = new mdc.select.MDCSelect(document.querySelector('#map-layer-select-div'));

    // Register event listeners
    $('.idcc-toolbar-menu').on('click', function () {
@@ -453,10 +413,6 @@ $(document).ready(function () {
        startAutomaticRefresh();
    });

    $("#map-layer-select").change(function () {
        setMapLayer(this.value);
    });

    // Initialize UI
    initializeUI();
});
Loading