2 * Copyright (c) 2017 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/onapAai/onapAai.module',
10 'app/onapAai/onapAai.services'],
11 function (onapAaiApp) {
13 onapAaiApp.register.controller('onapAaiCtrl', ['uiGridConstants', '$uibModal', '$scope', '$rootScope', '$window', '$timeout', '$onapAai', '$mwtnLog',
14 function (uiGridConstants, $uibModal, $scope, $rootScope, $window, $timeout, $onapAai, $mwtnLog) {
16 var COMPONENT = 'onapAaiCtrl';
17 $mwtnLog.info({ component: COMPONENT, message: 'onapAaiCtrl started!' });
19 $rootScope.section_logo = 'src/app/onapAai/images/onapAai.png'; // Add your topbar logo location here such as 'assets/images/logo_topology.gif'
21 $scope.highlightFilteredHeader = $onapAai.highlightFilteredHeader;
24 $scope.gridOptions = JSON.parse(JSON.stringify($onapAai.gridOptions));
25 $scope.gridOptions.columnDefs = [
26 { field: 'pnf-id', type: 'string', displayName: 'ID', headerCellClass: $scope.highlightFilteredHeader, width: 170 },
27 { field: 'pnf-name', type: 'string', displayName: 'Name', headerCellClass: $scope.highlightFilteredHeader, width: 200 },
28 { field: 'equip-type', type: 'string', displayName: 'Type', headerCellClass: $scope.highlightFilteredHeader, width: 160 },
29 { field: 'equip-vendor', type: 'string', displayName: 'Vendor', headerCellClass: $scope.highlightFilteredHeader, width: 100 },
30 { field: 'equip-model', type: 'string', displayName: 'Model', headerCellClass: $scope.highlightFilteredHeader, width: 160 },
31 { field: 'ipaddress-v4-oam', type: 'string', displayName: 'If OAM', headerCellClass: $scope.highlightFilteredHeader, width: 140 },
32 { field: 'in-maint', type: 'string', displayName: 'Maintenance', headerCellClass: $scope.highlightFilteredHeader, width: 100 },
33 { field: 'interfaces', type: 'string', displayName: '#p-interfaces', headerCellClass: $scope.highlightFilteredHeader, width: 100, visible: false },
34 { field: 'resourceVersion', type: 'string', displayName: 'Resource version', headerCellClass: $scope.highlightFilteredHeader, width: 100, visible: false }
37 $onapAai.getAaiPnfs().then(function(success){
38 $scope.gridOptions.data = success.data.pnf;
39 $scope.gridOptions.data.map(function(item){