diff options
author | 2016-02-09 20:16:14 +0100 | |
---|---|---|
committer | 2016-02-09 22:03:21 +0000 | |
commit | 514939ff19a8838e45934f90af039fbeea12fd40 (patch) | |
tree | 1bd242504dc8ecf862c66a0abefd4775ccde71b4 /vbd/gui/module/src/main/resources/vpp/controllers | |
parent | 5aa62ee7d2be070b2ffef0443b59c8891ed06845 (diff) |
Design changes p. 1
- fixed some design flaws
- added tunnel table into inventory detail
- added filter to remove vxlan_tunnel from interfaces list in bd mnager
Change-Id: Ia9f0ca737d062ed2ed57734561dbece34d20b7c3
Signed-off-by: Daniel Malachovsky <daniel.malachovsky@pantheon.sk>
Diffstat (limited to 'vbd/gui/module/src/main/resources/vpp/controllers')
3 files changed, 35 insertions, 22 deletions
diff --git a/vbd/gui/module/src/main/resources/vpp/controllers/bdm.controller.js b/vbd/gui/module/src/main/resources/vpp/controllers/bdm.controller.js index e5ad012fa..7c24690c5 100644 --- a/vbd/gui/module/src/main/resources/vpp/controllers/bdm.controller.js +++ b/vbd/gui/module/src/main/resources/vpp/controllers/bdm.controller.js @@ -182,7 +182,7 @@ define(['app/vpp/vpp.module'], function(vpp) { /* FIXME: remove after testing */ - /*$scope.deploy = function() { + $scope.deploy = function() { var successfulRequestsRequired = dataService.changedInterfaces.length; var successfulRequests = 0; @@ -253,7 +253,7 @@ define(['app/vpp/vpp.module'], function(vpp) { successfulRequests++; } }); - };*/ + }; $scope.removeBd = function() { if(dataService.selectedBd.name) { diff --git a/vbd/gui/module/src/main/resources/vpp/controllers/inventory.controller.js b/vbd/gui/module/src/main/resources/vpp/controllers/inventory.controller.js index 7f2a4ec0c..b1797534a 100644 --- a/vbd/gui/module/src/main/resources/vpp/controllers/inventory.controller.js +++ b/vbd/gui/module/src/main/resources/vpp/controllers/inventory.controller.js @@ -20,7 +20,7 @@ define(['app/vpp/vpp.module'], function(vpp) { $scope.vppList = data; $scope.displayVppList = [].concat($scope.vppList); dataService.vpps = $scope.vppList; - +console.log($scope.vppList); $scope.$broadcast('RELOAD_VPP_TABLE'); //for vppList access in BDM @@ -222,28 +222,31 @@ define(['app/vpp/vpp.module'], function(vpp) { $scope.app.container(document.getElementById('next-vpp-topo')); $scope.topo.attach($scope.app); - $scope.$watch('selectedVpp', function() { - vm.vpp = vpp; - vm.vpp.type = 'vpp'; - vm.vpp.label = vm.vpp.name; - - var nodes = [].concat(vm.vpp); - var links = []; - - _.forEach(vm.vpp.interfaces, function(interf, index){ - interf.label = interf.name; - interf.scale = 0.5; - nodes.push(interf); - links.push({source: 0, target: index + 1}); - }); - - $scope.topo.data({ - nodes: nodes, - links: links - }); + }; + + $scope.fillTopologyData = function(vpp) { + var nodes = [].concat(vpp); + var links = []; + vpp.type = 'vpp'; + vpp.label = vpp.name; + + _.forEach(vpp.interfaces, function(interf, index){ + interf.label = interf.name; + interf.scale = 0.5; + nodes.push(interf); + links.push({source: 0, target: index + 1}); + }); + + $scope.topo.data({ + nodes: nodes, + links: links }); }; + $scope.$watch('selectedVpp', function() { + $scope.fillTopologyData($scope.selectedVpp); + }); + $scope.viewTopology($scope.selectedVpp); }]); diff --git a/vbd/gui/module/src/main/resources/vpp/controllers/vpp.controller.js b/vbd/gui/module/src/main/resources/vpp/controllers/vpp.controller.js index 2d968f757..16ce20402 100644 --- a/vbd/gui/module/src/main/resources/vpp/controllers/vpp.controller.js +++ b/vbd/gui/module/src/main/resources/vpp/controllers/vpp.controller.js @@ -45,6 +45,16 @@ define(modules, function(vpp) { $scope.$broadcast('RELOAD_SELECTED_VPP'); }; + // filter used in inventory to filter interfaceList of vxlan_tunnel interfaces + $scope.filterRemoveVxlanIf = function (item) { + return item.name.indexOf('vxlan') !== 0; + }; + + // filter used in inventory to return vxlan_tunnel interfaces + $scope.filterGetVxlanIf = function (item) { + return item.name.indexOf('vxlan') === 0; + }; + }]); |