2 * Copyright (c) 2016 highstreet technologies GmbH and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 define(['app/mwtnPerformanceLink/mwtnPerformanceLink.module',
10 'app/mwtnPerformanceLink/mwtnPerformanceLink.services'],
11 function (mwtnPerformanceLinkApp) {
13 mwtnPerformanceLinkApp.register.controller('mwtnPerformanceLinkCtrl', ['$scope', '$rootScope', '$window', '$translate', '$mwtnLog', '$mwtnPerformanceLink', 'uiGridConstants',
14 function ($scope, $rootScope, $window, $translate, $mwtnLog, $mwtnPerformanceLink, uiGridConstants) {
16 var COMPONENT = 'mwtnPerformanceLink';
17 $mwtnLog.info({ component: COMPONENT, message: 'mwtn Link Performance started!' });
19 $rootScope.section_logo = 'src/app/mwtnPerformanceLink/images/mwtnPerformance.png'; // Add your topbar logo location here such as 'assets/images/logo_topology.gif'
24 $scope.timePeriod = "15 minutes";
25 $scope.timePeriods = ["15 minutes", "24 hours"];
28 $scope.selectedLtpIdA = 'Select LTP';
29 $scope.selectedLtpIdB = 'Select LTP';
30 $scope.availableLtpIdsA = ['Select LTP'];
31 $scope.availableLtpIdsB = ['Select LTP'];
33 var formatTimeStamp = function(timeStamp) {
34 var result = $mwtnPerformanceLink.formatTimeStamp(timeStamp);
35 // 2017-06-22 14:52:21.0 UTC -> 2017-06-22 14:52 UTC
36 var array = result.split(' ');
37 if (array && array.length === 3) {
38 result = [array[0], array[1].slice(0,-5), array[2]].join(' ');
43 var initNodeList = function (nodes) {
44 $scope.networkElements = [];
45 nodes.map(function (ne) {
46 // revision detection should go to commons
47 if (ne['netconf-node-topology:connection-status'] === 'connected' && ne['netconf-node-topology:available-capabilities'] && ne['netconf-node-topology:available-capabilities']['available-capability']) {
48 ne['netconf-node-topology:available-capabilities']['available-capability'].map(function (cap) {
49 if (cap.contains('CoreModel-CoreNetworkModule-ObjectClasses')) {
50 ne.onfCoreModelRevision = cap.split('?revision=')[1].substring(0, 10);
51 } else if (cap.contains('MicrowaveModel-ObjectClasses-AirInterface')) {
52 ne.onfAirInterfaceRevision = cap.split('?revision=')[1].substring(0, 10);
53 } else if (!ne.onfAirInterfaceRevision && cap.contains('MicrowaveModel-ObjectClasses')) {
54 ne.onfAirInterfaceRevision = cap.split('?revision=')[1].substring(0, 10);
57 if (ne.onfAirInterfaceRevision) {
58 $scope.networkElements.push({ id: ne['node-id'], revision: ne.onfAirInterfaceRevision });
62 $scope.networkElements.sort(function (a, b) {
63 if (a.id < b.id) return -1;
64 if (a.id > b.id) return 1;
68 // select one of the nodes
69 // var select = parseInt(Math.random() * $scope.networkElements.length);
70 // $scope.networkElementA = $scope.networkElements[select].id;
71 // $scope.networkElementB = $scope.networkElements[select].id;
74 var initLinkIds = function () {
75 var functionId = 'sdnperformance';
76 var docType = 'historicalperformance15min';
77 if ($scope.timePeriod !== $scope.timePeriods[0]) {
78 docType = 'historicalperformance24h';
85 "field": "radio-signal-id"
90 $mwtnPerformanceLink.getAggregations(functionId, docType, aggregations).then(function (success) {
91 $scope.linkIds = success.data.aggregations['radio-signal-id'].buckets.map(function(bucket){
100 $mwtnPerformanceLink.getMountPoints().then(function (mountpoints) {
101 initNodeList(mountpoints);
103 }, function (error) {
104 $scope.networkElements = [];
109 //data visible on screen
110 $scope.performance826 = [];
111 $scope.receiveLevel = [];
112 $scope.transmissionLevel = [];
113 $scope.modulation = [];
114 $scope.temperature = [];
116 $scope.crossPolarDiscrimination = [];
118 $scope.paginationOptions = {
124 //page sizes, based on time period
125 $scope.pageSizes = function () {
127 if ($scope.timePeriod && $scope.timePeriod === "15 minutes") {
129 arr = [96, (96 * 2), (96 * 7)];
132 arr = [7, 30, (30 * 3), (30 * 6), (30 * 12)];
138 $scope.selectPageSize = function () {
140 if ($scope.timePeriod && $scope.timePeriod === "15 minutes") {
150 $scope.itemsMessage = function () {
151 if ($scope.timePeriod && $scope.timePeriod === "15 minutes") {
152 return "15 minutes items per page";
154 return "24 hours items per page";
159 $scope.paginationStatusMessage = function (grid) {
160 if (grid === 'receiveLevel') {
161 let start = ($scope.gridOptionsReceiveLevel.paginationCurrentPage - 1) * $scope.gridOptionsReceiveLevel.paginationPageSize + 1;
162 let end = ($scope.gridOptionsReceiveLevel.paginationCurrentPage - 1) * $scope.gridOptionsReceiveLevel.paginationPageSize + 1 + $scope.receiveLevel.length - 1;
163 let total = $scope.gridOptionsReceiveLevel.totalItems;
164 let message = "Showing {0} to {1} of {2} items";
165 return message.format(start, end, total);
167 else if (grid === 'transmissionLevel') {
168 let start = ($scope.gridOptionsTransmissionLevel.paginationCurrentPage - 1) * $scope.gridOptionsTransmissionLevel.paginationPageSize + 1;
169 let end = ($scope.gridOptionsTransmissionLevel.paginationCurrentPage - 1) * $scope.gridOptionsTransmissionLevel.paginationPageSize + 1 + $scope.transmissionLevel.length - 1;
170 let total = $scope.gridOptionsTransmissionLevel.totalItems;
171 let message = "Showing {0} to {1} of {2} items";
172 return message.format(start, end, total);
174 else if (grid === 'modulation') {
175 let start = ($scope.gridOptionsModulation.paginationCurrentPage - 1) * $scope.gridOptionsModulation.paginationPageSize + 1;
176 let end = ($scope.gridOptionsModulation.paginationCurrentPage - 1) * $scope.gridOptionsModulation.paginationPageSize + 1 + $scope.modulation.length - 1;
177 let total = $scope.gridOptionsModulation.totalItems;
178 let message = "Showing {0} to {1} of {2} items";
179 return message.format(start, end, total);
181 } else if (grid === 'temperature') {
182 let start = ($scope.gridOptionsTemperature.paginationCurrentPage - 1) * $scope.gridOptionsTemperature.paginationPageSize + 1;
183 let end = ($scope.gridOptionsTemperature.paginationCurrentPage - 1) * $scope.gridOptionsTemperature.paginationPageSize + 1 + $scope.temperature.length - 1;
184 let total = $scope.gridOptionsTemperature.totalItems;
185 let message = "Showing {0} to {1} of {2} items";
186 return message.format(start, end, total);
188 } else if (grid === 'snir') {
189 let start = ($scope.gridOptionsSnir.paginationCurrentPage - 1) * $scope.gridOptionsSnir.paginationPageSize + 1;
190 let end = ($scope.gridOptionsSnir.paginationCurrentPage - 1) * $scope.gridOptionsSnir.paginationPageSize + 1 + $scope.snir.length - 1;
191 let total = $scope.gridOptionsSnir.totalItems;
192 let message = "Showing {0} to {1} of {2} items";
193 return message.format(start, end, total);
195 } else if (grid === 'crossPolarDiscrimination') {
196 let start = ($scope.gridOptionsCrossPolarDiscrimination.paginationCurrentPage - 1) * $scope.gridOptionsCrossPolarDiscrimination.paginationPageSize + 1;
197 let end = ($scope.gridOptionsCrossPolarDiscrimination.paginationCurrentPage - 1) * $scope.gridOptionsCrossPolarDiscrimination.paginationPageSize + 1 + $scope.crossPolarDiscrimination.length - 1;
198 let total = $scope.gridOptionsCrossPolarDiscrimination.totalItems;
199 let message = "Showing {0} to {1} of {2} items";
200 return message.format(start, end, total);
204 //seek page based on grid
205 $scope.seekPage = function (page, grid) {
211 case 'receiveLevel': $scope.recvGridApi.pagination.seek(parseInt(page));
214 case 'transmissionLevel': $scope.transmissionGridApi.pagination.seek(parseInt(page));
217 case 'modulation': $scope.gridApi.pagination.seek(parseInt(page));
220 case 'temperature': $scope.gridTemperatureApi.pagination.seek(parseInt(page));
223 case 'snir': $scope.gridSNIRApi.pagination.seek(parseInt(page));
226 case 'crossPolarDiscrimination': $scope.gridXpdApi.pagination.seek(parseInt(page));
231 //table configuration
233 //receive lvl configuration
234 $scope.gridOptionsReceiveLevel = {
235 paginationPageSizes: $scope.pageSizes(),
236 paginationPageSize: $scope.selectPageSize(),
237 useExternalPagination: true,
238 enablePaginationControls: false,
239 enableFiltering: false,
240 enableSorting: false,
241 enableGridMenu: true,
243 { field: 'layerProtocol', type: 'string', displayName: 'Layer Protocol Name', width: 90, visible: false },
244 { field: 'id', type: 'string', displayName: $translate.instant('MWTN_LTP'), width: 200, visible: false },
245 { field: 'radiosignal', type: 'string', displayName: 'Radio Signal Id', width: 90 },
246 { field: 'scannerId', type: 'string', displayName: 'Scanner Id', width: 90 },
247 { field: 'timestamp', type: 'string', displayName: 'End time', width: 200 },
248 { field: 'suspectInterval', type: 'string', displayName: 'Suspect Interval Flag', width: 100 },
249 { field: 'rxmina', type: 'string', displayName: 'Rx min A', width: 90 },
250 { field: 'rxavga', type: 'string', displayName: 'Rx avg A', width: 90 },
251 { field: 'rxmaxa', type: 'string', displayName: 'Rx max A', width: 90 },
252 { field: 'rxminb', type: 'string', displayName: 'Rx min B', width: 90 },
253 { field: 'rxavgb', type: 'string', displayName: 'Rx avg B', width: 90 },
254 { field: 'rxmaxb', type: 'string', displayName: 'Rx max B', width: 90 }
256 data: 'receiveLevel',
257 onRegisterApi: function (gridApi) {
258 $scope.recvGridApi = gridApi;
259 $scope.recvGridApi.pagination.on.paginationChanged($scope, function (newPage, pageSize) {
260 $scope.paginationOptions.pageNumber = newPage;
261 $scope.paginationOptions.pageSize = pageSize;
262 getDataFromNEs($scope.networkElementIdA, $scope.selectedLtpIdA, $scope.networkElementIdB, $scope.selectedLtpIdB, "receiveLevel");
267 $scope.gridOptionsTransmissionLevel = {
268 paginationPageSizes: $scope.pageSizes(),
269 paginationPageSize: $scope.selectPageSize(),
270 useExternalPagination: true,
271 enablePaginationControls: false,
272 enableFiltering: false,
273 enableSorting: false,
274 enableGridMenu: true,
276 { field: 'layerProtocol', type: 'string', displayName: 'Layer Protocol Name', width: 90, visible: false },
277 { field: 'id', type: 'string', displayName: $translate.instant('MWTN_LTP'), width: 200, visible: false },
278 { field: 'radiosignal', type: 'string', displayName: 'Radio Signal Id', width: 90 },
279 { field: 'scannerId', type: 'string', displayName: 'Scanner Id', width: 90 },
280 { field: 'timestamp', type: 'string', displayName: 'End time', width: 200 },
281 { field: 'suspectInterval', type: 'string', displayName: 'Suspect Interval Flag', width: 100 },
282 { field: 'txmina', type: 'string', displayName: 'Tx min A', width: 90 },
283 { field: 'txavga', type: 'string', displayName: 'Tx avg A', width: 90 },
284 { field: 'txmaxa', type: 'string', displayName: 'Tx max A', width: 90 },
285 { field: 'txminb', type: 'string', displayName: 'Tx min B', width: 90 },
286 { field: 'txavgb', type: 'string', displayName: 'Tx avg B', width: 90 },
287 { field: 'txmaxb', type: 'string', displayName: 'Tx max B', width: 90 }
289 data: 'transmissionLevel',
290 onRegisterApi: function (gridApi) {
291 $scope.transmissionGridApi = gridApi;
292 $scope.transmissionGridApi.pagination.on.paginationChanged($scope, function (newPage, pageSize) {
293 $scope.paginationOptions.pageNumber = newPage;
294 $scope.paginationOptions.pageSize = pageSize;
295 getDataFromNEs($scope.networkElementIdA, $scope.selectedLtpIdA, $scope.networkElementIdB, $scope.selectedLtpIdB, "transmissionLevel");
300 $scope.gridOptionsModulation = {
301 paginationPageSizes: $scope.pageSizes(),
302 paginationPageSize: $scope.selectPageSize(),
303 useExternalPagination: true,
304 enablePaginationControls: false,
305 enableFiltering: false,
306 enableSorting: false,
307 enableGridMenu: true,
309 { field: 'layerProtocol', type: 'string', displayName: 'Layer Protocol Name', width: 90, visible: false },
310 { field: 'id', type: 'string', displayName: $translate.instant('MWTN_LTP'), width: 200, visible: false },
311 { field: 'radiosignal', type: 'string', displayName: 'Radio Signal Id', width: 90 },
312 { field: 'scannerId', type: 'string', displayName: 'Scanner Id', width: 90 },
313 { field: 'timestamp', type: 'string', displayName: 'End time', width: 200 },
314 { field: 'suspectInterval', type: 'string', displayName: 'Suspect Interval Flag', width: 100 },
315 { field: 'time2Sa', type: 'string', displayName: 'QAM2S A', width: 90 },
316 { field: 'time2a', type: 'string', displayName: 'QAM2 A', width: 90 },
317 { field: 'time2La', type: 'string', displayName: 'QAM2L A', width: 90 },
318 { field: 'time4Sa', type: 'string', displayName: 'QAM4S A', width: 90 },
319 { field: 'time4a', type: 'string', displayName: 'QAM4 A', width: 90 },
320 { field: 'time4La', type: 'string', displayName: 'QAM4L A', width: 90 },
321 { field: 'time16Sa', type: 'string', displayName: 'QAM16S A', width: 90 },
322 { field: 'time16a', type: 'string', displayName: 'QAM16 A', width: 90 },
323 { field: 'time16La', type: 'string', displayName: 'QAM16L A', width: 90 },
324 { field: 'time32Sa', type: 'string', displayName: 'QAM32S A', width: 90 },
325 { field: 'time32a', type: 'string', displayName: 'QAM32 A', width: 90 },
326 { field: 'time32La', type: 'string', displayName: 'QAM32L A', width: 90 },
327 { field: 'time64Sa', type: 'string', displayName: 'QAM64S A', width: 90 },
328 { field: 'time64a', type: 'string', displayName: 'QAM64 A', width: 90 },
329 { field: 'time64La', type: 'string', displayName: 'QAM64L A', width: 90 },
330 { field: 'time128Sa', type: 'string', displayName: 'QAM128S A', width: 90 },
331 { field: 'time128a', type: 'string', displayName: 'QAM128 A', width: 90 },
332 { field: 'time128La', type: 'string', displayName: 'QAM128L A', width: 90 },
333 { field: 'time256Sa', type: 'string', displayName: 'QAM256S A', width: 90 },
334 { field: 'time256a', type: 'string', displayName: 'QAM256 A', width: 90 },
335 { field: 'time256La', type: 'string', displayName: 'QAM256L A', width: 90 },
336 { field: 'time512Sa', type: 'string', displayName: 'QAM512S A', width: 90 },
337 { field: 'time512a', type: 'string', displayName: 'QAM512 A', width: 90 },
338 { field: 'time512La', type: 'string', displayName: 'QAM512L A', width: 90 },
339 { field: 'time1024Sa', type: 'string', displayName: 'QAM1024S A', width: 90 },
340 { field: 'time1024a', type: 'string', displayName: 'QAM1024 A', width: 90 },
341 { field: 'time1024La', type: 'string', displayName: 'QAM1024L A', width: 90 },
342 { field: 'time2048Sa', type: 'string', displayName: 'QAM2048S A', width: 90 },
343 { field: 'time2048a', type: 'string', displayName: 'QAM2048 A', width: 90 },
344 { field: 'time2048La', type: 'string', displayName: 'QAM2048L A', width: 90 },
345 { field: 'time4096Sa', type: 'string', displayName: 'QAM4096S A', width: 90 },
346 { field: 'time4096a', type: 'string', displayName: 'QAM4096 A', width: 90 },
347 { field: 'time4096La', type: 'string', displayName: 'QAM4096L A', width: 90 },
348 { field: 'time8192Sa', type: 'string', displayName: 'QAM8192S A', width: 90 },
349 { field: 'time8192a', type: 'string', displayName: 'QAM8192 A', width: 90 },
350 { field: 'time8192La', type: 'string', displayName: 'QAM8192L A', width: 90 },
352 { field: 'time2Sb', type: 'string', displayName: 'QAM2S B', width: 90 },
353 { field: 'time2b', type: 'string', displayName: 'QAM2 B', width: 90 },
354 { field: 'time2Lb', type: 'string', displayName: 'QAM2L B', width: 90 },
355 { field: 'time4Sb', type: 'string', displayName: 'QAM4S B', width: 90 },
356 { field: 'time4b', type: 'string', displayName: 'QAM4 B', width: 90 },
357 { field: 'time4Lb', type: 'string', displayName: 'QAM4L B', width: 90 },
358 { field: 'time16Sb', type: 'string', displayName: 'QAM16S B', width: 90 },
359 { field: 'time16b', type: 'string', displayName: 'QAM16 B', width: 90 },
360 { field: 'time16Lb', type: 'string', displayName: 'QAM16L B', width: 90 },
361 { field: 'time32Sb', type: 'string', displayName: 'QAM32S B', width: 90 },
362 { field: 'time32b', type: 'string', displayName: 'QAM32 B', width: 90 },
363 { field: 'time32Lb', type: 'string', displayName: 'QAM32L B', width: 90 },
364 { field: 'time64Sb', type: 'string', displayName: 'QAM64S B', width: 90 },
365 { field: 'time64b', type: 'string', displayName: 'QAM64 B', width: 90 },
366 { field: 'time64Lb', type: 'string', displayName: 'QAM64L B', width: 90 },
367 { field: 'time128Sb', type: 'string', displayName: 'QAM128S B', width: 90 },
368 { field: 'time128b', type: 'string', displayName: 'QAM128 B', width: 90 },
369 { field: 'time128Lb', type: 'string', displayName: 'QAM128L B', width: 90 },
370 { field: 'time256Sb', type: 'string', displayName: 'QAM256S B', width: 90 },
371 { field: 'time256b', type: 'string', displayName: 'QAM256 B', width: 90 },
372 { field: 'time256Lb', type: 'string', displayName: 'QAM256L B', width: 90 },
373 { field: 'time512Sb', type: 'string', displayName: 'QAM512S B', width: 90 },
374 { field: 'time512b', type: 'string', displayName: 'QAM512 B', width: 90 },
375 { field: 'time512Lb', type: 'string', displayName: 'QAM512L B', width: 90 },
376 { field: 'time1024Sb', type: 'string', displayName: 'QAM1024S B', width: 90 },
377 { field: 'time1024b', type: 'string', displayName: 'QAM1024 B', width: 90 },
378 { field: 'time1024Lb', type: 'string', displayName: 'QAM1024L B', width: 90 },
379 { field: 'time2048Sb', type: 'string', displayName: 'QAM2048S B', width: 90 },
380 { field: 'time2048b', type: 'string', displayName: 'QAM2048 B', width: 90 },
381 { field: 'time2048Lb', type: 'string', displayName: 'QAM2048L B', width: 90 },
382 { field: 'time4096Sb', type: 'string', displayName: 'QAM4096S B', width: 90 },
383 { field: 'time4096b', type: 'string', displayName: 'QAM4096 B', width: 90 },
384 { field: 'time4096Lb', type: 'string', displayName: 'QAM4096L B', width: 90 },
385 { field: 'time8192Sb', type: 'string', displayName: 'QAM8192S B', width: 90 },
386 { field: 'time8192b', type: 'string', displayName: 'QAM8192 B', width: 90 },
387 { field: 'time8192Lb', type: 'string', displayName: 'QAM8192L B', width: 90 }
390 onRegisterApi: function (gridApi) {
391 $scope.gridApi = gridApi;
392 $scope.gridApi.pagination.on.paginationChanged($scope, function (newPage, pageSize) {
393 $scope.paginationOptions.pageNumber = newPage;
394 $scope.paginationOptions.pageSize = pageSize;
395 getDataFromNEs($scope.networkElementIdA, $scope.selectedLtpIdA, $scope.networkElementIdB, $scope.selectedLtpIdB, "modulation");
400 $scope.gridOptionsTemperature = {
401 paginationPageSizes: $scope.pageSizes(),
402 paginationPageSize: $scope.selectPageSize(),
403 useExternalPagination: true,
404 enablePaginationControls: false,
405 enableFiltering: false,
406 enableSorting: false,
407 enableGridMenu: true,
409 { field: 'layerProtocol', type: 'string', displayName: 'Layer Protocol Name', width: 90, visible: false },
410 { field: 'id', type: 'string', displayName: $translate.instant('MWTN_LTP'), width: 200, visible: false },
411 { field: 'radiosignal', type: 'string', displayName: 'Radio Signal Id', width: 90 },
412 { field: 'scannerId', type: 'string', displayName: 'Scanner Id', width: 90 },
413 { field: 'timestamp', type: 'string', displayName: 'End time', width: 200 },
414 { field: 'suspectInterval', type: 'string', displayName: 'Suspect Interval Flag', width: 100 },
415 { field: 'rfTempMina', type: 'string', displayName: 'Rf Temp Min A [°C]', width: 90 },
416 { field: 'rfTempAvga', type: 'string', displayName: 'Rf Temp Avg A[°C]', width: 90 },
417 { field: 'rfTempMaxa', type: 'string', displayName: 'Rf Temp Max A [°C]', width: 90 },
418 { field: 'rfTempMinb', type: 'string', displayName: 'Rf Temp Min B [°C]', width: 90 },
419 { field: 'rfTempAvgb', type: 'string', displayName: 'Rf Temp Avg B [°C]', width: 90 },
420 { field: 'rfTempMaxb', type: 'string', displayName: 'Rf Temp Max B [°C]', width: 90 }
424 onRegisterApi: function (gridApi) {
425 $scope.gridTemperatureApi = gridApi;
426 $scope.gridTemperatureApi.pagination.on.paginationChanged($scope, function (newPage, pageSize) {
427 $scope.paginationOptions.pageNumber = newPage;
428 $scope.paginationOptions.pageSize = pageSize;
429 getDataFromNEs($scope.networkElementIdA, $scope.selectedLtpIdA, $scope.networkElementIdB, $scope.selectedLtpIdB, "temperature");
434 $scope.gridOptionsSnir = {
435 paginationPageSizes: $scope.pageSizes(),
436 paginationPageSize: $scope.selectPageSize(),
437 useExternalPagination: true,
438 enablePaginationControls: false,
439 enableFiltering: false,
440 enableSorting: false,
441 enableGridMenu: true,
443 { field: 'layerProtocol', type: 'string', displayName: 'Layer Protocol Name', width: 90, visible: false },
444 { field: 'id', type: 'string', displayName: 'Termination point', width: 200, visible: false },
445 { field: 'radiosignal', type: 'string', displayName: 'Radio Signal Id', width: 90 },
446 { field: 'scannerId', type: 'string', displayName: 'Scanner Id', width: 90 },
447 { field: 'timestamp', type: 'string', displayName: 'End time', width: 200 },
448 { field: 'suspectInterval', type: 'string', displayName: 'Suspect Interval Flag', width: 100 },
449 { field: 'snirMin', type: 'string', displayName: [$translate.instant('MWTN_SNIR_MIN'), 'A', '[dB]'].join(' '), width: 90 },
450 { field: 'snirAvg', type: 'string', displayName: [$translate.instant('MWTN_SNIR_AVG'), 'A', '[dB]'].join(' '), width: 90 },
451 { field: 'snirMax', type: 'string', displayName: [$translate.instant('MWTN_SNIR_MAX'), 'A', '[dB]'].join(' '), width: 90 },
452 { field: 'snirMin', type: 'string', displayName: [$translate.instant('MWTN_SNIR_MIN'), 'B', '[dB]'].join(' '), width: 90 },
453 { field: 'snirAvg', type: 'string', displayName: [$translate.instant('MWTN_SNIR_AVG'), 'B', '[dB]'].join(' '), width: 90 },
454 { field: 'snirMax', type: 'string', displayName: [$translate.instant('MWTN_SNIR_MAX'), 'B', '[dB]'].join(' '), width: 90 }
457 onRegisterApi: function (gridApi) {
458 $scope.gridSNIRApi = gridApi;
459 $scope.gridSNIRApi.pagination.on.paginationChanged($scope, function (newPage, pageSize) {
460 $scope.paginationOptions.pageNumber = newPage;
461 $scope.paginationOptions.pageSize = pageSize;
462 getDataFromNEs($scope.networkElementIdA, $scope.selectedLtpIdA, $scope.networkElementIdB, $scope.selectedLtpIdB, "snir");
468 $scope.gridOptionsCrossPolarDiscrimination = {
469 paginationPageSizes: $scope.pageSizes(),
470 paginationPageSize: $scope.selectPageSize(),
471 useExternalPagination: true,
472 enablePaginationControls: false,
473 enableFiltering: false,
474 enableSorting: false,
475 enableGridMenu: true,
477 { field: 'layerProtocol', type: 'string', displayName: 'Layer Protocol Name', width: 90, visible: false },
478 { field: 'id', type: 'string', displayName: $translate.instant('MWTN_LTP'), width: 200, visible: false },
479 { field: 'radiosignal', type: 'string', displayName: 'Radio Signal Id', width: 90 },
480 { field: 'scannerId', type: 'string', displayName: 'Scanner Id', width: 90 },
481 { field: 'timestamp', type: 'string', displayName: 'End time', width: 200 },
482 { field: 'suspectInterval', type: 'string', displayName: 'Suspect Interval Flag', width: 100 },
483 { field: 'xpdMina', type: 'string', displayName: 'CPD min A [dB]', width: 90 },
484 { field: 'xpdAvga', type: 'string', displayName: 'CPD avg A [dB]', width: 90 },
485 { field: 'xpdMaxa', type: 'string', displayName: 'CPD max A [dB]', width: 90 },
486 { field: 'xpdMinb', type: 'string', displayName: 'CPD min B [dB]', width: 90 },
487 { field: 'xpdAvgb', type: 'string', displayName: 'CPD avg B [dB]', width: 90 },
488 { field: 'xpdMaxb', type: 'string', displayName: 'CPD max B [dB]', width: 90 }
490 data: 'crossPolarDiscrimination',
491 onRegisterApi: function (gridApi) {
492 $scope.gridXpdApi = gridApi;
493 $scope.gridXpdApi.pagination.on.paginationChanged($scope, function (newPage, pageSize) {
494 $scope.paginationOptions.pageNumber = newPage;
495 $scope.paginationOptions.pageSize = pageSize;
496 getDataFromNEs($scope.networkElementIdA, $scope.selectedLtpIdA, $scope.networkElementIdB, $scope.selectedLtpIdB, "crossPolarDiscrimination");
501 //sanitize -1 to no value
502 var checkData = function (value) {
503 if (value === -1 || value === undefined) return undefined;
507 var calculateMissingTimestamp = function (lastTimestamp, missingNr) {
508 var dateInMS = Date.parse(lastTimestamp);
509 return new Date(dateInMS + ((missingNr * 15) * 60000))
511 .toHumanReadableTimeFormat()
512 .replace('.000', '.0');
515 var processResponseForGrid = function (dataA, dataB, grid) {
516 // console.log(grid);
518 case "transmissionLevel":
520 var lookupMap = new Map(); //add data based on timestamp
522 dataA.data.hits.hits.map(function (entry, index) {
523 var timeStamp = formatTimeStamp(entry._source['time-stamp']);
524 lookupMap.set(timeStamp, index); //add timestamp and index to map
526 timestamp: timeStamp,
527 id: entry._source['uuid-interface'],
528 layerProtocol: entry._source['layer-protocol-name'],
529 suspectInterval: entry._source['suspect-interval-flag'],
530 scannerId: entry._source['scanner-id'],
531 txmina: checkData(entry._source['performance-data']['tx-level-min']),
532 txavga: checkData(entry._source['performance-data']['tx-level-avg']),
533 txmaxa: checkData(entry._source['performance-data']['tx-level-max']),
534 'radiosignal': entry._source['radio-signal-id']
539 dataB.data.hits.hits.map(function (entry) {
540 var timeStamp = formatTimeStamp(entry._source['time-stamp']);
541 var index = lookupMap.get(timeStamp); //look for timestamp in map
542 if (index !== undefined) { //if a timestamp was found
543 list[index].txminb = checkData(entry._source['performance-data']['tx-level-min']); //add data to b side of element
544 list[index].txavgb = checkData(entry._source['performance-data']['tx-level-avg']);
545 list[index].txmaxb = checkData(entry._source['performance-data']['tx-level-max']);
547 if (list[0].timestamp === $mwtnPerformanceLink.formatTimeStamp(timeStamp)) { //look, if first element in list is same (first element in map is never found against an equals)
548 list[0].txminb = checkData(entry._source['performance-data']['tx-level-min']); //add data to b side of element
549 list[0].txavgb = checkData(entry._source['performance-data']['tx-level-avg']);
550 list[0].txmaxb = checkData(entry._source['performance-data']['tx-level-max']);
552 else { //add new element for b side to list
554 timestamp: timeStamp,
555 id: entry._source['uuid-interface'],
556 layerProtocol: entry._source['layer-protocol-name'],
557 suspectInterval: entry._source['suspect-interval-flag'],
558 scannerId: entry._source['scanner-id'],
559 txminb: checkData(entry._source['performance-data']['tx-level-min']),
560 txavgb: checkData(entry._source['performance-data']['tx-level-avg']),
561 txmaxb: checkData(entry._source['performance-data']['tx-level-max']),
562 'radiosignal': entry._source['radio-signal-id']
568 $scope.transmissionLevel = list; //add list to databound table list
569 $scope.gridOptionsTransmissionLevel.totalItems = getMaxItems(dataA.data.hits.total, dataB.data.hits.total);
575 var lookupMap = new Map();
577 dataA.data.hits.hits.map(function (entry, index) {
578 var timeStamp = formatTimeStamp(entry._source['time-stamp']);
579 lookupMap.set(timeStamp, index);
581 timestamp: timeStamp,
582 id: entry._source['uuid-interface'],
583 layerProtocol: entry._source['layer-protocol-name'],
584 suspectInterval: entry._source['suspect-interval-flag'],
585 scannerId: entry._source['scanner-id'],
586 rxmina: checkData(entry._source['performance-data']['rx-level-min']),
587 rxavga: checkData(entry._source['performance-data']['rx-level-avg']),
588 rxmaxa: checkData(entry._source['performance-data']['rx-level-max']),
589 'radiosignal': entry._source['radio-signal-id']
595 dataB.data.hits.hits.map(function (entry) {
596 var timeStamp = formatTimeStamp(entry._source['time-stamp']);
597 var index = lookupMap.get(timeStamp);
598 if (index !== undefined) {
599 list[index].rxminb = checkData(entry._source['performance-data']['rx-level-min']);
600 list[index].rxavgb = checkData(entry._source['performance-data']['rx-level-avg']);
601 list[index].rxmaxb = checkData(entry._source['performance-data']['rx-level-max']);
603 if (list[0].timestamp === $mwtnPerformanceLink.formatTimeStamp(timeStamp)) {
604 list[0].rxminb = checkData(entry._source['performance-data']['rx-level-min']);
605 list[0].rxavgb = checkData(entry._source['performance-data']['rx-level-avg']);
606 list[0].rxmaxb = checkData(entry._source['performance-data']['rx-level-max']);
609 timestamp: timeStamp,
610 id: entry._source['uuid-interface'],
611 layerProtocol: entry._source['layer-protocol-name'],
612 suspectInterval: entry._source['suspect-interval-flag'],
613 scannerId: entry._source['scanner-id'],
614 rxminb: checkData(entry._source['performance-data']['rx-level-min']),
615 rxavgb: checkData(entry._source['performance-data']['rx-level-avg']),
616 rxmaxb: checkData(entry._source['performance-data']['rx-level-max']),
617 'radiosignal': entry._source['radio-signal-id']
625 $scope.receiveLevel = list;
626 $scope.gridOptionsReceiveLevel.totalItems = getMaxItems(dataA.data.hits.total, dataB.data.hits.total);
634 var lookupMap = new Map();
636 dataA.data.hits.hits.map(function (entry, index) {
637 var timeStamp = formatTimeStamp(entry._source['time-stamp']);
638 lookupMap.set(timeStamp, index);
640 timestamp: timeStamp,
641 id: entry._source['uuid-interface'],
642 layerProtocol: entry._source['layer-protocol-name'],
643 suspectInterval: entry._source['suspect-interval-flag'],
644 scannerId: entry._source['scanner-id'],
645 'time2Sa': checkData(entry._source['performance-data']['time2-states-s']),
646 'time2a': checkData(entry._source['performance-data']['time2-states']),
647 'time2La': checkData(entry._source['performance-data']['time2-states-l']),
648 'time4Sa': checkData(entry._source['performance-data']['time4-states-s']),
649 'time4a': checkData(entry._source['performance-data']['time4-states']),
650 'time4La': checkData(entry._source['performance-data']['time4-states-l']),
651 'time16Sa': checkData(entry._source['performance-data']['time16-states-s']),
652 'time16a': checkData(entry._source['performance-data']['time16-states']),
653 'time16La': checkData(entry._source['performance-data']['time16-states-l']),
654 'time32Sa': checkData(entry._source['performance-data']['time32-states-s']),
655 'time32a': checkData(entry._source['performance-data']['time32-states']),
656 'time32La': checkData(entry._source['performance-data']['time32-states-l']),
657 'time64Sa': checkData(entry._source['performance-data']['time64-states-s']),
658 'time64a': checkData(entry._source['performance-data']['time64-states']),
659 'time64La': checkData(entry._source['performance-data']['time64-states-l']),
660 'time128Sa': checkData(entry._source['performance-data']['time128-states-s']),
661 'time128a': checkData(entry._source['performance-data']['time128-states']),
662 'time128La': checkData(entry._source['performance-data']['time128-states-l']),
663 'time256Sa': checkData(entry._source['performance-data']['time256-states-s']),
664 'time256a': checkData(entry._source['performance-data']['time256-states']),
665 'time256La': checkData(entry._source['performance-data']['time256-states-l']),
666 'time512Sa': checkData(entry._source['performance-data']['time512-states-s']),
667 'time512a': checkData(entry._source['performance-data']['time512-states']),
668 'time512La': checkData(entry._source['performance-data']['time512-states-l']),
669 'time1024Sa': checkData(entry._source['performance-data']['time1024-states-s']),
670 'time1024a': checkData(entry._source['performance-data']['time1024-states']),
671 'time1024La': checkData(entry._source['performance-data']['time1024-states-l']),
672 'time2048Sa': checkData(entry._source['performance-data']['time2048-states-s']),
673 'time2048a': checkData(entry._source['performance-data']['time2048-states']),
674 'time2048La': checkData(entry._source['performance-data']['time2048-states-l']),
675 'time4096Sa': checkData(entry._source['performance-data']['time4096-states-s']),
676 'time4096a': checkData(entry._source['performance-data']['time4096-states']),
677 'time4096La': checkData(entry._source['performance-data']['time4096-states-l']),
678 'time8192Sa': checkData(entry._source['performance-data']['time8192-states-s']),
679 'time8192a': checkData(entry._source['performance-data']['time8192-states']),
680 'time8192La': checkData(entry._source['performance-data']['time8192-states-l']),
681 'radiosignal': entry._source['radio-signal-id']
688 dataB.data.hits.hits.map(function (entry) {
689 var timeStamp = formatTimeStamp(entry._source['time-stamp']);
690 var index = lookupMap.get(timeStamp);
691 if (index !== undefined) {
693 list[index].time2Sb = checkData(entry._source['performance-data']['time2-states-s']);
694 list[index].time2b = checkData(entry._source['performance-data']['time2-states']);
695 list[index].time2Lb = checkData(entry._source['performance-data']['time2-states-l']);
696 list[index].time4Sb = checkData(entry._source['performance-data']['time4-states-s']);
697 list[index].time4b = checkData(entry._source['performance-data']['time4-states']);
698 list[index].time4Lb = checkData(entry._source['performance-data']['time4-states-l']);
699 list[index].time16Sb = checkData(entry._source['performance-data']['time16-states-s']);
700 list[index].time16b = checkData(entry._source['performance-data']['time16-states']);
701 list[index].time16Lb = checkData(entry._source['performance-data']['time16-states-l']);
702 list[index].time32Sb = checkData(entry._source['performance-data']['time32-states-s']);
703 list[index].time32b = checkData(entry._source['performance-data']['time32-states']);
704 list[index].time32Lb = checkData(entry._source['performance-data']['time32-states-l']);
705 list[index].time64Sb = checkData(entry._source['performance-data']['time64-states-s']);
706 list[index].time64b = checkData(entry._source['performance-data']['time64-states']);
707 list[index].time64Lb = checkData(entry._source['performance-data']['time64-states-l']);
708 list[index].time128Sb = checkData(entry._source['performance-data']['time128-states-s']);
709 list[index].time128b = checkData(entry._source['performance-data']['time128-states']);
710 list[index].time128Lb = checkData(entry._source['performance-data']['time128-states-l']);
711 list[index].time256Sb = checkData(entry._source['performance-data']['time256-states-s']);
712 list[index].time256b = checkData(entry._source['performance-data']['time256-states']);
713 list[index].time256Lb = checkData(entry._source['performance-data']['time256-states-l']);
714 list[index].time512Sb = checkData(entry._source['performance-data']['time512-states-s']);
715 list[index].time512b = checkData(entry._source['performance-data']['time512-states']);
716 list[index].time512Lb = checkData(entry._source['performance-data']['time512-states-l']);
717 list[index].time1024Sb = checkData(entry._source['performance-data']['time1024-states-s']);
718 list[index].time1024b = checkData(entry._source['performance-data']['time1024-states']);
719 list[index].time1024Lb = checkData(entry._source['performance-data']['time1024-states-l']);
720 list[index].time2048Sb = checkData(entry._source['performance-data']['time2048-states-s']);
721 list[index].time2048b = checkData(entry._source['performance-data']['time2048-states']);
722 list[index].time2048Lb = checkData(entry._source['performance-data']['time2048-states-l']);
723 list[index].time4096Sb = checkData(entry._source['performance-data']['time4096-states-s']);
724 list[index].time4096b = checkData(entry._source['performance-data']['time4096-states']);
725 list[index].time4096Lb = checkData(entry._source['performance-data']['time4096-states-l']);
726 list[index].time8192Sb = checkData(entry._source['performance-data']['time8192-states-s']);
727 list[index].time8192b = checkData(entry._source['performance-data']['time8192-states']);
728 list[index].time8192Lb = checkData(entry._source['performance-data']['time8192-states-l']);
730 if (list[0].timestamp === $mwtnPerformanceLink.formatTimeStamp(timeStamp)) {
731 list[index].time2Sb = checkData(entry._source['performance-data']['time2-states-s']);
732 list[0].time2b = checkData(entry._source['performance-data']['time2-states']);
733 list[0].time2Lb = checkData(entry._source['performance-data']['time2-states-l']);
734 list[0].time4Sb = checkData(entry._source['performance-data']['time4-states-s']);
735 list[0].time4b = checkData(entry._source['performance-data']['time4-states']);
736 list[0].time4Lb = checkData(entry._source['performance-data']['time4-states-l']);
737 list[0].time16Sb = checkData(entry._source['performance-data']['time16-states-s']);
738 list[0].time16b = checkData(entry._source['performance-data']['time16-states']);
739 list[0].time16Lb = checkData(entry._source['performance-data']['time16-states-l']);
740 list[0].time32Sb = checkData(entry._source['performance-data']['time32-states-s']);
741 list[0].time32b = checkData(entry._source['performance-data']['time32-states']);
742 list[0].time32Lb = checkData(entry._source['performance-data']['time32-states-l']);
743 list[0].time64Sb = checkData(entry._source['performance-data']['time64-states-s']);
744 list[0].time64b = checkData(entry._source['performance-data']['time64-states']);
745 list[0].time64Lb = checkData(entry._source['performance-data']['time64-states-l']);
746 list[0].time128Sb = checkData(entry._source['performance-data']['time128-states-s']);
747 list[0].time128b = checkData(entry._source['performance-data']['time128-states']);
748 list[0].time128Lb = checkData(entry._source['performance-data']['time128-states-l']);
749 list[0].time256Sb = checkData(entry._source['performance-data']['time256-states-s']);
750 list[0].time256b = checkData(entry._source['performance-data']['time256-states']);
751 list[0].time256Lb = checkData(entry._source['performance-data']['time256-states-l']);
752 list[0].time512Sb = checkData(entry._source['performance-data']['time512-states-s']);
753 list[0].time512b = checkData(entry._source['performance-data']['time512-states']);
754 list[0].time512Lb = checkData(entry._source['performance-data']['time512-states-l']);
755 list[0].time1024Sb = checkData(entry._source['performance-data']['time1024-states-s']);
756 list[0].time1024b = checkData(entry._source['performance-data']['time1024-states']);
757 list[0].time1024Lb = checkData(entry._source['performance-data']['time1024-states-l']);
758 list[0].time2048Sb = checkData(entry._source['performance-data']['time2048-states-s']);
759 list[0].time2048b = checkData(entry._source['performance-data']['time2048-states']);
760 list[0].time2048Lb = checkData(entry._source['performance-data']['time2048-states-l']);
761 list[0].time4096Sb = checkData(entry._source['performance-data']['time4096-states-s']);
762 list[0].time4096b = checkData(entry._source['performance-data']['time4096-states']);
763 list[0].time4096Lb = checkData(entry._source['performance-data']['time4096-states-l']);
764 list[0].time8192Sb = checkData(entry._source['performance-data']['time8192-states-s']);
765 list[0].time8192b = checkData(entry._source['performance-data']['time8192-states']);
766 list[0].time8192Lb = checkData(entry._source['performance-data']['time8192-states-l']);
770 timestamp: timeStamp,
771 id: entry._source['uuid-interface'],
772 layerProtocol: entry._source['layer-protocol-name'],
773 suspectInterval: entry._source['suspect-interval-flag'],
774 scannerId: entry._source['scanner-id'],
775 'time2Sb': checkData(entry._source['performance-data']['time2-states-s']),
776 'time2b': checkData(entry._source['performance-data']['time2-states']),
777 'time2Lb': checkData(entry._source['performance-data']['time2-states-l']),
778 'time4Sb': checkData(entry._source['performance-data']['time4-states-s']),
779 'time4b': checkData(entry._source['performance-data']['time4-states']),
780 'time4Lb': checkData(entry._source['performance-data']['time4-states-l']),
781 'time16Sb': checkData(entry._source['performance-data']['time16-states-s']),
782 'time16b': checkData(entry._source['performance-data']['time16-states']),
783 'time16Lb': checkData(entry._source['performance-data']['time16-states-l']),
784 'time32Sb': checkData(entry._source['performance-data']['time32-states-s']),
785 'time32b': checkData(entry._source['performance-data']['time32-states']),
786 'time32Lb': checkData(entry._source['performance-data']['time32-states-l']),
787 'time64Sb': checkData(entry._source['performance-data']['time64-states-s']),
788 'time64b': checkData(entry._source['performance-data']['time64-states']),
789 'time64Lb': checkData(entry._source['performance-data']['time64-states-l']),
790 'time128Sb': checkData(entry._source['performance-data']['time128-states-s']),
791 'time128b': checkData(entry._source['performance-data']['time128-states']),
792 'time128Lb': checkData(entry._source['performance-data']['time128-states-l']),
793 'time256Sb': checkData(entry._source['performance-data']['time256-states-s']),
794 'time256b': checkData(entry._source['performance-data']['time256-states']),
795 'time256Lb': checkData(entry._source['performance-data']['time256-states-l']),
796 'time512Sb': checkData(entry._source['performance-data']['time512-states-s']),
797 'time512b': checkData(entry._source['performance-data']['time512-states']),
798 'time512Lb': checkData(entry._source['performance-data']['time512-states-l']),
799 'time1024Sb': checkData(entry._source['performance-data']['time1024-states-s']),
800 'time1024b': checkData(entry._source['performance-data']['time1024-states']),
801 'time1024Lb': checkData(entry._source['performance-data']['time1024-states-l']),
802 'time2048Sb': checkData(entry._source['performance-data']['time2048-states-s']),
803 'time2048b': checkData(entry._source['performance-data']['time2048-states']),
804 'time2048Lb': checkData(entry._source['performance-data']['time2048-states-l']),
805 'time4096Sb': checkData(entry._source['performance-data']['time4096-states-s']),
806 'time4096b': checkData(entry._source['performance-data']['time4096-states']),
807 'time4096Lb': checkData(entry._source['performance-data']['time4096-states-l']),
808 'time8192Sb': checkData(entry._source['performance-data']['time8192-states-s']),
809 'time8192b': checkData(entry._source['performance-data']['time8192-states']),
810 'time8192Lb': checkData(entry._source['performance-data']['time8192-states-l']),
811 'radiosignal': entry._source['radio-signal-id']
818 $scope.modulation = list;
819 $scope.gridOptionsModulation.totalItems = getMaxItems(dataA.data.hits.total, dataB.data.hits.total);
826 var lookupMap = new Map();
828 dataA.data.hits.hits.map(function (entry, index) {
829 var timeStamp = formatTimeStamp(entry._source['time-stamp']);
830 lookupMap.set(timeStamp, index);
832 'timestamp': $mwtnPerformanceLink.formatTimeStamp(timeStamp),
833 id: entry._source['uuid-interface'],
834 layerProtocol: entry._source['layer-protocol-name'],
835 suspectInterval: entry._source['suspect-interval-flag'],
836 scannerId: entry._source['scanner-id'],
837 rfTempMina: entry._source['performance-data']['rf-temp-min'],
838 rfTempAvga: entry._source['performance-data']['rf-temp-avg'],
839 rfTempMaxa: entry._source['performance-data']['rf-temp-max'],
840 'radiosignal': entry._source['radio-signal-id']
846 dataB.data.hits.hits.map(function (entry) {
847 var timeStamp = formatTimeStamp(entry._source['time-stamp']);
848 var index = lookupMap.get(timeStamp);
849 if (index !== undefined) {
850 list[index].rfTempMinb = entry._source['performance-data']['rf-temp-min'];
851 list[index].rfTempMaxb = entry._source['performance-data']['rf-temp-max'];
852 list[index].rfTempAvgb = entry._source['performance-data']['rf-temp-avg'];
854 if (list[0].timestamp === $mwtnPerformanceLink.formatTimeStamp(timeStamp)) {
855 list[0].rfTempMinb = entry._source['performance-data']['rf-temp-min'];
856 list[0].rfTempMaxb = entry._source['performance-data']['rf-temp-max'];
857 list[0].rfTempAvgb = entry._source['performance-data']['rf-temp-avg'];
860 'timestamp': $mwtnPerformanceLink.formatTimeStamp(timeStamp),
861 id: entry._source['uuid-interface'],
862 layerProtocol: entry._source['layer-protocol-name'],
863 suspectInterval: entry._source['suspect-interval-flag'],
864 scannerId: entry._source['scanner-id'],
865 rfTempMinb: entry._source['performance-data']['rf-temp-min'],
866 rfTempAvgb: entry._source['performance-data']['rf-temp-avg'],
867 rfTempMaxb: entry._source['performance-data']['rf-temp-max'],
868 'radiosignal': entry._source['radio-signal-id']
874 $scope.temperature = list;
875 $scope.gridOptionsTemperature.totalItems = getMaxItems(dataA.data.hits.total, dataB.data.hits.total);
882 var lookupMap = new Map();
884 dataA.data.hits.hits.map(function (entry, index) {
885 var timeStamp = formatTimeStamp(entry._source['time-stamp']);
886 lookupMap.set(timeStamp, index);
888 'timestamp': $mwtnPerformanceLink.formatTimeStamp(timeStamp),
889 id: entry._source['uuid-interface'],
890 layerProtocol: entry._source['layer-protocol-name'],
891 suspectInterval: entry._source['suspect-interval-flag'],
892 scannerId: entry._source['scanner-id'],
893 snirMina: entry._source['performance-data']['snir-min'],
894 snirAvga: entry._source['performance-data']['snir-avg'],
895 snirMaxa: entry._source['performance-data']['snir-max'],
896 'radiosignal': entry._source['radio-signal-id']
902 dataB.data.hits.hits.map(function (entry) {
903 var timeStamp = formatTimeStamp(entry._source['time-stamp']);
904 var index = lookupMap.get(timeStamp);
905 if (index !== undefined) {
906 list[index].snirMinb = entry._source['performance-data']['snir-min'];
907 list[index].snirMaxb = entry._source['performance-data']['snir-max'];
908 list[index].snirAvgb = entry._source['performance-data']['snir-max'];
911 if (list[0].timestamp === $mwtnPerformanceLink.formatTimeStamp(timeStamp)) {
912 list[0].snirMinb = entry._source['performance-data']['snir-min'];
913 list[0].snirMaxb = entry._source['performance-data']['snir-max'];
914 list[0].snirAvgb = entry._source['performance-data']['snir-max'];
917 'timestamp': $mwtnPerformanceLink.formatTimeStamp(timeStamp),
918 id: entry._source['uuid-interface'],
919 layerProtocol: entry._source['layer-protocol-name'],
920 suspectInterval: entry._source['suspect-interval-flag'],
921 scannerId: entry._source['scanner-id'],
922 snirMinb: entry._source['performance-data']['snir-min'],
923 snirAvgb: entry._source['performance-data']['snir-avg'],
924 snirMaxb: entry._source['performance-data']['snir-max'],
925 'radiosignal': entry._source['radio-signal-id']
931 $scope.gridOptionsSnir.totalItems = getMaxItems(dataA.data.hits.total, dataB.data.hits.total);
935 case "crossPolarDiscrimination":
938 var lookupMap = new Map();
940 dataA.data.hits.hits.map(function (entry, index) {
941 var timeStamp = formatTimeStamp(entry._source['time-stamp']);
942 lookupMap.set(timeStamp, index);
944 'timestamp': $mwtnPerformanceLink.formatTimeStamp(timeStamp),
945 id: entry._source['uuid-interface'],
946 layerProtocol: entry._source['layer-protocol-name'],
947 suspectInterval: entry._source['suspect-interval-flag'],
948 scannerId: entry._source['scanner-id'],
949 xpdMina: entry._source['performance-data']['xpd-min'],
950 xpdAvga: entry._source['performance-data']['xpd-avg'],
951 xpdMaxa: entry._source['performance-data']['xpd-max'],
952 'radiosignal': entry._source['radio-signal-id']
960 dataB.data.hits.hits.map(function (entry) {
961 var timeStamp = formatTimeStamp(entry._source['time-stamp']);
962 var index = lookupMap.get(timeStamp);
963 if (index !== undefined) {
964 list[index].xpdMinb = entry._source['performance-data']['xpd-min'];
965 list[index].xpdMaxb = entry._source['performance-data']['xpd-max'];
966 list[index].xpdAvgb = entry._source['performance-data']['xpd-avg'];
969 if (list[0].timestamp === $mwtnPerformanceLink.formatTimeStamp(timeStamp)) {
971 list[0].xpdMinb = entry._source['performance-data']['xpd-min'];
972 list[0].xpdMaxb = entry._source['performance-data']['xpd-max'];
973 list[0].xpdAvgb = entry._source['performance-data']['xpd-avg'];
977 'timestamp': $mwtnPerformanceLink.formatTimeStamp(timeStamp),
978 id: entry._source['uuid-interface'],
979 layerProtocol: entry._source['layer-protocol-name'],
980 suspectInterval: entry._source['suspect-interval-flag'],
981 scannerId: entry._source['scanner-id'],
982 xpdMinb: entry._source['performance-data']['xpd-min'],
983 xpdAvgb: entry._source['performance-data']['xpd-avg'],
984 xpdMaxb: entry._source['performance-data']['xpd-max'],
985 'radiosignal': entry._source['radio-signal-id']
993 $scope.crossPolarDiscrimination = list;
994 $scope.gridOptionsCrossPolarDiscrimination.totalItems = getMaxItems(dataA.data.hits.total, dataB.data.hits.total);
1001 var getMaxItems = function (a, b) {
1002 if ($scope.networkElementA === $scope.networkElementB && $scope.selectedLtpIdA === $scope.selectedLtpIdB) {
1003 //assume same network element and intefaces selected, return only 1 length
1010 //get data for pm link interafces / ne's from db
1011 var getDataFromNEs = function (networkElementA, selectedLtpIdA, networkElementB, selectedLtpIdB, grid) {
1015 switch (grid) { //get pagesize / nr according to current grid (else everything gets messy => wana get next page in grid a, get next page for grid b too)
1016 case 'receiveLevel':
1017 pagesize = $scope.gridOptionsReceiveLevel.paginationPageSize;
1018 pagenr = $scope.gridOptionsReceiveLevel.paginationCurrentPage;
1021 case 'transmissionLevel':
1022 pagesize = $scope.gridOptionsTransmissionLevel.paginationPageSize;
1023 pagenr = $scope.gridOptionsTransmissionLevel.paginationCurrentPage;
1027 pagesize = $scope.gridOptionsModulation.paginationPageSize;
1028 pagenr = $scope.gridOptionsModulation.paginationCurrentPage;
1032 pagesize = $scope.gridOptionsTemperature.paginationPageSize;
1033 pagenr = $scope.gridOptionsTemperature.paginationCurrentPage;
1037 pagesize = $scope.gridOptionsSnir.paginationPageSize;
1038 pagenr = $scope.gridOptionsSnir.paginationCurrentPage;
1041 case 'crossPolarDiscrimination':
1042 pagesize = $scope.gridOptionsCrossPolarDiscrimination.paginationPageSize;
1043 pagenr = $scope.gridOptionsCrossPolarDiscrimination.paginationCurrentPage;
1050 getData((pagenr - 1) * pagesize, pagesize, networkElementA, selectedLtpIdA).then(function (response) {
1052 getData((pagenr - 1) * pagesize, pagesize, networkElementB, selectedLtpIdB).then(function (response) {
1054 drawLineChart(dataA, dataB, grid);
1055 processResponseForGrid(dataA, dataB, grid);
1060 //override points on graphs
1061 var overridePoints = function (series, overrideArray) {
1064 let patternArray = ['rect', 'triangle', 'point', 'rectRot'];
1065 let patternCounter = 0;
1068 for (let i = 0; i < series.length; i++) {
1070 overrideArray[i].pointStyle = patternArray[patternCounter];
1073 if (patternCounter === 4) patternCounter = 0;
1074 overrideArray[i].pointRadius = 10;
1079 var drawLineChart = function (dataA, dataB, grid) {
1081 //create a sorted lookup array
1083 var tempSet = new Set(); //remove duplicate timestamps
1085 dataA.data.hits.hits.map(function (item) {
1086 tempSet.add($mwtnPerformanceLink.formatTimeStamp(item._source['time-stamp']));
1089 dataB.data.hits.hits.map(function (item) {
1090 tempSet.add($mwtnPerformanceLink.formatTimeStamp(item._source['time-stamp']));
1093 // console.log(tempSet);
1094 var tempArr = Array.from(tempSet); //create an array from unique timestamps
1096 tempArr.sort(function (a, b) { //sort it
1097 if (a > b) { return 1; }
1098 else if (a < b) { return -1; }
1104 //process data according to grid
1106 case 'receiveLevel': {
1108 //chart specific data
1109 $scope.receiveData = [];
1110 $scope.receiveSeries = [];
1111 $scope.receiveLabels = [];
1112 $scope.receiveDatasetOverride = [];
1114 $scope.receiveOptions = {
1119 afterTickToLabelConversion: function (data) { //adds our custom timestamp labels
1121 var xLabels = data.ticks;
1122 xLabels.forEach(function (labels, i) {
1123 var timestamp = $scope.toolTipMap.get(parseInt(labels));
1124 if (parseInt(labels) == labels)
1125 xLabels[i] = timestamp;
1130 //calculate last timestamp if label is missing
1131 if (xLabels[xLabels.length - 1] === undefined) {
1132 var timestamp = $scope.toolTipMap.get($scope.toolTipMap.size - 1);
1135 let labelLength = xLabels.length - 1;
1137 if (labelLength % 10 == 0) {
1145 xLabels[xLabels.length - 1] = calculateMissingTimestamp(timestamp, counter);
1165 title: function (tooltipItem, data) { //picks right tool tip
1166 var vaue = $scope.toolTipMap.get(tooltipItem[0].xLabel); //changes int label to timestamp
1177 $scope.testMap = new Map();
1178 $scope.toolTipMap = new Map();
1180 tempArr.map(function (item, index) {
1181 $scope.testMap.set(item, index);
1182 $scope.toolTipMap.set(index, item);
1192 dataA.data.hits.hits.map(function (item, index) {
1193 var timestamp = $mwtnPerformanceLink.formatTimeStamp(item._source['time-stamp']);
1195 var test = $scope.testMap.get(timestamp);
1197 maxListA.push({ x: test, y: item._source['performance-data']['rx-level-max'] });
1198 minListA.push({ x: test, y: item._source['performance-data']['rx-level-min'] });
1199 avgListA.push({ x: test, y: item._source['performance-data']['rx-level-avg'] });
1201 maxListA.push({ x: 0, y: item._source['performance-data']['rx-level-max'] }); //for some odd reason first is not found, although available within map
1202 minListA.push({ x: 0, y: item._source['performance-data']['rx-level-min'] });
1203 avgListA.push({ x: 0, y: item._source['performance-data']['rx-level-avg'] });
1207 //add series names and data
1208 $scope.receiveSeries.push('Rx max A', 'Rx min A', 'Rx avg A');
1211 $scope.receiveData.push(maxListA);
1212 $scope.receiveData.push(minListA);
1213 $scope.receiveData.push(avgListA);
1215 //add y axis override
1216 $scope.receiveDatasetOverride.push({ yAxisID: 'y-axis-1' });
1217 $scope.receiveDatasetOverride.push({ yAxisID: 'y-axis-1' });
1218 $scope.receiveDatasetOverride.push({ yAxisID: 'y-axis-1' });
1227 dataB.data.hits.hits.map(function (item, index) {
1228 var timestamp = $mwtnPerformanceLink.formatTimeStamp(item._source['time-stamp']);
1230 var test = $scope.testMap.get(timestamp);
1232 maxListB.push({ x: test, y: item._source['performance-data']['rx-level-max'] });
1233 minListB.push({ x: test, y: item._source['performance-data']['rx-level-min'] });
1234 avgListB.push({ x: test, y: item._source['performance-data']['rx-level-avg'] });
1236 maxListB.push({ x: 0, y: item._source['performance-data']['rx-level-max'] });
1237 minListB.push({ x: 0, y: item._source['performance-data']['rx-level-min'] });
1238 avgListB.push({ x: 0, y: item._source['performance-data']['rx-level-avg'] });
1239 console.log("timestamp" + timestamp + "at first position in map" + $scope.testMap.get(timestamp) + "wasnt found.");
1243 //add series names and data
1244 $scope.receiveSeries.push('Rx max B', 'Rx min B', 'Rx avg B');
1246 $scope.receiveData.push(maxListB);
1247 $scope.receiveData.push(minListB);
1248 $scope.receiveData.push(avgListB);
1250 //add y axis override id
1251 $scope.receiveDatasetOverride.push({ yAxisID: 'y-axis-1' });
1252 $scope.receiveDatasetOverride.push({ yAxisID: 'y-axis-1' });
1253 $scope.receiveDatasetOverride.push({ yAxisID: 'y-axis-1' });
1255 overridePoints($scope.receiveSeries, $scope.receiveDatasetOverride);
1262 case 'transmissionLevel': {
1264 $scope.transmissionData = [];
1265 $scope.transmissionSeries = [];
1266 $scope.transmissionDatasetOverride = [];
1268 $scope.transmissionOptions = {
1273 afterTickToLabelConversion: function (data) { //adds our custom timestamp labels
1275 var xLabels = data.ticks;
1276 xLabels.forEach(function (labels, i) {
1277 var timestamp = $scope.transmissiontoolTipMap.get(parseInt(labels));
1278 if (parseInt(labels) == labels)
1279 xLabels[i] = timestamp;
1285 //calculate last timestamp if label is missing
1286 if (xLabels[xLabels.length - 1] === undefined) {
1287 let timestamp = $scope.transmissiontoolTipMap.get($scope.transmissiontoolTipMap.size - 1);
1290 let labelLength = xLabels.length - 1;
1292 if (labelLength % 10 == 0) {
1300 xLabels[xLabels.length - 1] = calculateMissingTimestamp(timestamp, counter);
1317 title: function (tooltipItem, data) { //picks right tool tip
1318 var vaue = $scope.transmissiontoolTipMap.get(tooltipItem[0].xLabel);
1330 $scope.transmissiontestMap = new Map();
1331 $scope.transmissiontoolTipMap = new Map();
1333 tempArr.map(function (item, index) {
1334 $scope.transmissiontestMap.set(item, index);
1335 $scope.transmissiontoolTipMap.set(index, item);
1342 dataA.data.hits.hits.map(function (item, index) {
1343 var timestamp = $mwtnPerformanceLink.formatTimeStamp(item._source['time-stamp']);
1345 var test = $scope.transmissiontestMap.get(timestamp);
1347 maxListA.push({ x: test, y: item._source['performance-data']['tx-level-max'] });
1348 minListA.push({ x: test, y: item._source['performance-data']['tx-level-min'] });
1349 avgListA.push({ x: test, y: item._source['performance-data']['tx-level-avg'] });
1352 maxListA.push({ x: 0, y: item._source['performance-data']['tx-level-max'] });
1353 minListA.push({ x: 0, y: item._source['performance-data']['tx-level-min'] });
1354 avgListA.push({ x: 0, y: item._source['performance-data']['tx-level-avg'] });
1358 $scope.transmissionSeries.push('Tx max A', 'Tx min A', 'Tx avg A');
1361 $scope.transmissionData.push(maxListA);
1362 $scope.transmissionData.push(minListA);
1363 $scope.transmissionData.push(avgListA);
1365 $scope.transmissionDatasetOverride.push({ yAxisID: 'y-axis-1' });
1366 $scope.transmissionDatasetOverride.push({ yAxisID: 'y-axis-1' });
1367 $scope.transmissionDatasetOverride.push({ yAxisID: 'y-axis-1' });
1373 dataB.data.hits.hits.map(function (item, index) {
1374 var timestamp = $mwtnPerformanceLink.formatTimeStamp(item._source['time-stamp']);
1375 var test = $scope.transmissiontestMap.get(timestamp);
1377 maxListB.push({ x: test, y: item._source['performance-data']['tx-level-max'] });
1378 minListB.push({ x: test, y: item._source['performance-data']['tx-level-min'] });
1379 avgListB.push({ x: test, y: item._source['performance-data']['tx-level-avg'] });
1382 maxListB.push({ x: 0, y: item._source['performance-data']['tx-level-max'] });
1383 minListB.push({ x: 0, y: item._source['performance-data']['tx-level-min'] });
1384 avgListB.push({ x: 0, y: item._source['performance-data']['tx-level-avg'] });
1388 $scope.transmissionSeries.push('Tx max B', 'Tx min B', 'Tx avg B');
1390 $scope.transmissionData.push(maxListB);
1391 $scope.transmissionData.push(minListB);
1392 $scope.transmissionData.push(avgListB);
1394 $scope.transmissionDatasetOverride.push({ yAxisID: 'y-axis-1' });
1395 $scope.transmissionDatasetOverride.push({ yAxisID: 'y-axis-1' });
1396 $scope.transmissionDatasetOverride.push({ yAxisID: 'y-axis-1' });
1398 overridePoints($scope.transmissionSeries, $scope.transmissionDatasetOverride);
1403 case 'modulation': {
1405 $scope.modulationData = [];
1406 $scope.modultaionSeries = [];
1407 $scope.modulationDatasetOverride = [];
1409 $scope.modulationOptions = {
1414 afterTickToLabelConversion: function (data) { //adds our custom timestamp labels
1416 var xLabels = data.ticks;
1417 xLabels.forEach(function (labels, i) {
1418 var timestamp = $scope.modLabelMap.get(parseInt(labels));
1419 if (parseInt(labels) == labels)
1420 xLabels[i] = timestamp;
1426 //calculate last timestamp if label is missing
1427 if (xLabels[xLabels.length - 1] === undefined) {
1428 var timestamp = $scope.modLabelMap.get($scope.modLabelMap.size - 1);
1431 let labelLength = xLabels.length - 1;
1433 if (labelLength % 10 == 0) {
1442 xLabels[xLabels.length - 1] = calculateMissingTimestamp(timestamp, counter);
1459 title: function (tooltipItem, data) { //picks right tool tip
1461 var vaue = $scope.modtestMap.get(tooltipItem[0].xLabel);
1473 $scope.modtestMap = new Map();
1474 $scope.modLabelMap = new Map();
1476 tempArr.map(function (item, index) {
1477 $scope.modtestMap.set(item, index);
1478 $scope.modLabelMap.set(index, item);
1518 dataA.data.hits.hits.map(function (item, index) {
1519 var timestamp = $mwtnPerformanceLink.formatTimeStamp(item._source['time-stamp']);
1521 var test = $scope.modtestMap.get(timestamp);
1524 //check if data is not undefined, if yes: add
1525 let t2s = checkData(item._source['performance-data']['time2-states-s']);
1526 if (t2s != undefined)
1527 time2S.push({ x: test, y: t2s });
1529 let t2 = checkData(item._source['performance-data']['time2-states']);
1530 if (t2 != undefined)
1531 time2.push({ x: test, y: t2 });
1533 let t2L = checkData(item._source['performance-data']['time2-states-l']);
1534 if (t2L != undefined)
1535 time2L.push({ x: test, y: t2L });
1537 let t4s = checkData(item._source['performance-data']['time4-states-s']);
1538 if (t4s != undefined)
1539 time4S.push({ x: test, y: t4s });
1541 let t4 = checkData(item._source['performance-data']['time4-states']);
1542 if (t4 != undefined)
1543 time4.push({ x: test, y: t4 });
1545 let t4L = checkData(item._source['performance-data']['time4-states-l']);
1546 if (t4L != undefined)
1547 time4L.push({ x: test, y: t4L });
1549 let t16s = checkData(item._source['performance-data']['time16-states-s']);
1550 if (t16s != undefined)
1551 time16S.push({ x: test, y: t16s });
1554 let t16 = checkData(item._source['performance-data']['time16-states']);
1555 if (t16 != undefined)
1556 time16.push({ x: test, y: t16 });
1559 let t16L = checkData(item._source['performance-data']['time16-states-l']);
1560 if (t16L != undefined)
1561 time16L.push({ x: test, y: t16L });
1563 let t32s = checkData(item._source['performance-data']['time32-states-s']);
1564 if (t32s != undefined)
1565 time32S.push({ x: test, y: t32s });
1567 let t32 = checkData(item._source['performance-data']['time32-states']);
1568 if (t32 != undefined)
1569 time32.push({ x: test, y: t32 });
1572 let t32L = checkData(item._source['performance-data']['time32-states-l']);
1573 if (t32L != undefined)
1574 time32L.push({ x: test, y: t32L });
1578 let t64s = checkData(item._source['performance-data']['time64-states-s']);
1579 if (t64s != undefined)
1580 time64S.push({ x: test, y: t64s });
1582 let t64 = checkData(item._source['performance-data']['time64-states']);
1583 if (t64 != undefined)
1584 time64.push({ x: test, y: t64 });
1586 let t64L = checkData(item._source['performance-data']['time64-states-l']);
1587 if (t64L != undefined)
1588 time64L.push({ x: test, y: t64L });
1591 let t128s = checkData(item._source['performance-data']['time128-states-s']);
1592 if (t128s != undefined)
1593 time128S.push({ x: test, y: t128s });
1595 let t128 = checkData(item._source['performance-data']['time128-states']);
1596 if (t128 != undefined)
1597 time128.push({ x: test, y: t128 });
1599 let t128L = checkData(item._source['performance-data']['time128-states-l']);
1600 if (t128L != undefined)
1601 time128L.push({ x: test, y: t128L });
1604 let t256s = checkData(item._source['performance-data']['time256-states-s']);
1605 if (t256s != undefined)
1606 time256S.push({ x: test, y: t256s });
1608 let t256 = checkData(item._source['performance-data']['time256-states']);
1609 if (t256 != undefined)
1610 time256.push({ x: test, y: t256 });
1612 let t256L = checkData(item._source['performance-data']['time256-states-l']);
1613 if (t256L != undefined)
1614 time256L.push({ x: test, y: t256L });
1616 let t512s = checkData(item._source['performance-data']['time512-states-s']);
1617 if (t512s != undefined)
1618 time512S.push({ x: test, y: t512s });
1620 let t512 = checkData(item._source['performance-data']['time512-states']);
1621 if (t512 != undefined)
1622 time512.push({ x: test, y: t512 });
1624 let t512L = checkData(item._source['performance-data']['time512-states-l']);
1625 if (t512L != undefined)
1626 time512L.push({ x: test, y: t512L });
1628 let t1024s = checkData(item._source['performance-data']['time1024-states-s']);
1629 if (t1024s != undefined)
1630 time1024S.push({ x: test, y: t1024s });
1632 let t1024 = checkData(item._source['performance-data']['time1024-states']);
1633 if (t1024 != undefined)
1634 time1024.push({ x: test, y: t1024 });
1636 let t1024L = checkData(item._source['performance-data']['time1024-states-l']);
1637 if (t1024L != undefined)
1638 time1024L.push({ x: test, y: t1024L });
1640 let t2048s = checkData(item._source['performance-data']['time2048-states-s']);
1641 if (t2048s != undefined)
1642 time2048S.push({ x: test, y: t2048s });
1644 let t2048 = checkData(item._source['performance-data']['time2048-states']);
1645 if (t2048 != undefined)
1646 time2048.push({ x: test, y: t2048 });
1648 let t2048L = checkData(item._source['performance-data']['time2048-states-l']);
1649 if (t2048L != undefined)
1650 time2048L.push({ x: test, y: t2048L });
1652 let t4096s = checkData(item._source['performance-data']['time4096-states-s']);
1653 if (t4096s != undefined)
1654 time4096S.push({ x: test, y: t4096s });
1656 let t4096 = checkData(item._source['performance-data']['time4096-states']);
1657 if (t4096 != undefined)
1658 time4096.push({ x: test, y: t4096 });
1660 let t4096L = checkData(item._source['performance-data']['time4096-states-l']);
1661 if (t4096L != undefined)
1662 time4096L.push({ x: test, y: t4096L });
1664 let t8192s = checkData(item._source['performance-data']['time8192-states-s']);
1665 if (t8192s != undefined)
1666 time8192S.push({ x: test, y: t8192s });
1668 let t8192 = checkData(item._source['performance-data']['time8192-states']);
1669 if (t8192 != undefined)
1670 time8192.push({ x: test, y: t8192 });
1672 let t8192L = checkData(item._source['performance-data']['time8192-states-l']);
1673 if (t8192L != undefined)
1674 time8192L.push({ x: test, y: t8192L });
1678 let t2s = checkData(item._source['performance-data']['time2-states-s']);
1679 if (t2s != undefined)
1680 time2S.push({ x: 0, y: t2s });
1682 let t2 = checkData(item._source['performance-data']['time2-states']);
1683 if (t2 != undefined)
1684 time2.push({ x: 0, y: t2 });
1686 let t2L = checkData(item._source['performance-data']['time2-states-l']);
1687 if (t2L != undefined)
1688 time2L.push({ x: 0, y: t2L });
1690 let t4s = checkData(item._source['performance-data']['time4-states-s']);
1691 if (t4s != undefined)
1692 time4S.push({ x: 0, y: t4s });
1694 let t4 = checkData(item._source['performance-data']['time4-states']);
1695 if (t4 != undefined)
1696 time4.push({ x: 0, y: t4 });
1698 let t4L = checkData(item._source['performance-data']['time4-states-l']);
1699 if (t4L != undefined)
1700 time4L.push({ x: 0, y: t4L });
1702 let t16s = checkData(item._source['performance-data']['time16-states-s']);
1703 if (t16s != undefined)
1704 time16S.push({ x: 0, y: t16s });
1707 let t16 = checkData(item._source['performance-data']['time16-states']);
1708 if (t16 != undefined)
1709 time16.push({ x: 0, y: t16 });
1712 let t16L = checkData(item._source['performance-data']['time16-states-l']);
1713 if (t16L != undefined)
1714 time16L.push({ x: 0, y: t16L });
1716 let t32s = checkData(item._source['performance-data']['time32-states-s']);
1717 if (t32s != undefined)
1718 time32S.push({ x: 0, y: t32s });
1720 let t32 = checkData(item._source['performance-data']['time32-states']);
1721 if (t32 != undefined)
1722 time32.push({ x: 0, y: t32 });
1725 let t32L = checkData(item._source['performance-data']['time32-states-l']);
1726 if (t32L != undefined)
1727 time32L.push({ x: 0, y: t32L });
1729 let t64s = checkData(item._source['performance-data']['time64-states-s']);
1730 if (t64s != undefined)
1731 time64S.push({ x: 0, y: t64s });
1733 let t64 = checkData(item._source['performance-data']['time64-states']);
1734 if (t64 != undefined)
1735 time64.push({ x: 0, y: t64 });
1737 let t64L = checkData(item._source['performance-data']['time64-states-l']);
1738 if (t64L != undefined)
1739 time64L.push({ x: 0, y: t64L });
1742 let t128s = checkData(item._source['performance-data']['time128-states-s']);
1743 if (t128s != undefined)
1744 time128S.push({ x: 0, y: t128s });
1746 let t128 = checkData(item._source['performance-data']['time128-states']);
1747 if (t128 != undefined)
1748 time128.push({ x: 0, y: t128 });
1750 let t128L = checkData(item._source['performance-data']['time128-states-l']);
1751 if (t128L != undefined)
1752 time128L.push({ x: 0, y: t128L });
1755 let t256s = checkData(item._source['performance-data']['time256-states-s']);
1756 if (t256s != undefined)
1757 time256S.push({ x: 0, y: t256s });
1759 let t256 = checkData(item._source['performance-data']['time256-states']);
1760 if (t256 != undefined)
1761 time256.push({ x: 0, y: t256 });
1763 let t256L = checkData(item._source['performance-data']['time256-states-l']);
1764 if (t256L != undefined)
1765 time256L.push({ x: 0, y: t256L });
1767 let t512s = checkData(item._source['performance-data']['time512-states-s']);
1768 if (t512s != undefined)
1769 time512S.push({ x: 0, y: t512s });
1771 let t512 = checkData(item._source['performance-data']['time512-states']);
1772 if (t512 != undefined)
1773 time512.push({ x: 0, y: t512 });
1775 let t512L = checkData(item._source['performance-data']['time512-states-l']);
1776 if (t512L != undefined)
1777 time512L.push({ x: 0, y: t512L });
1779 let t1024s = checkData(item._source['performance-data']['time1024-states-s']);
1780 if (t1024s != undefined)
1781 time1024S.push({ x: 0, y: t1024s });
1783 let t1024 = checkData(item._source['performance-data']['time1024-states']);
1784 if (t1024 != undefined)
1785 time1024.push({ x: 0, y: t1024 });
1787 let t1024L = checkData(item._source['performance-data']['time1024-states-l']);
1788 if (t1024L != undefined)
1789 time1024L.push({ x: 0, y: t1024L });
1791 let t2048s = checkData(item._source['performance-data']['time2048-states-s']);
1792 if (t2048s != undefined)
1793 time2048S.push({ x: 0, y: t2048s });
1795 let t2048 = checkData(item._source['performance-data']['time2048-states']);
1796 if (t2048 != undefined)
1797 time2048.push({ x: 0, y: t2048 });
1799 let t2048L = checkData(item._source['performance-data']['time2048-states-l']);
1800 if (t2048L != undefined)
1801 time2048L.push({ x: 0, y: t2048L });
1803 let t4096s = checkData(item._source['performance-data']['time4096-states-s']);
1804 if (t4096s != undefined)
1805 time4096S.push({ x: 0, y: t4096s });
1807 let t4096 = checkData(item._source['performance-data']['time4096-states']);
1808 if (t4096 != undefined)
1809 time4096.push({ x: 0, y: t4096 });
1811 let t4096L = checkData(item._source['performance-data']['time4096-states-l']);
1812 if (t4096L != undefined)
1813 time4096L.push({ x: 0, y: t4096L });
1815 let t8192s = checkData(item._source['performance-data']['time8192-states-s']);
1816 if (t8192s != undefined)
1817 time8192S.push({ x: 0, y: t8192s });
1819 let t8192 = checkData(item._source['performance-data']['time8192-states']);
1820 if (t8192 != undefined)
1821 time8192.push({ x: 0, y: t8192 });
1823 let t8192L = checkData(item._source['performance-data']['time8192-states-l']);
1824 if (t8192L != undefined)
1825 time8192L.push({ x: 0, y: t8192L });
1830 //check, if array has items, if yes: add series and data to chart
1831 //reduces amount of labels shown in chart => shows only series' with data
1832 if (time2S.length > 0) {
1833 $scope.modultaionSeries.push('QAM2S A');
1834 $scope.modulationData.push(time2S);
1837 if (time2.length > 0) {
1838 $scope.modultaionSeries.push('QAM2 A');
1839 $scope.modulationData.push(time2);
1842 if (time2L.length > 0) {
1843 $scope.modultaionSeries.push('QAM2L A');
1844 $scope.modulationData.push(time2L);
1847 if (time4S.length > 0) {
1848 $scope.modultaionSeries.push('QAM4S A');
1849 $scope.modulationData.push(time4S);
1852 if (time4.length > 0) {
1853 $scope.modultaionSeries.push('QAM4 A');
1854 $scope.modulationData.push(time4);
1857 if (time4L.length > 0) {
1858 $scope.modultaionSeries.push('QAM4L A');
1859 $scope.modulationData.push(time4L);
1862 if (time16S.length > 0) {
1863 $scope.modultaionSeries.push('QAM16S A');
1864 $scope.modulationData.push(time16S);
1868 if (time16.length > 0) {
1869 $scope.modultaionSeries.push('QAM16 A');
1870 $scope.modulationData.push(time16);
1873 if (time16L.length > 0) {
1874 $scope.modultaionSeries.push('QAM16L A');
1875 $scope.modulationData.push(time16L);
1878 if (time32S.length > 0) {
1879 $scope.modulationData.push(time32S);
1880 $scope.modultaionSeries.push('QAM32S A');
1883 if (time32.length > 0) {
1884 $scope.modulationData.push(time32);
1885 $scope.modultaionSeries.push('QAM32 A');
1888 if (time32L.length > 0) {
1889 $scope.modulationData.push(time32L);
1890 $scope.modultaionSeries.push('QAM32L A');
1894 if (time64S.length > 0) {
1895 $scope.modulationData.push(time64S);
1896 $scope.modultaionSeries.push('QAM64S A');
1900 if (time64.length > 0) {
1901 $scope.modulationData.push(time64);
1902 $scope.modultaionSeries.push('QAM64 A');
1905 if (time64L.length > 0) {
1906 $scope.modulationData.push(time64L);
1907 $scope.modultaionSeries.push('QAM64L A');
1911 if (time128S.length > 0) {
1912 $scope.modultaionSeries.push('QAM128S A');
1913 $scope.modulationData.push(time128S);
1916 if (time128.length > 0) {
1917 $scope.modultaionSeries.push('QAM128 A');
1918 $scope.modulationData.push(time128);
1921 if (time128L.length > 0) {
1922 $scope.modultaionSeries.push('QAM128L A');
1923 $scope.modulationData.push(time128L);
1926 if (time256S.length > 0) {
1927 $scope.modulationData.push(time256S);
1928 $scope.modultaionSeries.push('QAM256S A');
1931 if (time256.length > 0) {
1932 $scope.modulationData.push(time256);
1933 $scope.modultaionSeries.push('QAM256 A');
1936 if (time256L.length > 0) {
1937 $scope.modulationData.push(time256L);
1938 $scope.modultaionSeries.push('QAM256L A');
1941 if (time512S.length > 0) {
1942 $scope.modultaionSeries.push('QAM512S A');
1943 $scope.modulationData.push(time512S);
1946 if (time512.length > 0) {
1947 $scope.modultaionSeries.push('QAM512 A');
1948 $scope.modulationData.push(time512);
1951 if (time512S.length > 0) {
1952 $scope.modultaionSeries.push('QAM512S A');
1953 $scope.modulationData.push(time512S);
1956 if (time512.length > 0) {
1957 $scope.modultaionSeries.push('QAM512 A');
1958 $scope.modulationData.push(time512);
1961 if (time512L.length > 0) {
1962 $scope.modultaionSeries.push('QAM512L A');
1963 $scope.modulationData.push(time512L);
1967 if (time1024S.length > 0) {
1968 $scope.modultaionSeries.push('QAM1024S A');
1969 $scope.modulationData.push(time1024S);
1972 if (time1024.length > 0) {
1973 $scope.modultaionSeries.push('QAM1024 A');
1974 $scope.modulationData.push(time1024);
1978 if (time1024L.length > 0) {
1979 $scope.modultaionSeries.push('QAM1024L A');
1980 $scope.modulationData.push(time1024L);
1984 if (time2048S.length > 0) {
1985 $scope.modultaionSeries.push('QAM2048S A');
1986 $scope.modulationData.push(time2048S);
1989 if (time2048.length > 0) {
1990 $scope.modultaionSeries.push('QAM2048 A');
1991 $scope.modulationData.push(time2048);
1994 if (time2048L.length > 0) {
1995 $scope.modultaionSeries.push('QAM2048L A');
1996 $scope.modulationData.push(time2048L);
2000 if (time4096S.length > 0) {
2001 $scope.modultaionSeries.push('QAM4096S A');
2002 $scope.modulationData.push(time4096S);
2005 if (time4096.length > 0) {
2006 $scope.modultaionSeries.push('QAM4096 A');
2007 $scope.modulationData.push(time4096);
2011 if (time4096L.length > 0) {
2012 $scope.modultaionSeries.push('QAM4096L A');
2013 $scope.modulationData.push(time4096L);
2016 if (time8192S.length > 0) {
2017 $scope.modultaionSeries.push('QAM8192S A');
2018 $scope.modulationData.push(time8192S);
2022 if (time8192.length > 0) {
2023 $scope.modultaionSeries.push('QAM8192 A');
2024 $scope.modulationData.push(time8192);
2027 if (time8192L.length > 0) {
2028 $scope.modultaionSeries.push('QAM8192L A');
2029 $scope.modulationData.push(time8192L);
2032 //process data for b side
2071 dataB.data.hits.hits.map(function (item, index) {
2072 var timestamp = $mwtnPerformanceLink.formatTimeStamp(item._source['time-stamp']);
2073 var test = $scope.modtestMap.get(timestamp);
2075 let t2s = checkData(item._source['performance-data']['time2-states-s']);
2076 if (t2s != undefined)
2077 time2S.push({ x: test, y: t2s });
2079 let t2 = checkData(item._source['performance-data']['time2-states']);
2080 if (t2 != undefined)
2081 time2.push({ x: test, y: t2 });
2083 let t2L = checkData(item._source['performance-data']['time2-states-l']);
2084 if (t2L != undefined)
2085 time2L.push({ x: test, y: t2L });
2087 let t4s = checkData(item._source['performance-data']['time4-states-s']);
2088 if (t4s != undefined)
2089 time4S.push({ x: test, y: t4s });
2091 let t4 = checkData(item._source['performance-data']['time4-states']);
2092 if (t4 != undefined)
2093 time4.push({ x: test, y: t4 });
2095 let t4L = checkData(item._source['performance-data']['time4-states-l']);
2096 if (t4L != undefined)
2097 time4L.push({ x: test, y: t4L });
2099 let t16s = checkData(item._source['performance-data']['time16-states-s']);
2100 if (t16s != undefined)
2101 time16S.push({ x: test, y: t16s });
2104 let t16 = checkData(item._source['performance-data']['time16-states']);
2105 if (t16 != undefined)
2106 time16.push({ x: test, y: t16 });
2109 let t16L = checkData(item._source['performance-data']['time16-states-l']);
2110 if (t16L != undefined)
2111 time16L.push({ x: test, y: t16L });
2113 let t32s = checkData(item._source['performance-data']['time32-states-s']);
2114 if (t32s != undefined)
2115 time32S.push({ x: test, y: t32s });
2117 let t32 = checkData(item._source['performance-data']['time32-states']);
2118 if (t32 != undefined)
2119 time32.push({ x: test, y: t32 });
2122 let t32L = checkData(item._source['performance-data']['time32-states-l']);
2123 if (t32L != undefined)
2124 time32L.push({ x: test, y: t32L });
2128 let t64s = checkData(item._source['performance-data']['time64-states-s']);
2129 if (t64s != undefined)
2130 time64S.push({ x: test, y: t64s });
2132 let t64 = checkData(item._source['performance-data']['time64-states']);
2133 if (t64 != undefined)
2134 time64.push({ x: test, y: t64 });
2136 let t64L = checkData(item._source['performance-data']['time64-states-l']);
2137 if (t64L != undefined)
2138 time64L.push({ x: test, y: t64L });
2141 let t128s = checkData(item._source['performance-data']['time128-states-s']);
2142 if (t128s != undefined)
2143 time128S.push({ x: test, y: t128s });
2145 let t128 = checkData(item._source['performance-data']['time128-states']);
2146 if (t128 != undefined)
2147 time128.push({ x: test, y: t128 });
2149 let t128L = checkData(item._source['performance-data']['time128-states-l']);
2150 if (t128L != undefined)
2151 time128L.push({ x: test, y: t128L });
2154 let t256s = checkData(item._source['performance-data']['time256-states-s']);
2155 if (t256s != undefined)
2156 time256S.push({ x: test, y: t256s });
2158 let t256 = checkData(item._source['performance-data']['time256-states']);
2159 if (t256 != undefined)
2160 time256.push({ x: test, y: t256 });
2162 let t256L = checkData(item._source['performance-data']['time256-states-l']);
2163 if (t256L != undefined)
2164 time256L.push({ x: test, y: t256L });
2166 let t512s = checkData(item._source['performance-data']['time512-states-s']);
2167 if (t512s != undefined)
2168 time512S.push({ x: test, y: t512s });
2170 let t512 = checkData(item._source['performance-data']['time512-states']);
2171 if (t512 != undefined)
2172 time512.push({ x: test, y: t512 });
2174 let t512L = checkData(item._source['performance-data']['time512-states-l']);
2175 if (t512L != undefined)
2176 time512L.push({ x: test, y: t512L });
2178 let t1024s = checkData(item._source['performance-data']['time1024-states-s']);
2179 if (t1024s != undefined)
2180 time1024S.push({ x: test, y: t1024s });
2182 let t1024 = checkData(item._source['performance-data']['time1024-states']);
2183 if (t1024 != undefined)
2184 time1024.push({ x: test, y: t1024 });
2186 let t1024L = checkData(item._source['performance-data']['time1024-states-l']);
2187 if (t1024L != undefined)
2188 time1024L.push({ x: test, y: t1024L });
2190 let t2048s = checkData(item._source['performance-data']['time2048-states-s']);
2191 if (t2048s != undefined)
2192 time2048S.push({ x: test, y: t2048s });
2194 let t2048 = checkData(item._source['performance-data']['time2048-states']);
2195 if (t2048 != undefined)
2196 time2048.push({ x: test, y: t2048 });
2198 let t2048L = checkData(item._source['performance-data']['time2048-states-l']);
2199 if (t2048L != undefined)
2200 time2048L.push({ x: test, y: t2048L });
2202 let t4096s = checkData(item._source['performance-data']['time4096-states-s']);
2203 if (t4096s != undefined)
2204 time4096S.push({ x: test, y: t4096s });
2206 let t4096 = checkData(item._source['performance-data']['time4096-states']);
2207 if (t4096 != undefined)
2208 time4096.push({ x: test, y: t4096 });
2210 let t4096L = checkData(item._source['performance-data']['time4096-states-l']);
2211 if (t4096L != undefined)
2212 time4096L.push({ x: test, y: t4096L });
2214 let t8192s = checkData(item._source['performance-data']['time8192-states-s']);
2215 if (t8192s != undefined)
2216 time8192S.push({ x: test, y: t8192s });
2218 let t8192 = checkData(item._source['performance-data']['time8192-states']);
2219 if (t8192 != undefined)
2220 time8192.push({ x: test, y: t8192 });
2222 let t8192L = checkData(item._source['performance-data']['time8192-states-l']);
2223 if (t8192L != undefined)
2224 time8192L.push({ x: test, y: t8192L });
2228 let t2s = checkData(item._source['performance-data']['time2-states-s']);
2229 if (t2s != undefined)
2230 time2S.push({ x: 0, y: t2s });
2232 let t2 = checkData(item._source['performance-data']['time2-states']);
2233 if (t2 != undefined)
2234 time2.push({ x: 0, y: t2 });
2236 let t2L = checkData(item._source['performance-data']['time2-states-l']);
2237 if (t2L != undefined)
2238 time2L.push({ x: 0, y: t2L });
2240 let t4s = checkData(item._source['performance-data']['time4-states-s']);
2241 if (t4s != undefined)
2242 time4S.push({ x: 0, y: t4s });
2244 let t4 = checkData(item._source['performance-data']['time4-states']);
2245 if (t4 != undefined)
2246 time4.push({ x: 0, y: t4 });
2248 let t4L = checkData(item._source['performance-data']['time4-states-l']);
2249 if (t4L != undefined)
2250 time4L.push({ x: 0, y: t4L });
2252 let t16s = checkData(item._source['performance-data']['time16-states-s']);
2253 if (t16s != undefined)
2254 time16S.push({ x: 0, y: t16s });
2257 let t16 = checkData(item._source['performance-data']['time16-states']);
2258 if (t16 != undefined)
2259 time16.push({ x: 0, y: t16 });
2262 let t16L = checkData(item._source['performance-data']['time16-states-l']);
2263 if (t16L != undefined)
2264 time16L.push({ x: 0, y: t16L });
2266 let t32s = checkData(item._source['performance-data']['time32-states-s']);
2267 if (t32s != undefined)
2268 time32S.push({ x: 0, y: t32s });
2270 let t32 = checkData(item._source['performance-data']['time32-states']);
2271 if (t32 != undefined)
2272 time32.push({ x: 0, y: t32 });
2275 let t32L = checkData(item._source['performance-data']['time32-states-l']);
2276 if (t32L != undefined)
2277 time32L.push({ x: 0, y: t32L });
2279 let t64s = checkData(item._source['performance-data']['time64-states-s']);
2280 if (t64s != undefined)
2281 time64S.push({ x: 0, y: t64s });
2283 let t64 = checkData(item._source['performance-data']['time64-states']);
2284 if (t64 != undefined)
2285 time64.push({ x: 0, y: t64 });
2287 let t64L = checkData(item._source['performance-data']['time64-states-l']);
2288 if (t64L != undefined)
2289 time64L.push({ x: 0, y: t64L });
2292 let t128s = checkData(item._source['performance-data']['time128-states-s']);
2293 if (t128s != undefined)
2294 time128S.push({ x: 0, y: t128s });
2296 let t128 = checkData(item._source['performance-data']['time128-states']);
2297 if (t128 != undefined)
2298 time128.push({ x: 0, y: t128 });
2300 let t128L = checkData(item._source['performance-data']['time128-states-l']);
2301 if (t128L != undefined)
2302 time128L.push({ x: 0, y: t128L });
2305 let t256s = checkData(item._source['performance-data']['time256-states-s']);
2306 if (t256s != undefined)
2307 time256S.push({ x: 0, y: t256s });
2309 let t256 = checkData(item._source['performance-data']['time256-states']);
2310 if (t256 != undefined)
2311 time256.push({ x: 0, y: t256 });
2313 let t256L = checkData(item._source['performance-data']['time256-states-l']);
2314 if (t256L != undefined)
2315 time256L.push({ x: 0, y: t256L });
2317 let t512s = checkData(item._source['performance-data']['time512-states-s']);
2318 if (t512s != undefined)
2319 time512S.push({ x: 0, y: t512s });
2321 let t512 = checkData(item._source['performance-data']['time512-states']);
2322 if (t512 != undefined)
2323 time512.push({ x: 0, y: t512 });
2325 let t512L = checkData(item._source['performance-data']['time512-states-l']);
2326 if (t512L != undefined)
2327 time512L.push({ x: 0, y: t512L });
2329 let t1024s = checkData(item._source['performance-data']['time1024-states-s']);
2330 if (t1024s != undefined)
2331 time1024S.push({ x: 0, y: t1024s });
2333 let t1024 = checkData(item._source['performance-data']['time1024-states']);
2334 if (t1024 != undefined)
2335 time1024.push({ x: 0, y: t1024 });
2337 let t1024L = checkData(item._source['performance-data']['time1024-states-l']);
2338 if (t1024L != undefined)
2339 time1024L.push({ x: 0, y: t1024L });
2341 let t2048s = checkData(item._source['performance-data']['time2048-states-s']);
2342 if (t2048s != undefined)
2343 time2048S.push({ x: 0, y: t2048s });
2345 let t2048 = checkData(item._source['performance-data']['time2048-states']);
2346 if (t2048 != undefined)
2347 time2048.push({ x: 0, y: t2048 });
2349 let t2048L = checkData(item._source['performance-data']['time2048-states-l']);
2350 if (t2048L != undefined)
2351 time2048L.push({ x: 0, y: t2048L });
2353 let t4096s = checkData(item._source['performance-data']['time4096-states-s']);
2354 if (t4096s != undefined)
2355 time4096S.push({ x: 0, y: t4096s });
2357 let t4096 = checkData(item._source['performance-data']['time4096-states']);
2358 if (t4096 != undefined)
2359 time4096.push({ x: 0, y: t4096 });
2361 let t4096L = checkData(item._source['performance-data']['time4096-states-l']);
2362 if (t4096L != undefined)
2363 time4096L.push({ x: 0, y: t4096L });
2365 let t8192s = checkData(item._source['performance-data']['time8192-states-s']);
2366 if (t8192s != undefined)
2367 time8192S.push({ x: 0, y: t8192s });
2369 let t8192 = checkData(item._source['performance-data']['time8192-states']);
2370 if (t8192 != undefined)
2371 time8192.push({ x: 0, y: t8192 });
2373 let t8192L = checkData(item._source['performance-data']['time8192-states-l']);
2374 if (t8192L != undefined)
2375 time8192L.push({ x: 0, y: t8192L });
2380 if (time2S.length > 0) {
2381 $scope.modultaionSeries.push('QAM2S B');
2382 $scope.modulationData.push(time2S);
2385 if (time2.length > 0) {
2386 $scope.modultaionSeries.push('QAM2 B');
2387 $scope.modulationData.push(time2);
2390 if (time2L.length > 0) {
2391 $scope.modultaionSeries.push('QAM2L B');
2392 $scope.modulationData.push(time2L);
2395 if (time4S.length > 0) {
2396 $scope.modultaionSeries.push('QAM4S B');
2397 $scope.modulationData.push(time4S);
2400 if (time4.length > 0) {
2401 $scope.modultaionSeries.push('QAM4 B');
2402 $scope.modulationData.push(time4);
2405 if (time4L.length > 0) {
2406 $scope.modultaionSeries.push('QAM4L B');
2407 $scope.modulationData.push(time4L);
2410 if (time16S.length > 0) {
2411 $scope.modultaionSeries.push('QAM16S B');
2412 $scope.modulationData.push(time16S);
2416 if (time16.length > 0) {
2417 $scope.modultaionSeries.push('QAM16 B');
2418 $scope.modulationData.push(time16);
2422 if (time16L.length > 0) {
2423 $scope.modultaionSeries.push('QAM16L B');
2424 $scope.modulationData.push(time16L);
2427 if (time32S.length > 0) {
2428 $scope.modulationData.push(time32S);
2429 $scope.modultaionSeries.push('QAM32S B');
2432 if (time32.length > 0) {
2433 $scope.modulationData.push(time32);
2434 $scope.modultaionSeries.push('QAM32 B');
2437 if (time32L.length > 0) {
2438 $scope.modulationData.push(time32L);
2439 $scope.modultaionSeries.push('QAM32L B');
2443 if (time64S.length > 0) {
2444 $scope.modulationData.push(time64S);
2445 $scope.modultaionSeries.push('QAM64S B');
2449 if (time64.length > 0) {
2450 $scope.modulationData.push(time64);
2451 $scope.modultaionSeries.push('QAM64 B');
2454 if (time64L.length > 0) {
2455 $scope.modulationData.push(time64L);
2456 $scope.modultaionSeries.push('QAM64L B');
2460 if (time128S.length > 0) {
2461 $scope.modultaionSeries.push('QAM128S B');
2462 $scope.modulationData.push(time128S);
2465 if (time128.length > 0) {
2466 $scope.modultaionSeries.push('QAM128 B');
2467 $scope.modulationData.push(time128);
2470 if (time128L.length > 0) {
2471 $scope.modultaionSeries.push('QAM128L B');
2472 $scope.modulationData.push(time128L);
2475 if (time256S.length > 0) {
2476 $scope.modulationData.push(time256S);
2477 $scope.modultaionSeries.push('QAM256S B');
2480 if (time256.length > 0) {
2481 $scope.modulationData.push(time256);
2482 $scope.modultaionSeries.push('QAM256 B');
2485 if (time256L.length > 0) {
2486 $scope.modulationData.push(time256L);
2487 $scope.modultaionSeries.push('QAM256L B');
2490 if (time512S.length > 0) {
2491 $scope.modultaionSeries.push('QAM512S B');
2492 $scope.modulationData.push(time512S);
2496 if (time512.length > 0) {
2497 $scope.modultaionSeries.push('QAM512 B');
2498 $scope.modulationData.push(time512);
2502 if (time512S.length > 0) {
2503 $scope.modultaionSeries.push('QAM512S B');
2504 $scope.modulationData.push(time512S);
2507 if (time512.length > 0) {
2508 $scope.modultaionSeries.push('QAM512 B');
2509 $scope.modulationData.push(time512);
2512 if (time512L.length > 0) {
2513 $scope.modultaionSeries.push('QAM512L B');
2514 $scope.modulationData.push(time512L);
2517 if (time1024S.length > 0) {
2518 $scope.modultaionSeries.push('QAM1024S B');
2519 $scope.modulationData.push(time1024S);
2523 if (time1024.length > 0) {
2524 $scope.modultaionSeries.push('QAM1024 B');
2525 $scope.modulationData.push(time1024);
2529 if (time1024L.length > 0) {
2530 $scope.modultaionSeries.push('QAM1024L B');
2531 $scope.modulationData.push(time1024L);
2536 if (time2048S.length > 0) {
2537 $scope.modultaionSeries.push('QAM2048S B');
2538 $scope.modulationData.push(time2048S);
2542 if (time2048.length > 0) {
2543 $scope.modultaionSeries.push('QAM2048 B');
2544 $scope.modulationData.push(time2048);
2547 if (time2048L.length > 0) {
2548 $scope.modultaionSeries.push('QAM2048L B');
2549 $scope.modulationData.push(time2048L);
2552 if (time4096S.length > 0) {
2553 $scope.modultaionSeries.push('QAM4096S B');
2554 $scope.modulationData.push(time4096S);
2557 if (time4096.length > 0) {
2558 $scope.modultaionSeries.push('QAM4096 B');
2559 $scope.modulationData.push(time4096);
2563 if (time4096L.length > 0) {
2564 $scope.modultaionSeries.push('QAM4096L B');
2565 $scope.modulationData.push(time4096L);
2569 if (time8192S.length > 0) {
2570 $scope.modultaionSeries.push('QAM8192S B');
2571 $scope.modulationData.push(time8192S);
2576 if (time8192.length > 0) {
2577 $scope.modultaionSeries.push('QAM8192 B');
2578 $scope.modulationData.push(time8192);
2582 if (time8192L.length > 0) {
2583 $scope.modultaionSeries.push('QAM8192L B');
2584 $scope.modulationData.push(time8192L);
2588 let patternArray = ['rect', 'triangle', 'point', 'cross'];
2589 let patternCounter = 0;
2591 //add y axis override and remove color below graph for all items in chart series
2592 for (let i = 0; i < $scope.modultaionSeries.length; i++) {
2593 $scope.modulationDatasetOverride.push({ yAxisID: 'y-axis-1' });
2594 $scope.modulationDatasetOverride[i].fill = false;
2596 //override points in graph
2597 $scope.modulationDatasetOverride[i].pointStyle = patternArray[patternCounter];
2599 if (patternCounter === 4) patternCounter = 0;
2600 $scope.modulationDatasetOverride[i].pointRadius = 10;
2607 case 'temperature': {
2609 $scope.tempData = [];
2610 $scope.tempSeries = [];
2611 $scope.tempDatasetOverride = [];
2613 $scope.tempOptions = {
2618 afterTickToLabelConversion: function (data) { //adds our custom timestamp labels
2620 var xLabels = data.ticks;
2621 xLabels.forEach(function (labels, i) {
2622 var timestamp = $scope.tempLabelMap.get(parseInt(labels));
2623 if (parseInt(labels) == labels)
2624 xLabels[i] = timestamp;
2629 //calculate last timestamp if label is missing
2630 if (xLabels[xLabels.length - 1] === undefined) {
2631 var timestamp = $scope.tempLabelMap.get($scope.tempLabelMap.size - 1);
2634 let labelLength = xLabels.length - 1;
2636 if (labelLength % 10 == 0) {
2644 xLabels[xLabels.length - 1] = calculateMissingTimestamp(timestamp, counter);
2661 title: function (tooltipItem, data) { //picks right tool tip
2663 var vaue = $scope.tempLabelMap.get(tooltipItem[0].xLabel);
2674 $scope.temptestMap = new Map();
2675 $scope.tempLabelMap = new Map();
2678 tempArr.map(function (item, index) {
2679 $scope.temptestMap.set(item, index);
2680 $scope.tempLabelMap.set(index, item);
2683 //process data for a side
2688 dataA.data.hits.hits.map(function (item, index) {
2689 var timestamp = $mwtnPerformanceLink.formatTimeStamp(item._source['time-stamp']);
2691 var test = $scope.temptestMap.get(timestamp);
2693 maxListA.push({ x: test, y: item._source['performance-data']['rf-temp-max'] });
2694 minListA.push({ x: test, y: item._source['performance-data']['rf-temp-min'] });
2695 avgListA.push({ x: test, y: item._source['performance-data']['rf-temp-avg'] });
2698 maxListA.push({ x: 0, y: item._source['performance-data']['rf-temp-max'] });
2699 minListA.push({ x: 0, y: item._source['performance-data']['rf-temp-min'] });
2700 avgListA.push({ x: 0, y: item._source['performance-data']['rf-temp-avg'] });
2704 $scope.tempSeries.push('Rf temp max A', 'Rf temp min A', 'Rf temp avg A');
2707 $scope.tempData.push(maxListA);
2708 $scope.tempData.push(minListA);
2709 $scope.tempData.push(avgListA);
2711 $scope.tempDatasetOverride.push({ yAxisID: 'y-axis-1' });
2712 $scope.tempDatasetOverride.push({ yAxisID: 'y-axis-1' });
2713 $scope.tempDatasetOverride.push({ yAxisID: 'y-axis-1' });
2715 //process data fro side b
2721 dataB.data.hits.hits.map(function (item, index) {
2722 var timestamp = $mwtnPerformanceLink.formatTimeStamp(item._source['time-stamp']);
2723 var test = $scope.temptestMap.get(timestamp);
2725 maxListB.push({ x: test, y: item._source['performance-data']['rf-temp-max'] });
2726 minListB.push({ x: test, y: item._source['performance-data']['rf-temp-min'] });
2727 avgListB.push({ x: test, y: item._source['performance-data']['rf-temp-avg'] });
2730 maxListB.push({ x: 0, y: item._source['performance-data']['rf-temp-max'] });
2731 minListB.push({ x: 0, y: item._source['performance-data']['rf-temp-min'] });
2732 avgListB.push({ x: 0, y: item._source['performance-data']['rf-temp-avg'] });
2736 $scope.tempSeries.push('Rf temp max B', 'Rf temp min B', 'Rf temp avg B');
2740 $scope.tempData.push(maxListB);
2741 $scope.tempData.push(minListB);
2742 $scope.tempData.push(avgListB);
2744 $scope.tempDatasetOverride.push({ yAxisID: 'y-axis-1' });
2745 $scope.tempDatasetOverride.push({ yAxisID: 'y-axis-1' });
2746 $scope.tempDatasetOverride.push({ yAxisID: 'y-axis-1' });
2748 overridePoints($scope.tempSeries, $scope.tempDatasetOverride);
2754 $scope.snirChartData = [];
2755 $scope.snirSeries = [];
2756 $scope.snirsetOverride = [];
2758 $scope.snirOptions = {
2763 afterTickToLabelConversion: function (data) { //adds our custom timestamp labels
2765 var xLabels = data.ticks;
2766 xLabels.forEach(function (labels, i) {
2767 var timestamp = $scope.snirLabelMap.get(parseInt(labels));
2768 if (parseInt(labels) == labels)
2769 xLabels[i] = timestamp;
2774 //calculate last timestamp if label is missing
2775 if (xLabels[xLabels.length - 1] === undefined) {
2776 var timestamp = $scope.snirLabelMap.get($scope.snirLabelMap.size - 1);
2779 let labelLength = xLabels.length - 1;
2781 if (labelLength % 10 == 0) {
2789 xLabels[xLabels.length - 1] = calculateMissingTimestamp(timestamp, counter);
2806 title: function (tooltipItem, data) { //picks right tool tip
2808 var vaue = $scope.snirLabelMap.get(tooltipItem[0].xLabel);
2819 $scope.snirtestMap = new Map();
2820 $scope.snirLabelMap = new Map();
2822 tempArr.map(function (item, index) {
2823 $scope.snirtestMap.set(item, index);
2824 $scope.snirLabelMap.set(index, item);
2831 dataA.data.hits.hits.map(function (item, index) {
2832 var timestamp = $mwtnPerformanceLink.formatTimeStamp(item._source['time-stamp']);
2834 var test = $scope.snirtestMap.get(timestamp);
2836 maxListA.push({ x: test, y: item._source['performance-data']['rf-temp-max'] });
2837 minListA.push({ x: test, y: item._source['performance-data']['rf-temp-min'] });
2838 avgListA.push({ x: test, y: item._source['performance-data']['rf-temp-avg'] });
2840 maxListA.push({ x: 0, y: item._source['performance-data']['rf-temp-max'] });
2841 minListA.push({ x: 0, y: item._source['performance-data']['rf-temp-min'] });
2842 avgListA.push({ x: 0, y: item._source['performance-data']['rf-temp-avg'] });
2846 $scope.snirSeries.push('Snir max A', 'Snir min A', 'Snir avg A');
2849 $scope.snirChartData.push(maxListA);
2850 $scope.snirChartData.push(minListA);
2851 $scope.snirChartData.push(avgListA);
2853 $scope.snirsetOverride.push({ yAxisID: 'y-axis-1' });
2854 $scope.snirsetOverride.push({ yAxisID: 'y-axis-1' });
2855 $scope.snirsetOverride.push({ yAxisID: 'y-axis-1' });
2861 dataB.data.hits.hits.map(function (item, index) {
2862 var timestamp = $mwtnPerformanceLink.formatTimeStamp(item._source['time-stamp']);
2863 var test = $scope.snirtestMap.get(timestamp);
2865 maxListB.push({ x: test, y: item._source['performance-data']['rf-temp-max'] });
2866 minListB.push({ x: test, y: item._source['performance-data']['rf-temp-min'] });
2867 avgListB.push({ x: test, y: item._source['performance-data']['rf-temp-avg'] });
2869 maxListB.push({ x: 0, y: item._source['performance-data']['rf-temp-max'] });
2870 minListB.push({ x: 0, y: item._source['performance-data']['rf-temp-min'] });
2871 avgListB.push({ x: 0, y: item._source['performance-data']['rf-temp-avg'] });
2875 $scope.snirSeries.push('Snir max B', 'Snir min B', 'Snir avg B');
2879 $scope.snirChartData.push(maxListB);
2880 $scope.snirChartData.push(minListB);
2881 $scope.snirChartData.push(avgListB);
2883 $scope.snirsetOverride.push({ yAxisID: 'y-axis-1' });
2884 $scope.snirsetOverride.push({ yAxisID: 'y-axis-1' });
2885 $scope.snirsetOverride.push({ yAxisID: 'y-axis-1' });
2887 overridePoints($scope.snirSeries, $scope.snirsetOverride);
2891 case 'crossPolarDiscrimination': {
2893 $scope.xpdChartData = [];
2894 $scope.xpdSeries = [];
2895 $scope.crossPolarDiscriminationsetOverride = [];
2897 $scope.xpdOptions = {
2903 afterTickToLabelConversion: function (data) { //adds our custom timestamp labels
2905 var xLabels = data.ticks;
2906 xLabels.forEach(function (labels, i) {
2907 var timestamp = $scope.xpdLabelMap.get(parseInt(labels));
2908 if (parseInt(labels) == labels)
2909 xLabels[i] = timestamp;
2915 //calculate last timestamp if label is missing
2916 if (xLabels[xLabels.length - 1] === undefined) {
2917 var timestamp = $scope.xpdLabelMap.get($scope.xpdLabelMap.size - 1);
2920 let labelLength = xLabels.length - 1;
2922 if (labelLength % 10 == 0) {
2930 xLabels[xLabels.length - 1] = calculateMissingTimestamp(timestamp, counter);
2947 title: function (tooltipItem, data) { //picks right tool tip
2949 var vaue = $scope.xpdLabelMap.get(tooltipItem[0].xLabel);
2960 $scope.xpdtestMap = new Map();
2961 $scope.xpdLabelMap = new Map();
2963 tempArr.map(function (item, index) {
2964 $scope.xpdtestMap.set(item, index);
2965 $scope.xpdLabelMap.set(index, item);
2972 dataA.data.hits.hits.map(function (item, index) {
2973 var timestamp = $mwtnPerformanceLink.formatTimeStamp(item._source['time-stamp']);
2975 var test = $scope.xpdtestMap.get(timestamp);
2977 maxListA.push({ x: test, y: item._source['performance-data']['xpd-max'] });
2978 minListA.push({ x: test, y: item._source['performance-data']['xpd-min'] });
2979 avgListA.push({ x: test, y: item._source['performance-data']['xpd-avg'] });
2981 maxListA.push({ x: 0, y: item._source['performance-data']['xpd-max'] });
2982 minListA.push({ x: 0, y: item._source['performance-data']['xpd-min'] });
2983 avgListA.push({ x: 0, y: item._source['performance-data']['xpd-avg'] });
2987 $scope.xpdSeries.push('CPD max A', 'CPD min A', 'CPD avg A');
2990 $scope.xpdChartData.push(maxListA);
2991 $scope.xpdChartData.push(minListA);
2992 $scope.xpdChartData.push(avgListA);
2994 $scope.crossPolarDiscriminationsetOverride.push({ yAxisID: 'y-axis-1' });
2995 $scope.crossPolarDiscriminationsetOverride.push({ yAxisID: 'y-axis-1' });
2996 $scope.crossPolarDiscriminationsetOverride.push({ yAxisID: 'y-axis-1' });
3002 dataB.data.hits.hits.map(function (item, index) {
3003 var timestamp = $mwtnPerformanceLink.formatTimeStamp(item._source['time-stamp']);
3004 var test = $scope.xpdtestMap.get(timestamp);
3006 maxListB.push({ x: test, y: item._source['performance-data']['xpd-max'] });
3007 minListB.push({ x: test, y: item._source['performance-data']['xpd-min'] });
3008 avgListB.push({ x: test, y: item._source['performance-data']['xpd-avg'] });
3010 maxListB.push({ x: 0, y: item._source['performance-data']['xpd-max'] });
3011 minListB.push({ x: 0, y: item._source['performance-data']['xpd-min'] });
3012 avgListB.push({ x: 0, y: item._source['performance-data']['xpd-avg'] });
3016 $scope.xpdSeries.push('CPD max B', 'CPD min B', 'CPD avg B');
3018 $scope.xpdChartData.push(maxListB);
3019 $scope.xpdChartData.push(minListB);
3020 $scope.xpdChartData.push(avgListB);
3022 $scope.crossPolarDiscriminationsetOverride.push({ yAxisID: 'y-axis-1' });
3023 $scope.crossPolarDiscriminationsetOverride.push({ yAxisID: 'y-axis-1' });
3024 $scope.crossPolarDiscriminationsetOverride.push({ yAxisID: 'y-axis-1' });
3026 overridePoints($scope.xpdSeries, $scope.crossPolarDiscriminationsetOverride);
3034 var getColor = function (hexcolorCode) {
3036 backgroundColor: hexcolorCode, pointBackgroundColor: hexcolorCode,
3037 pointHoverBackgroundColor: hexcolorCode,
3038 borderColor: hexcolorCode,
3039 pointBorderColor: hexcolorCode,
3040 pointHoverBorderColor: hexcolorCode,
3046 var getData = function (from, size, networkElement, selectedLtpId) {
3048 var sort = [{ "time-stamp": { order: 'desc' } }];
3050 var query = { "query": { "bool": { "must": [{ prefix: { "node-name": networkElement } }] } } };
3053 //add layer protocol selector to filter query
3054 query.query.bool.must.push({ prefix: { "layer-protocol-name": "MWPS" } });
3056 //add interface selector to filter query
3057 if (selectedLtpId && selectedLtpId !== 'Select LTP') {
3058 query.query.bool.must.push({ prefix: { "uuid-interface": selectedLtpId } });
3061 var selected15minPeriod = true;
3062 if ($scope.timePeriod !== $scope.timePeriods[0]) selected15minPeriod = false;
3064 return $mwtnPerformanceLink.getFilteredSortedData(from, size, sort, query, selected15minPeriod);
3067 $scope.status = { ne: false };
3068 $scope.spinner = { ne: false };
3071 $scope.$watch('linkId', function (newValue, oldValue) {
3072 if (newValue && oldValue !== "" && newValue !== oldValue) {
3074 var functionId = 'sdnperformance';
3075 var docType = 'historicalperformance15min';
3076 if ($scope.timePeriod !== $scope.timePeriods[0]) {
3077 docType = 'historicalperformance24h';
3079 var aggregations = {
3083 "radio-signal-id": newValue
3089 "field": "node-name"
3094 "field": "uuid-interface"
3099 $mwtnPerformanceLink.getAggregations(functionId, docType, aggregations).then(function (success) {
3100 console.log(JSON.stringify(success));
3101 var nodes = success.data.aggregations['node-name'].buckets.map(function(bucket){
3104 console.warn(nodes);
3105 if (nodes.length = 0) {
3106 $scope.networkElementA = '';
3107 $scope.networkElementB = '';
3108 } else if (nodes.length = 1) {
3109 $scope.networkElementA = nodes[0];
3110 $scope.networkElementB = '';
3111 } else if (nodes.length = 2) {
3112 $scope.networkElementA = nodes[0];
3113 $scope.networkElementB = nodes[1]
3115 $scope.networkElementA = nodes[0];
3116 $scope.networkElementB = nodes[1]
3117 console.warn('Check nodes for radio signal id: ' + newValue + ' ' + JSON.stringify(nodes));
3119 var ltps = success.data.aggregations['ltp'].buckets.map(function(bucket){
3122 if (ltps.length = 0) {
3123 $scope.selectedLtpIdA = '';
3124 $scope.selectedLtpIdB = '';
3125 } else if (ltps.length = 1) {
3126 $scope.selectedLtpIdA = ltps[0];
3127 $scope.selectedLtpIdB = ltps[0];
3128 } else if (ltps.length = 2) {
3129 // TODO Who belongs to whom - just guessing ;/
3130 $scope.selectedLtpIdA = ltps[0];
3131 $scope.selectedLtpIdB = ltps[1]
3133 $scope.selectedLtpIdA = ltps[0];
3134 $scope.selectedLtpIdB = ltps[1]
3135 console.warn('Check ltps for radio signal id: ' + newValue + ' ' + JSON.stringify(nodes));
3137 }, function (error) {
3139 $scope.networkElementA = '';
3140 $scope.networkElementB = '';
3141 $scope.selectedLtpIdA = '';
3142 $scope.selectedLtpIdB = '';
3147 $scope.$watch('selectedLtpIdA', function (newValue, oldValue) {
3148 if (newValue && oldValue !== "" && newValue !== oldValue) {
3149 //TODO: get data based on open grids
3150 Object.keys($scope.status).map(function (key) {
3151 if ($scope.status[key]) {
3152 $scope.defaultColors = [];
3153 $scope.defaultColors.push(getColor('#0062ff'));
3154 $scope.defaultColors.push(getColor('#b9341b'));
3155 $scope.defaultColors.push(getColor('#f0141f'));
3156 $scope.defaultColors.push(getColor('#4c7759'));
3157 $scope.defaultColors.push(getColor('#55b64e'));
3158 $scope.defaultColors.push(getColor("#6c8995"));
3160 getDataFromNEs($scope.networkElementIdA, $scope.selectedLtpIdA, $scope.networkElementIdB, $scope.selectedLtpIdB, key)
3161 $window.dispatchEvent(new Event("resize"));
3168 $scope.$watch('selectedLtpIdB', function (newValue, oldValue) {
3169 if (newValue && oldValue !== "" && newValue !== oldValue && newValue != 'Select LTP') {
3170 Object.keys($scope.status).map(function (key) {
3171 if ($scope.status[key]) {
3172 $scope.defaultColors = [];
3173 $scope.defaultColors.push(getColor('#0062ff'));
3174 $scope.defaultColors.push(getColor('#b9341b'));
3175 $scope.defaultColors.push(getColor('#f0141f'));
3176 $scope.defaultColors.push(getColor('#4c7759'));
3177 $scope.defaultColors.push(getColor('#55b64e'));
3178 $scope.defaultColors.push(getColor("#6c8995"));
3180 getDataFromNEs($scope.networkElementIdA, $scope.selectedLtpIdA, $scope.networkElementIdB, $scope.selectedLtpIdB, key)
3181 $window.dispatchEvent(new Event("resize"));
3188 $scope.$watch('status', function (status, oldValue) {
3189 Object.keys(status).map(function (key) {
3190 if ($scope.networkElementIdA && $scope.networkElementIdB && status[key] && status[key] !== oldValue[key]) {
3193 //add a set of default colors for line graphs with 6 values
3194 $scope.defaultColors = [];
3195 $scope.defaultColors.push(getColor('#0062ff'));
3196 $scope.defaultColors.push(getColor('#b9341b'));
3197 $scope.defaultColors.push(getColor('#f0141f'));
3198 $scope.defaultColors.push(getColor('#4c7759'));
3199 $scope.defaultColors.push(getColor('#55b64e'));
3200 $scope.defaultColors.push(getColor("#6c8995"));
3202 getDataFromNEs($scope.networkElementIdA, $scope.selectedLtpIdA, $scope.networkElementIdB, $scope.selectedLtpIdB, key)
3203 $window.dispatchEvent(new Event("resize"));
3210 $scope.$watch('timePeriod', function (newValue, oldValue) {
3212 if (newValue && oldValue !== "" && newValue !== oldValue) {
3214 //change page sizes and tell gridapi to update
3216 $scope.gridOptionsReceiveLevel.paginationPageSizes = $scope.pageSizes();
3217 $scope.gridOptionsReceiveLevel.paginationPageSize = $scope.gridOptionsReceiveLevel.paginationPageSizes[0];
3218 $scope.recvGridApi.core.notifyDataChange(uiGridConstants.dataChange.OPTIONS);
3220 $scope.gridOptionsTransmissionLevel.paginationPageSizes = $scope.pageSizes();
3221 $scope.gridOptionsTransmissionLevel.paginationPageSize = $scope.gridOptionsTransmissionLevel.paginationPageSizes[0];
3222 $scope.transmissionGridApi.core.notifyDataChange(uiGridConstants.dataChange.OPTIONS);
3225 $scope.gridOptionsModulation.paginationPageSizes = $scope.pageSizes();
3226 $scope.gridOptionsModulation.paginationPageSize = $scope.gridOptionsModulation.paginationPageSizes[0];
3227 $scope.gridApi.core.notifyDataChange(uiGridConstants.dataChange.OPTIONS);
3229 $scope.gridOptionsTemperature.paginationPageSizes = $scope.pageSizes();
3230 $scope.gridOptionsTemperature.paginationPageSize = $scope.gridOptionsTemperature.paginationPageSizes[0];
3231 $scope.gridTemperatureApi.core.notifyDataChange(uiGridConstants.dataChange.OPTIONS);
3233 $scope.gridOptionsSnir.paginationPageSizes = $scope.pageSizes();
3234 $scope.gridOptionsSnir.paginationPageSize = $scope.gridOptionsSnir.paginationPageSizes[0];
3235 $scope.gridSNIRApi.core.notifyDataChange(uiGridConstants.dataChange.OPTIONS);
3237 $scope.gridOptionsCrossPolarDiscrimination.paginationPageSizes = $scope.pageSizes();
3238 $scope.gridOptionsCrossPolarDiscrimination.paginationPageSize = $scope.gridOptionsCrossPolarDiscrimination.paginationPageSizes[0];
3239 $scope.gridXpdApi.core.notifyDataChange(uiGridConstants.dataChange.OPTIONS);
3241 //get new interface data
3242 getInterfaces($scope.networkElementIdA, $scope.availableLtpIdsA);
3243 getInterfaces($scope.networkElementIdB, $scope.availableLtpIdsB);
3248 $scope.collapseAll = function () {
3250 Object.keys($scope.status).map(function (group) {
3251 $scope.status[group] = false;
3253 Object.keys($scope.spinner).map(function (group) {
3254 $scope.spinner[group] = false;
3258 //get data on ne selection
3260 $scope.$watch('networkElementA', function (neId, oldValue) {
3261 if (neId && neId !== '' && neId !== oldValue) {
3263 $scope.networkElements.map(function (ne) {
3264 if (ne.id === neId) revision = ne.revision;
3266 $scope.networkElementIdA = neId;
3267 $scope.revisionA = revision;
3269 getInterfaces(neId, $scope.availableLtpIdsA);
3270 $scope.collapseAll();
3275 $scope.$watch('networkElementB', function (neId, oldValue) {
3276 if (neId && neId !== '' && neId !== oldValue) {
3278 $scope.networkElements.map(function (ne) {
3279 if (ne.id === neId) revision = ne.revision;
3281 $scope.networkElementIdB = neId;
3282 $scope.revisionB = revision;
3284 getInterfaces(neId, $scope.availableLtpIdsB);
3285 $scope.collapseAll();
3290 var getInterfaces = function (networkElement, networkList) {
3292 //clear interface array
3293 var length = networkList.length;
3294 networkList.splice(1, length);
3296 //request to get interfaces
3306 "node-name": networkElement
3311 "layer-protocol-name": "MWPS"
3320 "field": "uuid-interface"
3329 var selected15minPeriod = true;
3330 if ($scope.timePeriod !== $scope.timePeriods[0]) selected15minPeriod = false;
3332 $mwtnPerformanceLink.getInterfaces(aggr, selected15minPeriod).then(function (response) {
3334 if (response.data.aggregations.neinterfaces.interfaces.buckets.length >= 0) {
3335 response.data.aggregations.neinterfaces.interfaces.buckets.map(function (item) {
3336 networkList.push(item.key);