2 * @copyright 2017 highstreet technologies GmbH and others. All rights reserved.
5 * This program and the accompanying materials are made available under the
6 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
7 * and is available at http://www.eclipse.org/legal/epl-v10.html
10 define(['app/mwtnPerformanceCurrent/mwtnPerformanceCurrent.module',
11 'app/mwtnPerformanceCurrent/mwtnPerformanceCurrent.services'],
12 function (mwtnPerformanceCurrentApp) {
14 mwtnPerformanceCurrentApp.register.controller('mwtnPerformanceCurrentCtrl', ['$scope', '$rootScope', '$window', '$translate', '$mwtnLog', '$mwtnPerformanceCurrent', 'uiGridConstants', 'OnfNetworkElement',
15 function ($scope, $rootScope, $window, $translate, $mwtnLog, $mwtnPerformanceCurrent, uiGridConstants, OnfNetworkElement) {
17 var COMPONENT = 'mwtnPerformanceCurrent';
18 $mwtnLog.info({ component: COMPONENT, message: 'mwtnPerformanceCurrent started!' });
20 $rootScope.section_logo = 'src/app/mwtnPerformanceCurrent/images/mwtnPerformance.png'; // Add your topbar logo location here such as 'assets/images/logo_topology.gif'
22 var radioSignalMap = new Map(); //holds uuid/singalid
25 layerProtocol: 'unknown'
28 $scope.layerProtocol = 'MWPS';
29 $scope.layerProtocols = ['MWPS', 'ETC'];
31 var updateNe = function (data) {
34 // update onfNetworkElement
35 switch (data.revision) {
37 $mwtnLog.info({ component: COMPONENT, message: 'Revision ' + data.revision + 'not supported!' });
40 $scope.onfNetworkElement = JSON.parse(JSON.stringify(data['network-element']));
41 $scope.onfLtps = data['network-element'].ltp;
42 $scope.onfNetworkElement.ltpRefList = undefined;
46 var order = $mwtnPerformanceCurrent.layerProtocolNameOrder;
47 $scope.onfLtps.sort(function (a, b) {
48 if (order[a.lp[0]['layer-protocol-name']] < order[b.lp[0]['layer-protocol-name']]) return -1;
49 if (order[a.lp[0]['layer-protocol-name']] > order[b.lp[0]['layer-protocol-name']]) return 1;
50 if (a.lp[0].uuid < b.lp[0].uuid) return -1;
51 if (a.lp[0].uuid > b.lp[0].uuid) return 1;
55 // calculate conditional packages
56 $scope.airinterfaces = [];
57 $scope.ethernets = [];
59 $scope.onfLtps.map(function (ltp) {
60 var lpId = ltp.lp[0].uuid;
64 switch (ltp.lp[0]['layer-protocol-name']) {
66 var init = JSON.parse(JSON.stringify(initPac));
67 init.layerProtocol = lpId;
68 $scope.airinterfaces.push(init);
73 var init = JSON.parse(JSON.stringify(initPac));
74 init.layerProtocol = lpId;
75 $scope.ethernets.push(init);
79 $mwtnLog.info({ component: COMPONENT, message: 'The layerProtocol ' + ltp.lp[0]['layer-protocol-name'] + ' is not supported (yet)!' });
83 data.revision = undefined;
86 var updateAirInterface = function (data, key) {
87 // console.log(JSON.stringify(data), lpId);
89 if (Object.keys(data)[0].startsWith('air-interface-current-performance')) {
91 $scope.jsonvalue.push(data);
92 var label = new OnfNetworkElement($scope.onfNetworkElement).getLpById(data['layer-protocol']).getLabel() || data['layer-protocol'];
93 var radioSignal = radioSignalMap.get(data['layer-protocol'])
94 var list = data['air-interface-current-performance']['current-performance-data-list'] || data['air-interface-current-performance']['current-performance-data'];
95 list.map(function(item) {
98 var timestamp = $mwtnPerformanceCurrent.formatTimeStamp(item.timestamp);
102 case 'performance826':
103 $scope.performance826.push({
104 timestamp: timestamp,
105 elapsedTime: checkData(item['elapsed-time']),
106 suspectInterval: item['suspect-interval-flag'],
107 scannerId: item['scanner-id'],
109 period: item['granularity-period'],
110 es: item['performance-data'].es,
111 ses: item['performance-data'].ses,
112 uas: item['performance-data'].unavailability,
113 radioSignal: radioSignal
118 $scope.receiveLevel.push({
119 timestamp: timestamp,
120 elapsedTime: checkData(item['elapsed-time']),
121 suspectInterval: item['suspect-interval-flag'],
122 scannerId: item['scanner-id'],
124 period: item['granularity-period'],
125 rxmin: checkData(item['performance-data']['rx-level-min']),
126 rxmax: checkData(item['performance-data']['rx-level-max']),
127 rxavg: checkData(item['performance-data']['rx-level-avg']),
128 radioSignal: radioSignal
132 case 'transmissionLevel':
134 $scope.transmissionLevel.push({
135 timestamp: timestamp,
136 elapsedTime: checkData(item['elapsed-time']),
137 suspectInterval: item['suspect-interval-flag'],
138 scannerId: item['scanner-id'],
140 period: item['granularity-period'],
141 txmin: checkData(item['performance-data']['tx-level-min']),
142 txmax: checkData(item['performance-data']['tx-level-max']),
143 txavg: checkData(item['performance-data']['tx-level-avg']),
144 radioSignal: radioSignal
151 $scope.modulation.push(
153 timestamp: timestamp,
154 elapsedTime: checkData(item['elapsed-time']),
155 suspectInterval: item['suspect-interval-flag'],
156 scannerId: item['scanner-id'],
158 period: item['granularity-period'],
159 time2S: checkData(item['performance-data']['time2-states-s']),
160 time2: checkData(item['performance-data']['time2-states']),
161 time2L: checkData(item['performance-data']['time2-states-l']),
162 time4S: checkData(item['performance-data']['time4-states-s']),
163 time4: checkData(item['performance-data']['time4-states']),
164 time4L: checkData(item['performance-data']['time4-states-l']),
165 time16S: checkData(item['performance-data']['time16-states-s']),
166 time16: checkData(item['performance-data']['time16-states']),
167 time16L: checkData(item['performance-data']['time16-states-l']),
168 time32S: checkData(item['performance-data']['time32-states-s']),
169 time32: checkData(item['performance-data']['time32-states']),
170 time32L: checkData(item['performance-data']['time32-states-l']),
171 time64S: checkData(item['performance-data']['time64-states-s']),
172 time64: checkData(item['performance-data']['time64-states']),
173 time64L: checkData(item['performance-data']['time64-states-l']),
174 time128S: checkData(item['performance-data']['time128-states-s']),
175 time128: checkData(item['performance-data']['time128-states']),
176 time128L: checkData(item['performance-data']['time128-states-l']),
177 time256S: checkData(item['performance-data']['time256-states-s']),
178 time256: checkData(item['performance-data']['time256-states']),
179 time256L: checkData(item['performance-data']['time256-states-l']),
180 time512S: checkData(item['performance-data']['time512-states-s']),
181 time512: checkData(item['performance-data']['time512-states']),
182 time512L: checkData(item['performance-data']['time512-states-l']),
183 time1024S: checkData(item['performance-data']['time1024-states-s']),
184 time1024: checkData(item['performance-data']['time1024-states']),
185 time1024L: checkData(item['performance-data']['time1024-states-l']),
186 time2048S: checkData(item['performance-data']['time2048-states-s']),
187 time2048: checkData(item['performance-data']['time2048-states']),
188 time2048L: checkData(item['performance-data']['time2048-states-l']),
189 time4096S: checkData(item['performance-data']['time4096-states-s']),
190 time4096: checkData(item['performance-data']['time4096-states']),
191 time4096L: checkData(item['performance-data']['time4096-states-l']),
192 time8192S: checkData(item['performance-data']['time8192-states-s']),
193 time8192: checkData(item['performance-data']['time8192-states']),
194 time8192L: checkData(item['performance-data']['time8192-states-l']),
195 radioSignal: radioSignal
202 $scope.temperature.push({
203 timestamp: timestamp,
204 elapsedTime: checkData(item['elapsed-time']),
205 suspectInterval: item['suspect-interval-flag'],
206 scannerId: item['scanner-id'],
208 period: item['granularity-period'],
209 rfTempMin: item['performance-data']['rf-temp-min'],
210 rfTempAvg: item['performance-data']['rf-temp-avg'],
211 rfTempMax: item['performance-data']['rf-temp-max'],
212 radioSignal: radioSignal
219 timestamp: timestamp,
220 elapsedTime: checkData(item['elapsed-time']),
221 suspectInterval: item['suspect-interval-flag'],
222 scannerId: item['scanner-id'],
224 period: item['granularity-period'],
225 snirMin: item['performance-data']['snir-min'],
226 snirAvg: item['performance-data']['snir-avg'],
227 snirMax: item['performance-data']['snir-max'],
228 radioSignal: radioSignal
234 case 'crossPolarDiscrimination':
236 $scope.cpdData.push({
238 timestamp: timestamp,
239 elapsedTime: checkData(item['elapsed-time']),
240 suspectInterval: item['suspect-interval-flag'],
241 scannerId: item['scanner-id'],
243 period: item['granularity-period'],
244 xpdMin: item['performance-data']['xpd-min'],
245 xpdAvg: item['performance-data']['xpd-avg'],
246 xpdMax: item['performance-data']['xpd-max'],
247 radioSignal: radioSignal
258 var updateContainer = function (lpId, part, data) {
259 // console.log(JSON.stringify(data), lpId);
260 var label = new OnfNetworkElement($scope.onfNetworkElement).getLpById(data['layer-protocol']).getLabel() || data['layer-protocol'];
262 if (Object.keys(data)[0].contains('ethernet-container')) {
263 $scope.ethernetJsonValue.push(data);
265 var list = data['ethernet-container-current-performance']['current-performance-data-list'] || data['ethernet-container-current-performance']['current-performance-data']
266 list.map(function (item) {
268 $scope.performanceEthernetContainer.push({
269 timestamp: $mwtnPerformanceCurrent.formatTimeStamp(item['timestamp']),
270 elapsedTime: checkData(item['elapsed-time']),
271 suspectInterval: item['suspect-interval-flag'],
272 scannerId: item['scanner-id'],
273 period: item['granularity-period'],
274 txEthernetBytesMaxS: checkData(item['performance-data']['tx-ethernet-bytes-max-s']),
275 txEthernetBytesMaxM: checkData(item['performance-data']['tx-ethernet-bytes-max-m']),
276 txEthernetBytesSum: checkData(item['performance-data']['tx-ethernet-bytes-sum']),
283 //replace -1 with undefined in json data
284 var checkData = function (value) {
285 if (value === -1 || value === undefined) return undefined;
289 //perf log configuration
290 $scope.gridOptionsPerformance826 = {
291 paginationPageSizes: [25, 100, 1000, 10000],
292 paginationPageSize: 25,
293 enablePaginationControls: true,
294 enableFiltering: true,
295 enableGridMenu: true,
298 { field: 'id', type: 'string', displayName: $translate.instant('MWTN_LP'), width: 300 },
299 { field: 'radioSignal', type: 'string', displayName: 'Radio Signal Id', width: 90 },
300 { field: 'scannerId', type: 'string', displayName: 'Scanner Id', width: 90 },
302 field: 'timestamp', type: 'string', displayName: 'Request time', width: 200, sort: {
303 direction: uiGridConstants.ASC,
307 { field: 'elapsedTime', type: 'string', displayName: 'Elapsed Time', width: 100 },
308 { field: 'period', type: 'string', displayName: 'Period', width: 200 },
309 { field: 'suspectInterval', type: 'string', displayName: 'Suspect Interval Flag', width: 100 },
310 { field: 'es', type: 'string', displayName: 'ES', width: 70 },
311 { field: 'ses', type: 'string', displayName: 'SES', width: 70 },
312 { field: 'uas', type: 'string', displayName: 'UAS', width: 70 }
314 data: 'performance826'
317 //receive lvl configuration
318 $scope.gridOptionsReceiveLevel = {
319 paginationPageSizes: [25, 100, 1000, 10000],
320 paginationPageSize: 25,
321 enablePaginationControls: true,
322 enableFiltering: true,
323 enableGridMenu: true,
326 { field: 'id', type: 'string', displayName: $translate.instant('MWTN_LP'), width: 300 },
327 { field: 'radioSignal', type: 'string', displayName: 'Radio Signal Id', width: 90 },
328 { field: 'scannerId', type: 'string', displayName: 'Scanner Id', width: 90 },
330 field: 'timestamp', type: 'string', displayName: 'Request time', width: 200, sort: {
331 direction: uiGridConstants.ASC,
335 { field: 'elapsedTime', type: 'string', displayName: 'Elapsed Time', width: 100 },
336 { field: 'period', type: 'string', displayName: 'Period', width: 200 },
337 { field: 'suspectInterval', type: 'string', displayName: 'Suspect Interval Flag', width: 100 },
338 { field: 'rxmin', type: 'string', displayName: 'Rx min [dBm]', width: 90 },
339 { field: 'rxavg', type: 'string', displayName: 'Rx avg [dBm]', width: 90 },
340 { field: 'rxmax', type: 'string', displayName: 'Rx max [dBm]', width: 90 }
346 //transmission lvl configuration
347 $scope.gridOptionsTransmissionLevel = {
348 paginationPageSizes: [25, 100, 1000, 10000],
349 paginationPageSize: 25,
350 enablePaginationControls: true,
351 enableFiltering: true,
352 enableGridMenu: true,
355 { field: 'id', type: 'string', displayName: $translate.instant('MWTN_LP'), width: 300 },
356 { field: 'radioSignal', type: 'string', displayName: 'Radio Signal Id', width: 90 },
357 { field: 'scannerId', type: 'string', displayName: 'Scanner Id', width: 90 },
359 field: 'timestamp', type: 'string', displayName: 'Request time', width: 200, sort: {
360 direction: uiGridConstants.ASC,
364 { field: 'elapsedTime', type: 'string', displayName: 'Elapsed Time', width: 100 },
365 { field: 'period', type: 'string', displayName: 'Period', width: 200 },
366 { field: 'suspectInterval', type: 'string', displayName: 'Suspect Interval Flag', width: 100 },
367 { field: 'txmin', type: 'string', displayName: 'Tx min [dBm]', width: 90 },
368 { field: 'txavg', type: 'string', displayName: 'Tx avg [dBm]', width: 90 },
369 { field: 'txmax', type: 'string', displayName: 'Tx max [dBm]', width: 90 }
372 data: 'transmissionLevel'
375 //modulation configuration
376 $scope.gridOptionsModulation = {
377 paginationPageSizes: [25, 100, 1000, 10000],
378 paginationPageSize: 25,
379 enablePaginationControls: true,
380 enableFiltering: true,
381 enableGridMenu: true,
384 { field: 'id', type: 'string', displayName: $translate.instant('MWTN_LP'), width: 300 },
385 { field: 'radioSignal', type: 'string', displayName: 'Radio Signal Id', width: 90 },
386 { field: 'scannerId', type: 'string', displayName: 'Scanner Id', width: 90 },
388 field: 'timestamp', type: 'string', displayName: 'Request time', width: 200, sort: {
389 direction: uiGridConstants.ASC,
393 { field: 'elapsedTime', type: 'string', displayName: 'Elapsed Time', width: 100 },
394 { field: 'period', type: 'string', displayName: 'Period', width: 200 },
395 { field: 'suspectInterval', type: 'string', displayName: 'Suspect Interval Flag', width: 100 },
396 { field: 'time2S', type: 'string', displayName: 'QAM2S', width: 90 },
397 { field: 'time2', type: 'string', displayName: 'QAM2', width: 90 },
398 { field: 'time2L', type: 'string', displayName: 'QAM2L', width: 90 },
399 { field: 'time4S', type: 'string', displayName: 'QAM4S', width: 90 },
400 { field: 'time4', type: 'string', displayName: 'QAM4', width: 90 },
401 { field: 'time4L', type: 'string', displayName: 'QAM4L', width: 90 },
402 { field: 'time16S', type: 'string', displayName: 'QAM16S', width: 90 },
403 { field: 'time16', type: 'string', displayName: 'QAM16', width: 90 },
404 { field: 'time16L', type: 'string', displayName: 'QAM16L', width: 90 },
405 { field: 'time32S', type: 'string', displayName: 'QAM32S', width: 90 },
406 { field: 'time32', type: 'string', displayName: 'QAM32', width: 90 },
407 { field: 'time32L', type: 'string', displayName: 'QAM32L', width: 90 },
408 { field: 'time64S', type: 'string', displayName: 'QAM64S', width: 90 },
409 { field: 'time64', type: 'string', displayName: 'QAM64', width: 90 },
410 { field: 'time64L', type: 'string', displayName: 'QAM64L', width: 90 },
411 { field: 'time128S', type: 'string', displayName: 'QAM128S', width: 90 },
412 { field: 'time128', type: 'string', displayName: 'QAM128', width: 90 },
413 { field: 'time128L', type: 'string', displayName: 'QAM128L', width: 90 },
414 { field: 'time256S', type: 'string', displayName: 'QAM256S', width: 90 },
415 { field: 'time256', type: 'string', displayName: 'QAM256', width: 90 },
416 { field: 'time256L', type: 'string', displayName: 'QAM256L', width: 90 },
417 { field: 'time512S', type: 'string', displayName: 'QAM512S', width: 90 },
418 { field: 'time512', type: 'string', displayName: 'QAM512', width: 90 },
419 { field: 'time512L', type: 'string', displayName: 'QAM512L', width: 90 },
420 { field: 'time1024S', type: 'string', displayName: 'QAM1024S', width: 90 },
421 { field: 'time1024', type: 'string', displayName: 'QAM1024', width: 90 },
422 { field: 'time1024L', type: 'string', displayName: 'QAM1024L', width: 90 },
423 { field: 'time2048S', type: 'string', displayName: 'QAM2048S', width: 90 },
424 { field: 'time2048', type: 'string', displayName: 'QAM2048', width: 90 },
425 { field: 'time2048L', type: 'string', displayName: 'QAM2048L', width: 90 },
426 { field: 'time4096S', type: 'string', displayName: 'QAM4096S', width: 90 },
427 { field: 'time4096', type: 'string', displayName: 'QAM4096', width: 90 },
428 { field: 'time4096L', type: 'string', displayName: 'QAM4096L', width: 90 },
429 { field: 'time8192S', type: 'string', displayName: 'QAM8192S', width: 90 },
430 { field: 'time8192', type: 'string', displayName: 'QAM8192', width: 90 },
431 { field: 'time8192L', type: 'string', displayName: 'QAM8192L', width: 90 }
434 data: 'modulation', onRegisterApi: function (gridApi) {
435 $scope.gridApi = gridApi;
439 //temperature configuration
440 $scope.gridOptionsTemperature = {
441 paginationPageSizes: [25, 100, 1000, 10000],
442 paginationPageSize: 25,
443 enablePaginationControls: true,
444 enableFiltering: true,
445 enableGridMenu: true,
448 { field: 'id', type: 'string', displayName: $translate.instant('MWTN_LP'), width: 300 },
449 { field: 'radioSignal', type: 'string', displayName: 'Radio Signal Id', width: 90 },
450 { field: 'scannerId', type: 'string', displayName: 'Scanner Id', width: 90 },
452 field: 'timestamp', type: 'string', displayName: 'Request time', width: 200, sort: {
453 direction: uiGridConstants.ASC,
457 { field: 'elapsedTime', type: 'string', displayName: 'Elapsed Time', width: 100 },
458 { field: 'period', type: 'string', displayName: 'Period', width: 200 },
459 { field: 'suspectInterval', type: 'string', displayName: 'Suspect Interval Flag', width: 100 },
460 { field: 'rfTempMin', type: 'string', displayName: 'Rf Temp Min [°C]', width: 90 },
461 { field: 'rfTempAvg', type: 'string', displayName: 'Rf Temp Avg [°C]', width: 90 },
462 { field: 'rfTempMax', type: 'string', displayName: 'Rf Temp Max [°C]', width: 90 }
469 $scope.gridOptionsSnir = {
470 paginationPageSizes: [25, 100, 1000, 10000],
471 paginationPageSize: 25,
472 enablePaginationControls: true,
473 enableFiltering: true,
474 enableGridMenu: true,
476 { field: 'layerProtocol', type: 'string', displayName: 'Layer Protocol Name', width: 90, visible: false},
477 { field: 'id', type: 'string', displayName: $translate.instant('MWTN_LP'), width: 300 },
478 { field: 'radioSignal', type: 'string', displayName: 'Radio Signal Id', width: 90 },
479 { field: 'scannerId', type: 'string', displayName: 'Scanner Id', width: 90 },
481 field: 'timestamp', type: 'string', displayName: 'Request time', width: 200, sort: {
482 direction: uiGridConstants.ASC,
486 { field: 'elapsedTime', type: 'string', displayName: 'Elapsed Time', width: 100 },
487 { field: 'period', type: 'string', displayName: 'Period', width: 200 },
488 { field: 'suspectInterval', type: 'string', displayName: 'Suspect Interval Flag', width: 100 },
489 { field: 'snirMin', type: 'string', displayName: [$translate.instant('MWTN_SNIR_MIN'),'[dB]'].join(' '), width: 90 },
490 { field: 'snirAvg', type: 'string', displayName: [$translate.instant('MWTN_SNIR_AVG'),'[dB]'].join(' '), width: 90 },
491 { field: 'snirMax', type: 'string', displayName: [$translate.instant('MWTN_SNIR_MAX'),'[dB]'].join(' '), width: 90 }
497 $scope.gridOptionsCrossPolarDiscrimination = {
498 paginationPageSizes: [25, 100, 1000, 10000],
499 paginationPageSize: 25,
500 enablePaginationControls: true,
501 enableFiltering: true,
502 enableGridMenu: true,
505 { field: 'id', type: 'string', displayName: $translate.instant('MWTN_LP'), width: 300 },
506 { field: 'radioSignal', type: 'string', displayName: 'Radio Signal Id', width: 90 },
507 { field: 'scannerId', type: 'string', displayName: 'Scanner Id', width: 90 },
509 field: 'timestamp', type: 'string', displayName: 'Request time', width: 200, sort: {
510 direction: uiGridConstants.ASC,
514 { field: 'elapsedTime', type: 'string', displayName: 'Elapsed Time', width: 100 },
515 { field: 'period', type: 'string', displayName: 'Period', width: 200 },
516 { field: 'suspectInterval', type: 'string', displayName: 'Suspect Interval Flag', width: 100 },
517 { field: 'xpdMin', type: 'string', displayName: 'CPD min [dB]', width: 90 },
518 { field: 'xpdAvg', type: 'string', displayName: 'CPD avg [dB]', width: 90 },
519 { field: 'xpdMax', type: 'string', displayName: 'CPD max [dB]', width: 90 }
525 //ethernet perf configuration
526 $scope.gridOptionsPerformanceEthernetContainer = {
527 paginationPageSizes: [25, 100, 1000, 10000],
528 paginationPageSize: 25,
529 enablePaginationControls: true,
530 enableFiltering: true,
531 enableGridMenu: true,
534 { field: 'id', type: 'string', displayName: $translate.instant('MWTN_LP'), width: 300 },
535 { field: 'scannerId', type: 'string', displayName: 'Scanner Id', width: 90 },
537 field: 'timestamp', type: 'string', displayName: 'Request time', width: 200, sort: {
538 direction: uiGridConstants.ASC,
542 { field: 'elapsedTime', type: 'string', displayName: 'Elapsed Time', width: 100 },
543 { field: 'period', type: 'string', displayName: 'Period', width: 200 },
544 { field: 'suspectInterval', type: 'string', displayName: 'Suspect Interval Flag', width: 100 },
545 { field: 'txEthernetBytesMaxS', type: 'number', displayName: 'Tx BytesMaxS', width: 90 },
546 { field: 'txEthernetBytesMaxM', type: 'number', displayName: 'Tx BytesMaxM', width: 90 },
547 { field: 'txEthernetBytesSum', type: 'number', displayName: 'Tx BytesSum', width: 90 }
550 data: 'performanceEthernetContainer'
553 var updatePart = function (spec, data, key) {
554 switch (spec.pacId) {
560 console.log(JSON.stringify(spec, JSON.stringify(data)));
561 updateAirInterface(data, key);
565 updateContainer(spec.layerProtocolId, spec.partId, data);
571 var refreshAirInterface = function (key) {
572 //get performance data from interfaces
573 for (var interf of $scope.airinterfaces) {
574 var airIterfaceSpec = {
575 nodeId: $scope.networkElementId,
576 revision: $scope.revision,
577 pacId: 'airinterface',
578 partId: 'CurrentPerformance',
579 layerProtocolId: interf.layerProtocol
581 $mwtnPerformanceCurrent.getPacParts(airIterfaceSpec).then(function (data) {
582 var yangfiedObj = $mwtnPerformanceCurrent.yangifyObject(data);
583 updatePart(airIterfaceSpec, yangfiedObj, key);
588 $scope.collapseAll = function () {
590 Object.keys($scope.status).map(function (group) {
591 $scope.status[group] = false;
593 Object.keys($scope.spinner).map(function (group) {
594 $scope.spinner[group] = false;
599 $scope.status = { performanceEthernetContainer: true };
601 $scope.separator = $mwtnPerformanceCurrent.separator; //' '
603 //get data on ne selection
604 $scope.$watch('networkElement', function (neId, oldValue) {
605 if (neId && neId !== '' && neId !== oldValue) {
606 $scope.collapseAll();
608 // clear lists visible on screen
609 $scope.performance826 = [];
610 $scope.receiveLevel = [];
611 $scope.transmissionLevel = [];
612 $scope.modulation = [];
613 $scope.temperature = [];
616 $scope.jsonvalue = [];
617 $scope.performanceEthernetContainer = [];
618 $scope.ethernetJsonValue = [];
621 $scope.networkElements.map(function (ne) {
622 if (ne.id === neId) revision = ne.revision;
624 $scope.networkElementId = neId;
625 $scope.revision = revision;
634 $mwtnPerformanceCurrent.getPacParts(spec).then(function (success) {
635 var yangfiedObj = $mwtnPerformanceCurrent.yangifyObject(success);
637 updatePart(spec, yangfiedObj);
639 //get performance data from interfaces
640 $scope.airinterfaces.map(function(airInterface) {
642 //get configuration for airinterfaces
643 var airIterfaceSpec = {
646 pacId: 'airinterface',
647 partId: 'Configuration',
648 layerProtocolId: airInterface.layerProtocol
651 //get radioSignalID and add it to map
652 $mwtnPerformanceCurrent.getPacParts(airIterfaceSpec).then(function (data) {
653 var yangfiedObj = $mwtnPerformanceCurrent.yangifyObject(data);
654 radioSignalMap.set(yangfiedObj['layer-protocol'], yangfiedObj['air-interface-configuration']['radio-signal-id']);
658 }, function (error) {
659 updatePart(spec, error);
664 $scope.$watch('layerProtocol', function (newValue, oldValue) {
666 if (newValue && oldValue !== "" && newValue !== oldValue) {
667 $scope.collapseAll();
672 //update data within tables on accordion - open
673 $scope.$watch('status', function (status, oldValue) {
674 Object.keys(status).map(function (key) {
675 if ($scope.networkElementId && status[key] && status[key] !== oldValue[key]) {
678 case 'performance826':
679 $scope.performance826 = [];
680 refreshAirInterface(key);
684 $scope.receiveLevel = [];
685 refreshAirInterface(key);
688 case 'transmissionLevel':
689 $scope.transmissionLevel = [];
690 refreshAirInterface(key);
694 $scope.modulation = [];
695 refreshAirInterface(key);
699 $scope.temperature = [];
700 refreshAirInterface(key);
705 refreshAirInterface(key);
708 case 'crossPolarDiscrimination':
710 refreshAirInterface(key);
713 case 'performanceEthernetContainer':
714 $scope.performanceEthernetContainer = [];
715 $scope.ethernetJsonValue = [];
717 //get performance data for ethernet
718 $scope.ethernets.map(function (item) {
720 nodeId: $scope.networkElementId,
721 revision: $scope.revision,
723 partId: 'CurrentPerformance',
724 layerProtocolId: item.layerProtocol
727 $mwtnPerformanceCurrent.getPacParts(ethernetSpec).then(function (data) {
728 var yangfiedObj = $mwtnPerformanceCurrent.yangifyObject(data);
729 updatePart(ethernetSpec, yangfiedObj);
735 $window.dispatchEvent(new Event("resize"));