summaryrefslogtreecommitdiffstats
path: root/vbd/gui/module/src/main/resources/vpp/controllers/inventory.controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'vbd/gui/module/src/main/resources/vpp/controllers/inventory.controller.js')
-rw-r--r--vbd/gui/module/src/main/resources/vpp/controllers/inventory.controller.js104
1 files changed, 3 insertions, 101 deletions
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