From 37c09259c1958fe5ed7c28bc24f593577070bbcb Mon Sep 17 00:00:00 2001 From: Daniel Malachovsky Date: Mon, 8 Feb 2016 19:05:54 +0100 Subject: Initial commit of vBd Manager functions. - Bug Fixes for graphical manipulation. Fix req'd for unassigning pre-assigned. - Fixed Graphical issues, interface, vpp and vBD manipulation - Added REST functionality, GUI enhancements and squashed a few bugs. - reworked assigning and unassigning IF to vBD Change-Id: Ice13835699455439f6ab49a18facb49f7a16b7ef Signed-off-by: Varun Seereeram Signed-off-by: Daniel Malachovsky --- .../vpp/controllers/inventory.controller.js | 104 +-------------------- 1 file changed, 3 insertions(+), 101 deletions(-) (limited to 'vbd/gui/module/src/main/resources/vpp/controllers/inventory.controller.js') 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 c8ca1e575..7f2a4ec0c 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 @@ -22,6 +22,9 @@ define(['app/vpp/vpp.module'], function(vpp) { dataService.vpps = $scope.vppList; $scope.$broadcast('RELOAD_VPP_TABLE'); + + //for vppList access in BDM + dataService.vpps = $scope.vppList; }, // error callback function(res) { @@ -33,105 +36,8 @@ define(['app/vpp/vpp.module'], function(vpp) { $scope.initVppList = function() { $scope.vppList = []; $scope.displayVppList = []; - - //setting reference for vpp access in BDM - //dataService.vpps = $scope.vppList; }; - /*$scope.viewTopology = function(vpp) { - $mdDialog.show({ - controller: function() { - var vm = this; - - $scope.topo = new nx.graphic.Topology({ - height: 350, - width: 500, - scalable: true, - theme:'blue', - enableGradualScaling:true, - nodeConfig: { - color: '#414040', - label: 'model.label', - scale: 'model.scale', - iconType: function(vertex) { - var type = vertex.get().type; - if (type === 'bd') { - return 'bd' - } else if (type === 'vpp') { - return 'switch' - } else { - return 'interf'; - } - } - }, - linkConfig: { - label: 'model.label', - linkType: 'parallel', - color: function(link) { - if (link.getData().type === 'tunnel') { - return '#00FF00'; - } else { - return '#414040'; - } - }, - width: function(link) { - if (link.getData().type === 'tunnel') { - return 5; - } - } - }, - showIcon: true, - dataProcessor: 'force', - autoLayout: true, - enableSmartNode: false, - tooltipManagerConfig: { - nodeTooltipContentClass: 'TooltipNode', - linkTooltipContentClass: 'TooltipLink' - } - }); - $scope.app = new nx.ui.Application; - - 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}); - }); - - console.log(vpp); - console.log(nodes); - console.log(links); - - $scope.topo.data({ - nodes: nodes, - links: links - }); - - this.close = function() { - $mdDialog.cancel(); - }; - - }, - onComplete: function() { - console.log(document.getElementById('next-vpp-topo')); - $scope.app.container(document.getElementById('next-vpp-topo')); - $scope.topo.attach($scope.app); - - }, - templateUrl: $scope.view_path + 'vpp-topo.html', - controllerAs: 'VppTopoCtrl', - parent: angular.element(document.body), - clickOutsideToClose:true - }) - };*/ - $scope.addVppShowForm = function() { $mdDialog.show({ controller: function() { @@ -340,9 +246,5 @@ define(['app/vpp/vpp.module'], function(vpp) { $scope.viewTopology($scope.selectedVpp); - /*$scope.$on('RELOAD_SELECTED_VPP', function(event) { - $scope.viewTopology($scope.selectedVpp); - });*/ - }]); }); \ No newline at end of file -- cgit 1.2.3-korg