2 * Copyright (c) 2016 Cisco Systems, Inc. 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
13 'app/vpp/services/vpp.services',
14 'app/vpp/services/inventory.service',
15 'app/vpp/services/bdm.service',
16 'app/vpp/services/bdm.bridgedomain.service',
17 'app/vpp/services/bdm.interface.service',
18 'app/vpp/services/bdm.vpp.service',
20 'app/vpp/controllers/inventory.controller',
21 'app/vpp/controllers/bdm.controller',
22 'app/vpp/controllers/bdm.bridgedomain.controller',
23 'app/vpp/controllers/bdm.vpp.controller',
24 'app/vpp/controllers/bdm.interface.controller'
28 define(modules, function(vpp) {
30 vpp.controller('vppCtrl', ['$scope', '$rootScope', '$timeout', 'toastService', '$mdSidenav', '$mdDialog',
31 function ($scope, $rootScope, $timeout, toastService, $mdSidenav, $mdDialog) {
33 $rootScope['section_logo'] = 'src/app/vpp/assets/images/vpp.gif';
34 $scope.view_path = 'src/app/vpp/views/';
36 $scope.mainView = "inventory";
37 $scope.selectedVpp = null;
39 $scope.setMainView = function(viewName) {
40 $scope.mainView = viewName;
43 $scope.selectVpp = function(vpp) {
44 $scope.selectedVpp = vpp;
45 $scope.$broadcast('RELOAD_SELECTED_VPP');
48 // filter used in inventory to filter interfaceList of vxlan_tunnel interfaces
49 $scope.filterRemoveVxlanIf = function (item) {
50 return item.name.indexOf('vxlan') !== 0;
53 // filter used in inventory to return vxlan_tunnel interfaces
54 $scope.filterGetVxlanIf = function (item) {
55 return item.name.indexOf('vxlan') === 0;