-var modules = ['app/gbp/gbp.module',
- 'app/gbp/gbp.services'
+var modules = ['app/gbp-old/gbp.module',
+ 'app/gbp-old/gbp.services'
];
-define(modules, function(gbp) {
+define(modules, function(gbpOld) {
- gbp.register.controller('gbpCtrl', ['$scope', '$rootScope', 'GBPTenantServices','DesignGbpFactory', 'GBPConstants',
+ gbpOld.register.controller('gbpCtrl', ['$scope', '$rootScope', 'GBPTenantServices','DesignGbpFactory', 'GBPConstants',
function ($scope, $rootScope, GBPTenantServices, DesignGbpFactory, GBPConstants) {
$rootScope['section_logo'] = 'logo_gbp';
- $scope.view_path = 'src/app/gbp/views/';
+ $scope.view_path = 'src/app/gbp-old/views/';
$scope.mainView = {
main: true,
}]);
- gbp.register.controller('governanceCtrl', ['$rootScope','$scope',
+ gbpOld.register.controller('governanceCtrl', ['$rootScope','$scope',
function ($rootScope, $scope) {
$scope.menuTpl = 'main-menu';
$scope.menuBox = null;
$scope.toggleExpanded = function(expand, menu, tplType){
var type = tplType ? tplType : 'contentTpl';
$scope.menuBox = null;
-
+
$scope[type] = expand;
if ( menu && menu === false ) {
}
};
-
+
$scope.setViewContent = function(tplName, data, broadcast, tplType) {
if ( angular.isFunction(objClickAction[tplName]) ) {
objClickAction[tplName]();
}
-
+
};
}]);
- gbp.register.controller('boxStaticCtrl',['$scope',
+ gbpOld.register.controller('boxStaticCtrl',['$scope',
function($scope){
$scope.selectedObj = null;
}]);
- gbp.register.controller('graphCtrl', ['$scope', function($scope){
+ gbpOld.register.controller('graphCtrl', ['$scope', function($scope){
var paper = null,
paperScale = 1;
paper.scale(paperScale, paperScale);
};
-
+
$scope.loadMouseScrollEvent = function(){
/*mouse wheel event for zooming*/
else {graph.attachEvent("onmousewheel", MouseWheelHandler);}
/*mouse wheel event for zooming - end*/
};
-
+
}]);
- gbp.register.controller('expressedPolicyCtrl', ['$scope', 'JointGraphFactory', 'JointGraphOffsetFactory', 'GBPConstants',
+ gbpOld.register.controller('expressedPolicyCtrl', ['$scope', 'JointGraphFactory', 'JointGraphOffsetFactory', 'GBPConstants',
function ($scope, JointGraphFactory, JointGraphOffsetFactory, GBPConstants) {
var paper = JointGraphFactory.createGraph(),
epgItems = [],
}
};
- paper.on('cell:pointerdown', function(cell) {
+ paper.on('cell:pointerdown', function(cell) {
if ( angular.isFunction(objClickAction[cell.model.attributes.objType]) ) {
objClickAction[cell.model.attributes.objType](cell.model.attributes.objData);
}
createEpgLinks(e, item, contractItems);
});
-
+
}
offsetHobj.epg = JointGraphOffsetFactory.getCurrentOffset(itemsArray.contract, 'y');
JointGraphFactory.reloadGraph(paper.model);
}
});
-
+
loadData();
}]);
- gbp.register.controller('deliveredPolicyCtrl', ['$scope', 'GPBServices', 'JointGraphFactory', 'GBPGovernanceServices', 'JointGraphOffsetFactory', 'GBPConstants',
+ gbpOld.register.controller('deliveredPolicyCtrl', ['$scope', 'GPBServices', 'JointGraphFactory', 'GBPGovernanceServices', 'JointGraphOffsetFactory', 'GBPConstants',
function ($scope, GPBServices, JointGraphFactory, GBPGovernanceServices, JointGraphOffsetFactory, GBPConstants) {
var paper = JointGraphFactory.createGraph(),
providerItems = {},
$scope.setViewContent('epg-detail', { ep: data, epList: getEpList() }, 'SET_SELECTED_EPG','contentTpl');
},
subject: function(data) {
- var obj = { subject: data,
+ var obj = { subject: data,
subjList: Object.keys(subjectItems).map(function (k) {
return subjectItems[k].attributes.objData;
}),
}
};
- paper.on('cell:pointerdown', function(cell) {
+ paper.on('cell:pointerdown', function(cell) {
if ( angular.isFunction(objClickAction[cell.model.attributes.objType]) ) {
objClickAction[cell.model.attributes.objType](cell.model.attributes.objData);
}
});
- paper.on('cell:pointerdblclick', function(cell) {
+ paper.on('cell:pointerdblclick', function(cell) {
objDblClickAction[cell.model.attributes.objType](cell.model.attributes.objData);
});
consumerItems = {};
subjectItems = {};
- var classifierInstances = $scope.selectedTenant['subject-feature-instances'] &&
- $scope.selectedTenant['subject-feature-instances']['classifier-instance'] &&
+ var classifierInstances = $scope.selectedTenant['subject-feature-instances'] &&
+ $scope.selectedTenant['subject-feature-instances']['classifier-instance'] &&
$scope.selectedTenant['subject-feature-instances']['classifier-instance'].length > 0 ? $scope.selectedTenant['subject-feature-instances']['classifier-instance'] : [];
var offsetObj = {
loadData();
}]);
- gbp.register.controller('subjectDetailCtrl', ['$scope', 'GPBServices', 'JointGraphFactory', 'GBPGovernanceServices', 'JointGraphOffsetFactory', 'GBPConstants',
+ gbpOld.register.controller('subjectDetailCtrl', ['$scope', 'GPBServices', 'JointGraphFactory', 'GBPGovernanceServices', 'JointGraphOffsetFactory', 'GBPConstants',
function ($scope, GPBServices, JointGraphFactory, GBPGovernanceServices, JointGraphOffsetFactory, GBPConstants) {
$scope.selectedSubject = null;
$scope.subjectList = [];
JointGraphFactory.addItem(paper.model, linkItem);
};
- paper.on('cell:pointerdown', function(cell) {
+ paper.on('cell:pointerdown', function(cell) {
var objClickAction = {
subject: function(data){
$scope.setViewContent('subject-content-static',data, 'SET_SEL_STA_OBJ', 'menuBox');
loadData();
}]);
- gbp.register.controller('epgDetailCtrl', ['$scope', 'JointGraphFactory', 'TopologyDataLoaders', 'GBPEpgServices', 'JointGraphOffsetFactory', 'GBPConstants',
+ gbpOld.register.controller('epgDetailCtrl', ['$scope', 'JointGraphFactory', 'TopologyDataLoaders', 'GBPEpgServices', 'JointGraphOffsetFactory', 'GBPConstants',
function ($scope, JointGraphFactory, TopologyDataLoaders, GBPEpgServices, JointGraphOffsetFactory, GBPConstants) {
var paper = JointGraphFactory.createGraph(),
epgItem = {},
loadData();
};
- paper.on('cell:pointerdown', function(cell) {
+ paper.on('cell:pointerdown', function(cell) {
var objClickAction = {
ep: function(data){
$scope.setViewContent('ep-content-static',data, 'SET_SEL_STA_OBJ', 'menuBox');
// init();
}]);
- gbp.register.controller('policyRendererCtrl', ['$scope', '$http', '$timeout', 'PGNServices', 'TopoServices', 'GBPTenantServices', 'GBPConstants', 'JointGraphFactory','GBPJointGraphBuilder',
+ gbpOld.register.controller('policyRendererCtrl', ['$scope', '$http', '$timeout', 'PGNServices', 'TopoServices', 'GBPTenantServices', 'GBPConstants', 'JointGraphFactory','GBPJointGraphBuilder',
function ($scope, $http, $timeout, PGNServices, TopoServices, GBPTenantServices, GBPConstants, JointGraphFactory, GBPJointGraphBuilder) {
-
+
$scope.topologyData = { nodes: [], links: [] };
$scope.topologyType = null;
$scope.topologyArgs = {};
errors.int32 = !(parseInt(value) >= -2147483648 && parseInt(value) <= 2147483647);
};
-
+
$scope.validateForm = function(form) {
return form.$valid;
};
-
+
$scope.$on('GBP_TENANT_RELOAD', function(e, obj){
$scope.selectedTenant = obj;
});
}]);
- gbp.register.controller('linkDataCtrl',['$scope', function($scope){
+ gbpOld.register.controller('linkDataCtrl',['$scope', function($scope){
$scope.showTable = false;
$scope.show = function(){
$scope.close = function(){
$scope.showTable = false;
};
-
+
$scope.$on('SET_LINK_DATA', function(e, obj){
$scope.linkData = obj;
$scope.show();
});
}]);
- gbp.register.controller('crudCtrl',['$scope', function($scope){
+ gbpOld.register.controller('crudCtrl',['$scope', function($scope){
$scope.selectedObj = null;
$scope.label = '';
$scope.q = {};
});
}]);
- gbp.register.controller('contractCtrl', ['$scope','GBPContractServices', '$filter', function($scope, GBPContractServices, $filter){
+ gbpOld.register.controller('contractCtrl', ['$scope','GBPContractServices', '$filter', function($scope, GBPContractServices, $filter){
$scope.list = [];
$scope.selectedContract = null;
$scope.newContractObj = GBPContractServices.createObj();
if ( $scope.selectedTenant ) {
$scope.selectedContract = null;
path = GBPContractServices.createPathObj($scope.selectedTenant.id);
-
+
GBPContractServices.load(path, function(data){
$scope.list = data;
// $scope.$broadcast('GBP_CONTRACT_RELOAD');
});
}]);
- gbp.register.controller('clauseCtrl', ['$scope','GBPClauseServices', 'GBPSubjectServices',
+ gbpOld.register.controller('clauseCtrl', ['$scope','GBPClauseServices', 'GBPSubjectServices',
function($scope, GBPClauseServices, GBPSubjectServices){
$scope.list = [];
$scope.selectedClause = null;
$scope.init = function() {
if ( $scope.selectedContract ) {
path = GBPClauseServices.createPathObj($scope.selectedTenant.id, $scope.selectedContract.id);
-
+
GBPClauseServices.load(path, function(data){
$scope.list = data;
}, function(){
$scope.internalView.clause = false;
$scope.internalView.edit = "view";
}
-
+
if($scope.internalView.clause) {
angular.copy(selectedObj, $scope.newClauseObj);
}
});
}]);
- gbp.register.controller('subjectCtrl', ['$scope','GBPSubjectServices', '$filter', function($scope, GBPSubjectServices, $filter){
+ gbpOld.register.controller('subjectCtrl', ['$scope','GBPSubjectServices', '$filter', function($scope, GBPSubjectServices, $filter){
$scope.list = [];
$scope.selectedSubject = null;
$scope.newSubjectObj = GBPSubjectServices.createObj();
if ( $scope.selectedContract ) {
$scope.selectedSubject = null;
path = GBPSubjectServices.createPathObj($scope.selectedTenant.id, $scope.selectedContract.id);
-
+
GBPSubjectServices.load(path, function(data){
$scope.list = data;
$scope.sendReloadEventFromRoot('GBP_SUBJECT_RELOAD');
});
}]);
- gbp.register.controller('ruleCtrl', ['$scope','GBPRuleServices', '$filter', function($scope, GBPRuleServices, $filter){
+ gbpOld.register.controller('ruleCtrl', ['$scope','GBPRuleServices', '$filter', function($scope, GBPRuleServices, $filter){
$scope.list = [];
$scope.selectedRule = null;
$scope.newRuleObj = GBPRuleServices.createObj();
if ( $scope.selectedSubject ) {
$scope.selectedRule = null;
path = GBPRuleServices.createPathObj($scope.selectedTenant.id, $scope.selectedContract.id, $scope.selectedSubject.name);
-
+
GBPRuleServices.load(path, function(data){
$scope.list = data;
}, function(){
});
}]);
- gbp.register.controller('actionRefCtrl', ['$scope','GBPActionRefsServices', 'GBPActionInstanceServices', '$filter', function($scope, GBPActionRefsServices, GBPActionInstanceServices, $filter){
+ gbpOld.register.controller('actionRefCtrl', ['$scope','GBPActionRefsServices', 'GBPActionInstanceServices', '$filter', function($scope, GBPActionRefsServices, GBPActionInstanceServices, $filter){
$scope.list = [];
$scope.selectedActionRef = null;
$scope.newActionRefObj = GBPActionRefsServices.createObj();
if ( $scope.selectedRule ) {
$scope.selectedActionRef = null;
path = GBPActionRefsServices.createPathObj($scope.selectedTenant.id, $scope.selectedContract.id, $scope.selectedSubject.name, $scope.selectedRule.name);
-
+
GBPActionRefsServices.load(path, function(data){
$scope.list = data;
}, function(){
});
}]);
- gbp.register.controller('classifierRefCtrl', ['$scope','GBPClassifierRefsServices', 'GBPClassifierInstanceServices', '$filter', function($scope, GBPClassifierRefsServices, GBPClassifierInstanceServices, $filter){
+ gbpOld.register.controller('classifierRefCtrl', ['$scope','GBPClassifierRefsServices', 'GBPClassifierInstanceServices', '$filter', function($scope, GBPClassifierRefsServices, GBPClassifierInstanceServices, $filter){
$scope.list = [];
$scope.selectedClassifierRef = null;
$scope.newClassifierRefObj = GBPClassifierRefsServices.createObj();
if ( $scope.selectedRule ) {
$scope.selectedClassifierRef = null;
path = GBPClassifierRefsServices.createPathObj($scope.selectedTenant.id, $scope.selectedContract.id, $scope.selectedSubject.name, $scope.selectedRule.name);
-
+
GBPClassifierRefsServices.load(path, function(data){
});
}]);
- gbp.register.controller('tenantCtrl', ['$scope', 'GBPTenantServices', '$filter', function($scope, GBPTenantServices, $filter){
+ gbpOld.register.controller('tenantCtrl', ['$scope', 'GBPTenantServices', '$filter', function($scope, GBPTenantServices, $filter){
$scope.list = [];
$scope.selectedTenantObj = null;
$scope.newTenantObj = GBPTenantServices.createObj();
});
}]);
- gbp.register.controller('epgCtrl',['$scope', 'GBPEpgServices', 'GBPContractServices', '$filter',
+ gbpOld.register.controller('epgCtrl',['$scope', 'GBPEpgServices', 'GBPContractServices', '$filter',
function($scope, GBPEpgServices, GBPContractServices, $filter){
$scope.selectedEpg = null;
$scope.newEpgObj = GBPEpgServices.createObj();
$scope.init = function() {
if ($scope.selectedTenant) {
path = GBPEpgServices.createPathObj($scope.selectedTenant.id);
-
+
GBPEpgServices.load(path, function(data){
$scope.list = data;
// $scope.$broadcast('GBP_EPG_RELOAD');
});
}]);
- gbp.register.controller('cnsCtrl',['$scope', 'GBPConNamedSelServices', function($scope, GBPConNamedSelServices){
+ gbpOld.register.controller('cnsCtrl',['$scope', 'GBPConNamedSelServices', function($scope, GBPConNamedSelServices){
$scope.list = [];
$scope.selectedCNS = null;
$scope.newCNSObj = GBPConNamedSelServices.createObj();
});
}]);
- gbp.register.controller('pnsCtrl',['$scope', 'GBPProNamedSelServices', function($scope, GBPProNamedSelServices){
+ gbpOld.register.controller('pnsCtrl',['$scope', 'GBPProNamedSelServices', function($scope, GBPProNamedSelServices){
$scope.list = [];
$scope.selectedPNS = null;
$scope.newPNSObj = GBPProNamedSelServices.createObj();
$scope.init = function() {
if ($scope.selectedTenant && $scope.selectedEpg) {
path = GBPProNamedSelServices.createPathObj($scope.selectedTenant.id, $scope.selectedEpg.id);
-
+
GBPProNamedSelServices.load(path, function(data){
$scope.list = data;
}, function(){
$scope.internalView.pns = false;
$scope.internalView.edit = "view";
}
-
+
if($scope.internalView.pns) {
angular.copy(selectedObj, $scope.newPNSObj);
}
});
}]);
- gbp.register.controller('l2FloodCtrl', ['$scope', 'GBPL2FloodDomainServices', 'GBPL2BridgeDomainServices', '$filter', function($scope, GBPL2FloodDomainServices, GBPL2BridgeDomainServices, $filter){
+ gbpOld.register.controller('l2FloodCtrl', ['$scope', 'GBPL2FloodDomainServices', 'GBPL2BridgeDomainServices', '$filter', function($scope, GBPL2FloodDomainServices, GBPL2BridgeDomainServices, $filter){
$scope.list = [];
$scope.selectedL2Flood = null;
$scope.newL2FloodObj = GBPL2FloodDomainServices.createObj();
$scope.init = function() {
if ( $scope.selectedTenant ) {
path = GBPL2FloodDomainServices.createPathObj($scope.selectedTenant.id);
-
+
GBPL2FloodDomainServices.load(path, function(data){
$scope.list = data;
// clear objects
});
}]);
- gbp.register.controller('l2BridgeCtrl', ['$scope', 'GBPL2BridgeDomainServices', 'GBPL3ContextServices', '$filter', function($scope, GBPL2BridgeDomainServices, GBPL3ContextServices, $filter){
+ gbpOld.register.controller('l2BridgeCtrl', ['$scope', 'GBPL2BridgeDomainServices', 'GBPL3ContextServices', '$filter', function($scope, GBPL2BridgeDomainServices, GBPL3ContextServices, $filter){
$scope.list = [];
$scope.selectedL2Bridge = null;
$scope.newL2BridgeObj = GBPL2BridgeDomainServices.createObj();
$scope.init = function() {
if ( $scope.selectedTenant ) {
path = GBPL2BridgeDomainServices.createPathObj($scope.selectedTenant.id);
-
+
GBPL2BridgeDomainServices.load(path, function(data){
$scope.list = data;
$scope.newL2BridgeObj = GBPL2BridgeDomainServices.createObj();
});
}]);
- gbp.register.controller('l3ContextCtrl', ['$scope', 'GBPL3ContextServices', '$filter', function($scope, GBPL3ContextServices, $filter){ //GBPContractServices
+ gbpOld.register.controller('l3ContextCtrl', ['$scope', 'GBPL3ContextServices', '$filter', function($scope, GBPL3ContextServices, $filter){ //GBPContractServices
$scope.list = [];
$scope.selectedL3Context = null;
$scope.newL3ContextObj = GBPL3ContextServices.createObj();
$scope.init = function() {
if ( $scope.selectedTenant ) {
path = GBPL3ContextServices.createPathObj($scope.selectedTenant.id);
-
+
GBPL3ContextServices.load(path, function(data){
$scope.list = data;
$scope.newL3ContextObj = GBPL3ContextServices.createObj();
$scope.reload = function(selectedObj) {
$scope.selectedL3Context = selectedObj;
-
+
$scope.view.edit = $scope.view.edit == "edit" ? $scope.view.edit : "view";
if(selectedObj){
$scope.view.l3context = true;
});
}]);
- gbp.register.controller('subnetCtrl', ['$scope', 'GBPSubnetServices', 'GBPL2FloodDomainServices', 'GBPL2BridgeDomainServices', 'GBPL3ContextServices', '$filter', function($scope, GBPSubnetServices, GBPL2FloodDomainServices, GBPL2BridgeDomainServices, GBPL3ContextServices, $filter){
+ gbpOld.register.controller('subnetCtrl', ['$scope', 'GBPSubnetServices', 'GBPL2FloodDomainServices', 'GBPL2BridgeDomainServices', 'GBPL3ContextServices', '$filter', function($scope, GBPSubnetServices, GBPL2FloodDomainServices, GBPL2BridgeDomainServices, GBPL3ContextServices, $filter){
$scope.list = [];
$scope.selectedSubnet = null;
$scope.newSubnetObj = GBPSubnetServices.createObj();
$scope.init = function() {
if ( $scope.selectedTenant ) {
path = GBPSubnetServices.createPathObj($scope.selectedTenant.id);
-
+
GBPSubnetServices.load(path, function(data){
$scope.list = data;
$scope.newSubnetObj = GBPSubnetServices.createObj();
$scope.reload = function(selectedObj) {
$scope.selectedSubnet = selectedObj;
-
+
$scope.view.edit = $scope.view.edit == "edit" ? $scope.view.edit : "view";
if(selectedObj){
$scope.view.subnet = true;
$scope.$on('GBP_GATEWAY_RELOAD',function(){
$scope.init();
});
-
+
$scope.$on('GBP_L3CONTEXT_RELOAD',function(){
loadL2L3List();
});
});
}]);
- gbp.register.controller('gatewayCtrl', ['$scope', 'GBPGatewayServices', function($scope, GBPGatewayServices){
+ gbpOld.register.controller('gatewayCtrl', ['$scope', 'GBPGatewayServices', function($scope, GBPGatewayServices){
$scope.list = [];
$scope.gatewayView = false;
$scope.selectedGateway = null;
$scope.init = function() {
if ( $scope.selectedTenant && $scope.selectedSubnet ) {
path = GBPGatewayServices.createPathObj($scope.selectedTenant.id, $scope.selectedSubnet.id);
-
+
GBPGatewayServices.load(path, function(data){
$scope.list = data;
$scope.newGatewayObj = GBPGatewayServices.createObj();
});
}]);
- gbp.register.controller('prefixCtrl', ['$scope', 'GBPPrefixServices', function($scope, GBPPrefixServices){
+ gbpOld.register.controller('prefixCtrl', ['$scope', 'GBPPrefixServices', function($scope, GBPPrefixServices){
$scope.list = [];
$scope.selectedPrefix = null;
$scope.newPrefixObj = GBPPrefixServices.createObj();
$scope.init = function() {
if ( $scope.selectedTenant && $scope.selectedSubnet && $scope.selectedGateway) {
path = GBPPrefixServices.createPathObj($scope.selectedTenant.id, $scope.selectedSubnet.id, $scope.selectedGateway.gateway);
-
+
GBPPrefixServices.load(path, function(data){
$scope.list = data;
$scope.newPrefixObj = GBPPrefixServices.createObj();
});
}]);
- gbp.register.controller('renderersCtrl', ['$scope', 'GPBServices', function($scope, GPBServices){ //GBPContractServices
+ gbpOld.register.controller('renderersCtrl', ['$scope', 'GPBServices', function($scope, GPBServices){ //GBPContractServices
$scope.classifierDefinitions = {'options' : [], 'labels' : null};
$scope.actionDefinitions = {'options' : [], 'labels' : null};
loadDefinitions();
}]);
- gbp.register.controller('paramCtrl', ['$scope', 'GPBServices', function($scope, GPBServices){
+ gbpOld.register.controller('paramCtrl', ['$scope', 'GPBServices', function($scope, GPBServices){
$scope.value = null;
$scope.init = function(param, paramValues) {
$scope.$on('GBP_SET_PARAM_VALUE', function(event, name, intVal, strVal) {
//console.info($scope.parameter, ' got GBP_SET_PARAM_VALUE', name, intVal, strVal, event);
-
+
});
$scope.$on('GBP_RESET_PARAM', function(event){
});
}]);
- gbp.register.controller('classifiersCtrl', ['$scope', 'GBPClassifierInstanceServices', 'GPBServices', '$filter',
+ gbpOld.register.controller('classifiersCtrl', ['$scope', 'GBPClassifierInstanceServices', 'GPBServices', '$filter',
function($scope, GBPClassifierInstanceServices, GPBServices, $filter){
$scope.list = [];
$scope.classifiersView = false;
});
}]);
- gbp.register.controller('actionsCtrl', ['$scope', 'GBPActionInstanceServices', 'GPBServices', '$filter',
+ gbpOld.register.controller('actionsCtrl', ['$scope', 'GBPActionInstanceServices', 'GPBServices', '$filter',
function($scope, GBPActionInstanceServices, GPBServices, $filter){
$scope.list = [];
$scope.actionsView = false;
});
}]);
- gbp.register.controller('endpointCtrl', ['$scope', 'GBPEndpointServices', 'GPBServices', 'GBPL2FloodDomainServices', 'GBPL2BridgeDomainServices', 'GBPL3ContextServices', 'GBPEpgServices', '$filter', 'GBPSubnetServices',
+ gbpOld.register.controller('endpointCtrl', ['$scope', 'GBPEndpointServices', 'GPBServices', 'GBPL2FloodDomainServices', 'GBPL2BridgeDomainServices', 'GBPL3ContextServices', 'GBPEpgServices', '$filter', 'GBPSubnetServices',
function($scope, GBPEndpointServices, GPBServices, GBPL2FloodDomainServices, GBPL2BridgeDomainServices, GBPL3ContextServices, GBPEpgServices, $filter, GBPSubnetServices){
$scope.list = [];
$scope.selectedEndpoint = null;
$scope.l2context.options = [];
path = GBPL2FloodDomainServices.createPathObj($scope.selectedTenant.id);
-
+
GBPL2FloodDomainServices.load(path, function(data){
$scope.l2context.options = $scope.l2context.options.concat(data);
$scope.networkContainment.options = $scope.networkContainment.options.concat(data);
return arr2.indexOf( el ) < 0;
});
};
-
+
$scope.init = function() {
if ($scope.selectedTenant) {
});
}]);
- gbp.register.controller('l3EndpointCtrl', ['$scope', 'GBPEndpointL3Services', 'GPBServices', 'GBPEpgServices', 'GBPL3ContextServices', 'GBPL2FloodDomainServices', 'GBPL2BridgeDomainServices', '$filter',
+ gbpOld.register.controller('l3EndpointCtrl', ['$scope', 'GBPEndpointL3Services', 'GPBServices', 'GBPEpgServices', 'GBPL3ContextServices', 'GBPL2FloodDomainServices', 'GBPL2BridgeDomainServices', '$filter',
function($scope, GBPEndpointL3Services, GPBServices, GBPEpgServices, GBPL3ContextServices, GBPL2FloodDomainServices, GBPL2BridgeDomainServices, $filter){
$scope.list = [];
$scope.selectedEndpoint = null;
$scope.l2context.options = [];
path = GBPL2FloodDomainServices.createPathObj($scope.selectedTenant.id);
-
+
GBPL2FloodDomainServices.load(path, function(data){
$scope.l2context.options = $scope.l2context.options.concat(data);
}, function(){
edit: "view"
};
};
-
+
$scope.init = function() {
if ($scope.selectedTenant) {
});
}]);
- gbp.register.controller('accessModelWizardCtrl', ['$scope', '$filter', 'GBPTenantServices', 'GBPEpgServices', 'GBPContractServices', 'GPBServices', function($scope, $filter, GBPTenantServices, GBPEpgServices, GBPContractServices, GPBServices){
+ gbpOld.register.controller('accessModelWizardCtrl', ['$scope', '$filter', 'GBPTenantServices', 'GBPEpgServices', 'GBPContractServices', 'GPBServices', function($scope, $filter, GBPTenantServices, GBPEpgServices, GBPContractServices, GPBServices){
$scope.wizardPage = null;
$scope.selectedTenant = null;
});
}
-
+
path = GBPTenantServices.createPathObj($scope.tenant.id);
GBPTenantServices.send(path, $scope.tenant, function(data){
$scope.wizards.accessModelWizard = false;
// };
}]);
- gbp.register.controller('wizardTenantCtrl', ['$scope', '$filter', 'GBPTenantServices', function($scope, $filter, GBPTenantServices){
+ gbpOld.register.controller('wizardTenantCtrl', ['$scope', '$filter', 'GBPTenantServices', function($scope, $filter, GBPTenantServices){
// $scope.tenantList = [];
$scope.newTenantObj = GBPTenantServices.createObj();
$scope.displayLabel = ['name' , 'id'];
$scope.getNewTenantObject = function() {
return GBPTenantServices.createObj();
};
- }]);
+ }]);
- gbp.register.controller('wizardEpgCtrl', ['$scope', '$filter', 'GBPEpgServices', function($scope, $filter, GBPEpgServices){
+ gbpOld.register.controller('wizardEpgCtrl', ['$scope', '$filter', 'GBPEpgServices', function($scope, $filter, GBPEpgServices){
$scope.list = [];
$scope.newEpgObj = GBPEpgServices.createObj();
$scope.selectedEpg = null;
$scope.igpOpts = ['allow', 'require-contract'];
$scope.init = function() {
-
+
};
$scope.showForm = function() {
$scope.newEpgObj['provider-named-selector'] = args;
$scope.updateList($scope.list, $scope.newEpgObj, "id");
});
- }]);
+ }]);
- gbp.register.controller('wizardContractCtrl', ['$scope', '$filter', 'GBPContractServices', function($scope, $filter, GBPContractServices){
+ gbpOld.register.controller('wizardContractCtrl', ['$scope', '$filter', 'GBPContractServices', function($scope, $filter, GBPContractServices){
$scope.list = [];
$scope.newContractObj = GBPContractServices.createObj();
$scope.selectedContract = null;
$scope.contractFormView = true;
$scope.init = function() {
-
+
};
$scope.showForm = function() {
$scope.newContractObj['clause'] = args;
$scope.updateList($scope.list, $scope.newContractObj, "id");
});
- }]);
+ }]);
- gbp.register.controller('wizardCnsCtrl',['$scope', 'GBPConNamedSelServices', function($scope, GBPConNamedSelServices){
+ gbpOld.register.controller('wizardCnsCtrl',['$scope', 'GBPConNamedSelServices', function($scope, GBPConNamedSelServices){
$scope.list = [];
$scope.selectedCNS = null;
$scope.newCNSObj = GBPConNamedSelServices.createObj();
});
}]);
- gbp.register.controller('wizardPnsCtrl',['$scope', 'GBPProNamedSelServices', function($scope, GBPProNamedSelServices){
+ gbpOld.register.controller('wizardPnsCtrl',['$scope', 'GBPProNamedSelServices', function($scope, GBPProNamedSelServices){
$scope.list = [];
$scope.selectedPNS = null;
$scope.newPNSObj = GBPProNamedSelServices.createObj();
});
}]);
- gbp.register.controller('wizardSubjectCtrl', ['$scope','GBPSubjectServices', '$filter', function($scope, GBPSubjectServices, $filter){
+ gbpOld.register.controller('wizardSubjectCtrl', ['$scope','GBPSubjectServices', '$filter', function($scope, GBPSubjectServices, $filter){
$scope.list = [];
$scope.selectedSubject = null;
$scope.newSubjectObj = GBPSubjectServices.createObj();
};
$scope.init = function() {
-
+
};
$scope.save = function(){
});
}]);
- gbp.register.controller('wizardRuleCtrl', ['$scope','GBPRuleServices', '$filter', function($scope, GBPRuleServices, $filter){
+ gbpOld.register.controller('wizardRuleCtrl', ['$scope','GBPRuleServices', '$filter', function($scope, GBPRuleServices, $filter){
$scope.list = [];
$scope.selectedRule = null;
$scope.newRuleObj = GBPRuleServices.createObj();
};
$scope.init = function() {
-
+
};
$scope.save = function(){
});
}]);
- gbp.register.controller('wizardClauseCtrl', ['$scope','GBPClauseServices', 'GBPSubjectServices',
+ gbpOld.register.controller('wizardClauseCtrl', ['$scope','GBPClauseServices', 'GBPSubjectServices',
function($scope, GBPClauseServices, GBPSubjectServices){
$scope.list = [];
$scope.selectedClause = null;
});
}]);
- gbp.register.controller('wizardActionRefCtrl', ['$scope','GBPActionRefsServices', 'GBPActionInstanceServices', '$filter', function($scope, GBPActionRefsServices, GBPActionInstanceServices, $filter){
+ gbpOld.register.controller('wizardActionRefCtrl', ['$scope','GBPActionRefsServices', 'GBPActionInstanceServices', '$filter', function($scope, GBPActionRefsServices, GBPActionInstanceServices, $filter){
$scope.list = [];
$scope.selectedActionRef = null;
$scope.newActionRefObj = GBPActionRefsServices.createObj();
});
}]);
- gbp.register.controller('wizardClassifierRefCtrl', ['$scope','GBPClassifierRefsServices', 'GBPClassifierInstanceServices', '$filter', function($scope, GBPClassifierRefsServices, GBPClassifierInstanceServices, $filter){
+ gbpOld.register.controller('wizardClassifierRefCtrl', ['$scope','GBPClassifierRefsServices', 'GBPClassifierInstanceServices', '$filter', function($scope, GBPClassifierRefsServices, GBPClassifierInstanceServices, $filter){
$scope.list = [];
$scope.selectedClassifierRef = null;
$scope.newClassifierRefObj = GBPClassifierRefsServices.createObj();
});
}]);
- gbp.register.controller('rendererStateCtrl', ['$scope', 'GPBServices', function($scope, GPBServices){
+ gbpOld.register.controller('rendererStateCtrl', ['$scope', 'GPBServices', function($scope, GPBServices){
$scope.data = {'subject-feature-definitions' : {}};
- $scope.view_path = 'src/app/gbp/views/governance';
+ $scope.view_path = 'src/app/gbp-old/views/governance';
var init = function(){
GPBServices.getDefinitions(function(classifiersDefs, actionsDefs){
//error
});
};
-
+
init();
}]);
- gbp.register.controller('layerCtrl', ['$scope', function($scope){
+ gbpOld.register.controller('layerCtrl', ['$scope', function($scope){
var moveOffset = 1;
$scope.currentDisplayIndex = 1;
if($scope.checkData(value, 'Array')){
$scope.setActData($scope.data[$scope.data.length - 1]);
}
- };
+ };
$scope.toggleExpanded = function(){
$scope.expanded = !$scope.expanded;
};
}]);
- gbp.register.controller('actionReferenceWizardCtrl', ['$scope', '$filter', 'GBPRuleServices', 'GBPActionInstanceServices', function($scope, $filter, GBPRuleServices, GBPActionInstanceServices){
+ gbpOld.register.controller('actionReferenceWizardCtrl', ['$scope', '$filter', 'GBPRuleServices', 'GBPActionInstanceServices', function($scope, $filter, GBPRuleServices, GBPActionInstanceServices){
$scope.wizardPage = null;
$scope.path = {};
$scope.rule = {};
//TODO: error cbk
});
});
-
+
//}
//if($scope.validateForm($scope.rulesForm)){
GBPRuleServices.send(path, $scope.rule, function(data){
$scope.wizards.actionReferenceWizard = false;
-
+
//$scope.sendReloadEventFromRoot('GBP_TENANT_RELOAD');
}, function(){
//TODO: error cbk
}]);
- gbp.register.controller('actionsRefListCtrl', ['$scope', '$filter', function($scope, $filter){
-
+ gbpOld.register.controller('actionsRefListCtrl', ['$scope', '$filter', function($scope, $filter){
+
$scope.actionReferenceForm = false;
$scope.showForm = function(object) {
$scope.newActionRefObj = null;
};
-
+
}]);
- gbp.register.controller('actionInstanceWizardCtrl', ['$scope', '$filter', 'GPBServices', 'GBPActionInstanceServices', function($scope, $filter, GPBServices, GBPActionInstanceServices){
+ gbpOld.register.controller('actionInstanceWizardCtrl', ['$scope', '$filter', 'GPBServices', 'GBPActionInstanceServices', function($scope, $filter, GPBServices, GBPActionInstanceServices){
$scope.actionDefinitions = {'options' : [], 'labels' : "name"};
$scope.newActionObj = GBPActionInstanceServices.createObj();
};
$scope.saveParam = function() {
-
+
};
$scope.addParam = function(name, type, value) {