From 12c5c9965103ebef464982b2772c005775ae1eb4 Mon Sep 17 00:00:00 2001 From: Daniel Malachovsky Date: Thu, 28 Apr 2016 18:33:24 +0200 Subject: [PATCH] gbp-old ui folders structure changed, new ui components - rebased Change-Id: I107f12235e5cfc6c73e28e246c9b05aa0c291a16 Signed-off-by: Daniel Malachovsky --- artifacts/pom.xml | 5 + features/pom.xml | 4 + features/src/main/features/features.xml | 1 + .../OSGI-INF/blueprint/blueprint.xml | 14 +- .../{gbp => gbp-old}/gbp.controller.js | 224 +++++++++--------- .../main/resources/{gbp => gbp-old}/gbp.css | 0 .../main/resources/{gbp => gbp-old}/gbp.less | 0 .../src/main/resources/gbp-old/gbp.module.js | 58 +++++ .../{gbp => gbp-old}/gbp.services.js | 142 +++++------ .../images/infinity-loop.tpl.html | Bin .../yang-ui-icons/icon-arrow-down.tpl.html | Bin .../yang-ui-icons/icon-arrow-right.tpl.html | Bin .../yang-ui-icons/icon-arrow-up.tpl.html | Bin .../images/yang-ui-icons/icon-close.tpl.html | Bin .../yang-ui-icons/icon-collapse-bits.tpl.html | Bin .../images/yang-ui-icons/icon-danger.tpl.html | Bin .../yang-ui-icons/icon-expand-bits.tpl.html | Bin .../yang-ui-icons/icon-fill-data.tpl.html | Bin .../yang-ui-icons/icon-filter-empty.tpl.html | Bin .../icon-filter-full-bck.tpl.html | Bin .../yang-ui-icons/icon-filter-full.tpl.html | Bin .../yang-ui-icons/icon-list-bck.tpl.html | Bin .../images/yang-ui-icons/icon-list.tpl.html | Bin .../images/yang-ui-icons/icon-next.tpl.html | Bin .../images/yang-ui-icons/icon-plus.tpl.html | Bin .../images/yang-ui-icons/icon-prev.tpl.html | Bin .../yang-ui-icons/icon-question.tpl.html | Bin .../images/yang-ui-icons/icon-view.tpl.html | Bin .../{gbp => gbp-old}/js/backbone-min.js | 0 .../resources/{gbp => gbp-old}/js/geometry.js | 0 .../{gbp => gbp-old}/js/joint.clean.build.js | 8 +- .../resources/{gbp => gbp-old}/js/joint.css | 0 .../{gbp => gbp-old}/js/lodash.min.js | 0 .../{gbp => gbp-old}/js/vectorizer.js | 8 +- .../views/action-ref.tpl.html | 0 .../{gbp => gbp-old}/views/actions.tpl.html | 0 .../box/contract-content-static.tpl.html | 0 .../views/box/ep-content-static.tpl.html | 0 .../views/box/epg-content-static.tpl.html | 0 .../views/box/rule-content-static.tpl.html | 0 .../views/box/subject-content-static.tpl.html | 0 .../views/classifier-ref.tpl.html | 0 .../views/classifiers.tpl.html | 0 .../{gbp => gbp-old}/views/clause.tpl.html | 0 .../{gbp => gbp-old}/views/cns.tpl.html | 0 .../{gbp => gbp-old}/views/contracts.tpl.html | 0 .../{gbp => gbp-old}/views/docs.tpl.html | 0 .../{gbp => gbp-old}/views/endpoint.tpl.html | 0 .../{gbp => gbp-old}/views/epg.tpl.html | 0 .../{gbp => gbp-old}/views/gateway.tpl.html | 0 .../governance/delivered-policy.tpl.html | 0 .../views/governance/epg-detail.tpl.html | 0 .../governance/expressed-policy.tpl.html | 0 .../views/governance/main.tpl.html | 0 .../views/governance/node-structure.tpl.html | 0 .../renderer-configuration.tpl.html | 0 .../views/governance/renderer-state.tpl.html | 0 .../views/governance/subject-detail.tpl.html | 0 .../{gbp => gbp-old}/views/index.tpl.html | 0 .../{gbp => gbp-old}/views/l2l3.tpl.html | 0 .../views/l3-endpoint.tpl.html | 0 .../views/main/governance.tpl.html | 0 .../{gbp => gbp-old}/views/main/main.tpl.html | 0 .../views/main/policy-renderer.tpl.html | 0 .../views/menu/main-menu.tpl.html | 0 .../views/parts/breadcrumbs.tpl.html | 0 .../views/parts/crud-endpoint.tpl.html | 0 .../views/parts/crud.tpl.html | 0 .../views/parts/param.tpl.html | 0 .../{gbp => gbp-old}/views/pns.tpl.html | 0 .../{gbp => gbp-old}/views/prefix.tpl.html | 0 .../{gbp => gbp-old}/views/root.tpl.html | 0 .../{gbp => gbp-old}/views/rules.tpl.html | 0 .../{gbp => gbp-old}/views/subjects.tpl.html | 0 .../{gbp => gbp-old}/views/tenants.tpl.html | 0 .../views/wizards/accessModelWizard.tpl.html | 0 .../wizards/actionReferenceWizard.tpl.html | 0 .../src/main/resources/gbp/gbp.module.js | 58 ----- groupbasedpolicy-ui/bundle/pom.xml | 86 +++++++ .../OSGI-INF/blueprint/blueprint.xml | 16 ++ groupbasedpolicy-ui/module/pom.xml | 23 ++ .../resources/gbp/common/views/index.tpl.html | 3 + .../resources/gbp/common/views/root.tpl.html | 1 + .../src/main/resources/gbp/gbp.controller.js | 7 + .../src/main/resources/gbp/gbp.module.js | 78 ++++++ .../module/src/main/resources/gbp/main.js | 12 + groupbasedpolicy-ui/pom.xml | 29 +++ pom.xml | 7 +- 88 files changed, 525 insertions(+), 259 deletions(-) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/gbp.controller.js (95%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/gbp.css (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/gbp.less (100%) create mode 100644 groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/gbp.module.js rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/gbp.services.js (96%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/images/infinity-loop.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/images/yang-ui-icons/icon-arrow-down.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/images/yang-ui-icons/icon-arrow-right.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/images/yang-ui-icons/icon-arrow-up.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/images/yang-ui-icons/icon-close.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/images/yang-ui-icons/icon-collapse-bits.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/images/yang-ui-icons/icon-danger.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/images/yang-ui-icons/icon-expand-bits.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/images/yang-ui-icons/icon-fill-data.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/images/yang-ui-icons/icon-filter-empty.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/images/yang-ui-icons/icon-filter-full-bck.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/images/yang-ui-icons/icon-filter-full.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/images/yang-ui-icons/icon-list-bck.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/images/yang-ui-icons/icon-list.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/images/yang-ui-icons/icon-next.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/images/yang-ui-icons/icon-plus.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/images/yang-ui-icons/icon-prev.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/images/yang-ui-icons/icon-question.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/images/yang-ui-icons/icon-view.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/js/backbone-min.js (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/js/geometry.js (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/js/joint.clean.build.js (99%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/js/joint.css (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/js/lodash.min.js (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/js/vectorizer.js (99%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/action-ref.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/actions.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/box/contract-content-static.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/box/ep-content-static.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/box/epg-content-static.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/box/rule-content-static.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/box/subject-content-static.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/classifier-ref.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/classifiers.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/clause.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/cns.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/contracts.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/docs.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/endpoint.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/epg.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/gateway.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/governance/delivered-policy.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/governance/epg-detail.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/governance/expressed-policy.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/governance/main.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/governance/node-structure.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/governance/renderer-configuration.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/governance/renderer-state.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/governance/subject-detail.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/index.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/l2l3.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/l3-endpoint.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/main/governance.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/main/main.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/main/policy-renderer.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/menu/main-menu.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/parts/breadcrumbs.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/parts/crud-endpoint.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/parts/crud.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/parts/param.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/pns.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/prefix.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/root.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/rules.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/subjects.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/tenants.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/wizards/accessModelWizard.tpl.html (100%) rename groupbasedpolicy-old-ui/module/src/main/resources/{gbp => gbp-old}/views/wizards/actionReferenceWizard.tpl.html (100%) delete mode 100644 groupbasedpolicy-old-ui/module/src/main/resources/gbp/gbp.module.js create mode 100644 groupbasedpolicy-ui/bundle/pom.xml create mode 100644 groupbasedpolicy-ui/bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml create mode 100644 groupbasedpolicy-ui/module/pom.xml create mode 100644 groupbasedpolicy-ui/module/src/main/resources/gbp/common/views/index.tpl.html create mode 100644 groupbasedpolicy-ui/module/src/main/resources/gbp/common/views/root.tpl.html create mode 100644 groupbasedpolicy-ui/module/src/main/resources/gbp/gbp.controller.js create mode 100644 groupbasedpolicy-ui/module/src/main/resources/gbp/gbp.module.js create mode 100644 groupbasedpolicy-ui/module/src/main/resources/gbp/main.js create mode 100644 groupbasedpolicy-ui/pom.xml diff --git a/artifacts/pom.xml b/artifacts/pom.xml index d07f73538..a023995e3 100755 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -61,6 +61,11 @@ ui-backend ${project.version} + + ${project.groupId} + groupbasedpolicy-ui-bundle + ${project.version} + ${project.groupId} groupbasedpolicy-old-ui-bundle diff --git a/features/pom.xml b/features/pom.xml index f372d0e63..d13c8c1b8 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -265,6 +265,10 @@ org.opendaylight.groupbasedpolicy ui-backend + + org.opendaylight.groupbasedpolicy + groupbasedpolicy-ui-bundle + org.opendaylight.groupbasedpolicy groupbasedpolicy-old-ui-bundle diff --git a/features/src/main/features/features.xml b/features/src/main/features/features.xml index fa874ea91..52907b660 100755 --- a/features/src/main/features/features.xml +++ b/features/src/main/features/features.xml @@ -157,6 +157,7 @@ odl-dlux-core odl-dlux-yangvisualizer odl-groupbasedpolicy-uibackend + mvn:org.opendaylight.groupbasedpolicy/groupbasedpolicy-ui-bundle/{{VERSION}} mvn:org.opendaylight.groupbasedpolicy/groupbasedpolicy-old-ui-bundle/{{VERSION}} diff --git a/groupbasedpolicy-old-ui/bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/groupbasedpolicy-old-ui/bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml index a62c9c42f..7b3d17e70 100644 --- a/groupbasedpolicy-old-ui/bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml +++ b/groupbasedpolicy-old-ui/bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml @@ -4,15 +4,15 @@ - - - - - + + + + + - src/app/gbp/gbp.css - src/app/gbp/js/joint.css + src/app/gbp-old/gbp.css + src/app/gbp-old/js/joint.css diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/gbp.controller.js b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/gbp.controller.js similarity index 95% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/gbp.controller.js rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/gbp.controller.js index e492a3a76..424f33e67 100644 --- a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/gbp.controller.js +++ b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/gbp.controller.js @@ -1,14 +1,14 @@ -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, @@ -161,7 +161,7 @@ define(modules, function(gbp) { }]); - gbp.register.controller('governanceCtrl', ['$rootScope','$scope', + gbpOld.register.controller('governanceCtrl', ['$rootScope','$scope', function ($rootScope, $scope) { $scope.menuTpl = 'main-menu'; $scope.menuBox = null; @@ -175,7 +175,7 @@ define(modules, function(gbp) { $scope.toggleExpanded = function(expand, menu, tplType){ var type = tplType ? tplType : 'contentTpl'; $scope.menuBox = null; - + $scope[type] = expand; if ( menu && menu === false ) { @@ -183,7 +183,7 @@ define(modules, function(gbp) { } }; - + $scope.setViewContent = function(tplName, data, broadcast, tplType) { @@ -218,7 +218,7 @@ define(modules, function(gbp) { if ( angular.isFunction(objClickAction[tplName]) ) { objClickAction[tplName](); } - + }; @@ -236,7 +236,7 @@ define(modules, function(gbp) { }]); - gbp.register.controller('boxStaticCtrl',['$scope', + gbpOld.register.controller('boxStaticCtrl',['$scope', function($scope){ $scope.selectedObj = null; @@ -269,7 +269,7 @@ define(modules, function(gbp) { }]); - gbp.register.controller('graphCtrl', ['$scope', function($scope){ + gbpOld.register.controller('graphCtrl', ['$scope', function($scope){ var paper = null, paperScale = 1; @@ -284,7 +284,7 @@ define(modules, function(gbp) { paper.scale(paperScale, paperScale); }; - + $scope.loadMouseScrollEvent = function(){ /*mouse wheel event for zooming*/ @@ -305,10 +305,10 @@ define(modules, function(gbp) { 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 = [], @@ -324,7 +324,7 @@ define(modules, function(gbp) { } }; - 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); } @@ -410,7 +410,7 @@ define(modules, function(gbp) { createEpgLinks(e, item, contractItems); }); - + } offsetHobj.epg = JointGraphOffsetFactory.getCurrentOffset(itemsArray.contract, 'y'); @@ -431,11 +431,11 @@ define(modules, function(gbp) { 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 = {}, @@ -488,7 +488,7 @@ define(modules, function(gbp) { $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; }), @@ -500,13 +500,13 @@ define(modules, function(gbp) { } }; - 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); }); @@ -528,8 +528,8 @@ define(modules, function(gbp) { 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 = { @@ -634,7 +634,7 @@ define(modules, function(gbp) { 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 = []; @@ -649,7 +649,7 @@ define(modules, function(gbp) { 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'); @@ -722,7 +722,7 @@ define(modules, function(gbp) { 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 = {}, @@ -743,7 +743,7 @@ define(modules, function(gbp) { 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'); @@ -811,9 +811,9 @@ define(modules, function(gbp) { // 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 = {}; @@ -899,19 +899,19 @@ define(modules, function(gbp) { 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(){ @@ -921,7 +921,7 @@ define(modules, function(gbp) { $scope.close = function(){ $scope.showTable = false; }; - + $scope.$on('SET_LINK_DATA', function(e, obj){ $scope.linkData = obj; $scope.show(); @@ -929,7 +929,7 @@ define(modules, function(gbp) { }); }]); - gbp.register.controller('crudCtrl',['$scope', function($scope){ + gbpOld.register.controller('crudCtrl',['$scope', function($scope){ $scope.selectedObj = null; $scope.label = ''; $scope.q = {}; @@ -953,7 +953,7 @@ define(modules, function(gbp) { }); }]); - 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(); @@ -981,7 +981,7 @@ define(modules, function(gbp) { 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'); @@ -1075,7 +1075,7 @@ define(modules, function(gbp) { }); }]); - gbp.register.controller('clauseCtrl', ['$scope','GBPClauseServices', 'GBPSubjectServices', + gbpOld.register.controller('clauseCtrl', ['$scope','GBPClauseServices', 'GBPSubjectServices', function($scope, GBPClauseServices, GBPSubjectServices){ $scope.list = []; $scope.selectedClause = null; @@ -1136,7 +1136,7 @@ define(modules, function(gbp) { $scope.init = function() { if ( $scope.selectedContract ) { path = GBPClauseServices.createPathObj($scope.selectedTenant.id, $scope.selectedContract.id); - + GBPClauseServices.load(path, function(data){ $scope.list = data; }, function(){ @@ -1186,7 +1186,7 @@ define(modules, function(gbp) { $scope.internalView.clause = false; $scope.internalView.edit = "view"; } - + if($scope.internalView.clause) { angular.copy(selectedObj, $scope.newClauseObj); } @@ -1225,7 +1225,7 @@ define(modules, function(gbp) { }); }]); - 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(); @@ -1254,7 +1254,7 @@ define(modules, function(gbp) { 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'); @@ -1345,7 +1345,7 @@ define(modules, function(gbp) { }); }]); - 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(); @@ -1374,7 +1374,7 @@ define(modules, function(gbp) { 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(){ @@ -1459,7 +1459,7 @@ define(modules, function(gbp) { }); }]); - 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(); @@ -1499,7 +1499,7 @@ define(modules, function(gbp) { 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(){ @@ -1590,7 +1590,7 @@ define(modules, function(gbp) { }); }]); - 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(); @@ -1632,7 +1632,7 @@ define(modules, function(gbp) { 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){ @@ -1725,7 +1725,7 @@ define(modules, function(gbp) { }); }]); - 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(); @@ -1822,7 +1822,7 @@ define(modules, function(gbp) { }); }]); - 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(); @@ -1864,7 +1864,7 @@ define(modules, function(gbp) { $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'); @@ -1962,7 +1962,7 @@ define(modules, function(gbp) { }); }]); - 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(); @@ -2092,7 +2092,7 @@ define(modules, function(gbp) { }); }]); - 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(); @@ -2137,7 +2137,7 @@ define(modules, function(gbp) { $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(){ @@ -2195,7 +2195,7 @@ define(modules, function(gbp) { $scope.internalView.pns = false; $scope.internalView.edit = "view"; } - + if($scope.internalView.pns) { angular.copy(selectedObj, $scope.newPNSObj); } @@ -2221,7 +2221,7 @@ define(modules, function(gbp) { }); }]); - 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(); @@ -2259,7 +2259,7 @@ define(modules, function(gbp) { $scope.init = function() { if ( $scope.selectedTenant ) { path = GBPL2FloodDomainServices.createPathObj($scope.selectedTenant.id); - + GBPL2FloodDomainServices.load(path, function(data){ $scope.list = data; // clear objects @@ -2361,7 +2361,7 @@ define(modules, function(gbp) { }); }]); - 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(); @@ -2400,7 +2400,7 @@ define(modules, function(gbp) { $scope.init = function() { if ( $scope.selectedTenant ) { path = GBPL2BridgeDomainServices.createPathObj($scope.selectedTenant.id); - + GBPL2BridgeDomainServices.load(path, function(data){ $scope.list = data; $scope.newL2BridgeObj = GBPL2BridgeDomainServices.createObj(); @@ -2504,7 +2504,7 @@ define(modules, function(gbp) { }); }]); - 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(); @@ -2531,7 +2531,7 @@ define(modules, function(gbp) { $scope.init = function() { if ( $scope.selectedTenant ) { path = GBPL3ContextServices.createPathObj($scope.selectedTenant.id); - + GBPL3ContextServices.load(path, function(data){ $scope.list = data; $scope.newL3ContextObj = GBPL3ContextServices.createObj(); @@ -2578,7 +2578,7 @@ define(modules, function(gbp) { $scope.reload = function(selectedObj) { $scope.selectedL3Context = selectedObj; - + $scope.view.edit = $scope.view.edit == "edit" ? $scope.view.edit : "view"; if(selectedObj){ $scope.view.l3context = true; @@ -2626,7 +2626,7 @@ define(modules, function(gbp) { }); }]); - 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(); @@ -2679,7 +2679,7 @@ define(modules, function(gbp) { $scope.init = function() { if ( $scope.selectedTenant ) { path = GBPSubnetServices.createPathObj($scope.selectedTenant.id); - + GBPSubnetServices.load(path, function(data){ $scope.list = data; $scope.newSubnetObj = GBPSubnetServices.createObj(); @@ -2730,7 +2730,7 @@ define(modules, function(gbp) { $scope.reload = function(selectedObj) { $scope.selectedSubnet = selectedObj; - + $scope.view.edit = $scope.view.edit == "edit" ? $scope.view.edit : "view"; if(selectedObj){ $scope.view.subnet = true; @@ -2776,7 +2776,7 @@ define(modules, function(gbp) { $scope.$on('GBP_GATEWAY_RELOAD',function(){ $scope.init(); }); - + $scope.$on('GBP_L3CONTEXT_RELOAD',function(){ loadL2L3List(); }); @@ -2794,7 +2794,7 @@ define(modules, function(gbp) { }); }]); - 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; @@ -2818,7 +2818,7 @@ define(modules, function(gbp) { $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(); @@ -2904,7 +2904,7 @@ define(modules, function(gbp) { }); }]); - 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(); @@ -2930,7 +2930,7 @@ define(modules, function(gbp) { $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(); @@ -3009,7 +3009,7 @@ define(modules, function(gbp) { }); }]); - 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}; @@ -3028,7 +3028,7 @@ define(modules, function(gbp) { 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) { @@ -3051,7 +3051,7 @@ define(modules, function(gbp) { $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){ @@ -3059,7 +3059,7 @@ define(modules, function(gbp) { }); }]); - 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; @@ -3191,7 +3191,7 @@ define(modules, function(gbp) { }); }]); - 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; @@ -3324,7 +3324,7 @@ define(modules, function(gbp) { }); }]); - 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; @@ -3373,7 +3373,7 @@ define(modules, function(gbp) { $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); @@ -3435,7 +3435,7 @@ define(modules, function(gbp) { return arr2.indexOf( el ) < 0; }); }; - + $scope.init = function() { if ($scope.selectedTenant) { @@ -3590,7 +3590,7 @@ define(modules, function(gbp) { }); }]); - 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; @@ -3632,7 +3632,7 @@ define(modules, function(gbp) { $scope.l2context.options = []; path = GBPL2FloodDomainServices.createPathObj($scope.selectedTenant.id); - + GBPL2FloodDomainServices.load(path, function(data){ $scope.l2context.options = $scope.l2context.options.concat(data); }, function(){ @@ -3666,7 +3666,7 @@ define(modules, function(gbp) { edit: "view" }; }; - + $scope.init = function() { if ($scope.selectedTenant) { @@ -3822,7 +3822,7 @@ define(modules, function(gbp) { }); }]); - 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; @@ -3878,7 +3878,7 @@ define(modules, function(gbp) { }); } - + path = GBPTenantServices.createPathObj($scope.tenant.id); GBPTenantServices.send(path, $scope.tenant, function(data){ $scope.wizards.accessModelWizard = false; @@ -3901,7 +3901,7 @@ define(modules, function(gbp) { // }; }]); - 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']; @@ -3942,9 +3942,9 @@ define(modules, function(gbp) { $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; @@ -3956,7 +3956,7 @@ define(modules, function(gbp) { $scope.igpOpts = ['allow', 'require-contract']; $scope.init = function() { - + }; $scope.showForm = function() { @@ -4013,9 +4013,9 @@ define(modules, function(gbp) { $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; @@ -4026,7 +4026,7 @@ define(modules, function(gbp) { $scope.contractFormView = true; $scope.init = function() { - + }; $scope.showForm = function() { @@ -4083,9 +4083,9 @@ define(modules, function(gbp) { $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(); @@ -4199,7 +4199,7 @@ define(modules, function(gbp) { }); }]); - 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(); @@ -4312,7 +4312,7 @@ define(modules, function(gbp) { }); }]); - 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(); @@ -4339,7 +4339,7 @@ define(modules, function(gbp) { }; $scope.init = function() { - + }; $scope.save = function(){ @@ -4411,7 +4411,7 @@ define(modules, function(gbp) { }); }]); - 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(); @@ -4437,7 +4437,7 @@ define(modules, function(gbp) { }; $scope.init = function() { - + }; $scope.save = function(){ @@ -4511,7 +4511,7 @@ define(modules, function(gbp) { }); }]); - gbp.register.controller('wizardClauseCtrl', ['$scope','GBPClauseServices', 'GBPSubjectServices', + gbpOld.register.controller('wizardClauseCtrl', ['$scope','GBPClauseServices', 'GBPSubjectServices', function($scope, GBPClauseServices, GBPSubjectServices){ $scope.list = []; $scope.selectedClause = null; @@ -4623,7 +4623,7 @@ define(modules, function(gbp) { }); }]); - 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(); @@ -4721,7 +4721,7 @@ define(modules, function(gbp) { }); }]); - 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(); @@ -4822,9 +4822,9 @@ define(modules, function(gbp) { }); }]); - 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){ @@ -4834,11 +4834,11 @@ define(modules, function(gbp) { //error }); }; - + init(); }]); - gbp.register.controller('layerCtrl', ['$scope', function($scope){ + gbpOld.register.controller('layerCtrl', ['$scope', function($scope){ var moveOffset = 1; $scope.currentDisplayIndex = 1; @@ -4850,7 +4850,7 @@ define(modules, function(gbp) { if($scope.checkData(value, 'Array')){ $scope.setActData($scope.data[$scope.data.length - 1]); } - }; + }; $scope.toggleExpanded = function(){ $scope.expanded = !$scope.expanded; @@ -4884,7 +4884,7 @@ define(modules, function(gbp) { }; }]); - 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 = {}; @@ -4920,7 +4920,7 @@ define(modules, function(gbp) { //TODO: error cbk }); }); - + //} //if($scope.validateForm($scope.rulesForm)){ @@ -4928,7 +4928,7 @@ define(modules, function(gbp) { GBPRuleServices.send(path, $scope.rule, function(data){ $scope.wizards.actionReferenceWizard = false; - + //$scope.sendReloadEventFromRoot('GBP_TENANT_RELOAD'); }, function(){ //TODO: error cbk @@ -4965,8 +4965,8 @@ define(modules, function(gbp) { }]); - 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) { @@ -4992,11 +4992,11 @@ define(modules, function(gbp) { $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(); @@ -5034,7 +5034,7 @@ define(modules, function(gbp) { }; $scope.saveParam = function() { - + }; $scope.addParam = function(name, type, value) { diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/gbp.css b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/gbp.css similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/gbp.css rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/gbp.css diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/gbp.less b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/gbp.less similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/gbp.less rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/gbp.less diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/gbp.module.js b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/gbp.module.js new file mode 100644 index 000000000..96d7d2d81 --- /dev/null +++ b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/gbp.module.js @@ -0,0 +1,58 @@ +define(['angularAMD', 'app/routingConfig', 'ui-bootstrap', 'Restangular', 'angular-translate'], function() { + + var gbpOld = angular.module('app.gbpOld', ['ui.router.state','app.core', 'ui.bootstrap', 'restangular', 'pascalprecht.translate']); + + gbpOld.register = gbpOld; + + gbpOld.config(function ($stateProvider, $compileProvider, $controllerProvider, $provide, $translateProvider, NavHelperProvider, $filterProvider) { + + $translateProvider.useStaticFilesLoader({ + prefix: 'assets/data/locale-', + suffix: '.json' + }); + + gbpOld.register = { + directive : $compileProvider.directive, + controller : $controllerProvider.register, + filter: $filterProvider.register, + factory : $provide.factory, + service : $provide.service + }; + + NavHelperProvider.addControllerUrl('app/gbp-old/gbp.controller'); + NavHelperProvider.addToMenu('gbpOld', { + "link": "#/gbpOld/index", + "active": "main.gbpOld", + "title": "GBP old", + "icon": "icon-level-down", + "page": { + "title": "GBP old", + "description": "GBP old ui" + } + }); + + var access = routingConfig.accessLevels; + $stateProvider.state('main.gbpOld', { + url: 'gbpOld', + abstract: true, + views : { + 'content' : { + templateUrl: 'src/app/gbp-old/views/root.tpl.html' + } + } + }); + + $stateProvider.state('main.gbpOld.index', { + url: '/index', + access: access.admin, + views: { + '': { + controller: 'gbpCtrl', + templateUrl: 'src/app/gbp-old/views/index.tpl.html' + } + } + }); + }); + + return gbpOld; +}); diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/gbp.services.js b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/gbp.services.js similarity index 96% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/gbp.services.js rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/gbp.services.js index ef75e0a5f..e21faabca 100644 --- a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/gbp.services.js +++ b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/gbp.services.js @@ -1,12 +1,12 @@ -define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joint) { +define(['app/gbp-old/gbp.module', 'app/gbp-old/js/joint.clean.build'], function(gbpOld, joint) { - gbp.register.factory('GBPRestangular', function(Restangular, ENV) { + gbpOld.register.factory('GBPRestangular', function(Restangular, ENV) { return Restangular.withConfig(function(RestangularConfig) { RestangularConfig.setBaseUrl(ENV.getBaseURL("MD_SAL")); }); }); - gbp.register.factory('GBPConstants', function() { + gbpOld.register.factory('GBPConstants', function() { var c = { colors: {'graph' : {}}, strings: {}, jointElements: {}, objType: {}, numbers: {}}; c.strings.flood = 'flood'; @@ -59,7 +59,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi return c; }); - gbp.register.factory('MockServices', function() { + gbpOld.register.factory('MockServices', function() { var ms = {}; @@ -94,7 +94,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi return ms; }); - gbp.register.factory('TopologyDataLoaders', function(GBPRestangular, GBPConstants) { + gbpOld.register.factory('TopologyDataLoaders', function(GBPRestangular, GBPConstants) { var tdl = {}; tdl.getSubjectsBetweenEndpointGroups = function(storage, tenantId, successCbk, errorCbk) { @@ -265,7 +265,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi }; }; - + tdl.getL2L3 = function(storage, tenantId, successCbk, errorCbk) { //l2-bridge-domain var lid = 0, @@ -357,7 +357,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi return tdl; }); - gbp.register.factory('TopoServices', function(TopologyDataLoaders, MockServices, GBPConstants) { + gbpOld.register.factory('TopoServices', function(TopologyDataLoaders, MockServices, GBPConstants) { var ts = {}; @@ -410,8 +410,8 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi loaders[GBPConstants.strings.config] = function(successCbk, errorCbk, args) { var storage = args.storage || 'config', tenantId = args.tenantId; - - + + TopologyDataLoaders.getSubjectsBetweenEndpointGroups(false, tenantId, function(data){ var topo = TopologyDataLoaders.getEpgTopo(data); successCbk(topo.nodes, topo.links); @@ -484,7 +484,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi return ts; }); - gbp.register.factory('GPBServices', function(GBPRestangular) { + gbpOld.register.factory('GPBServices', function(GBPRestangular) { var s = {}; @@ -626,7 +626,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi }); - gbp.register.factory('GBPGovernanceServices', function(TopologyDataLoaders) { + gbpOld.register.factory('GBPGovernanceServices', function(TopologyDataLoaders) { var s = {}; var subjectInList = function(subjectName, subjectList) { @@ -660,7 +660,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi this.addRule = function(rule, classifierInstances) { if(rule['classifier-ref'] && rule['classifier-ref'].length > 0) { - + rule['classifier-ref'].forEach(function(cr) { //cr['parameters'] = []; classifierInstances.forEach(function(ci) { @@ -703,13 +703,13 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi existingSubject.addProvider(providerEpg); existingSubject.addConsumer(consumerEpg); - + if(subject['ui-rule'] && subject['ui-rule'].length > 0) { subject['ui-rule'].forEach(function(r) { existingSubject.addRule(r, classifierInstances); }); } - + if(newSubject) { subjects.push(existingSubject); } @@ -724,7 +724,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi }; s.getEPGsAndSubjects = function(tenantId, classifierInstances, successCbk, errorCbk) { - TopologyDataLoaders.getSubjectsBetweenEndpointGroups(false, tenantId, + TopologyDataLoaders.getSubjectsBetweenEndpointGroups(false, tenantId, function(data) { var epgPairs = data.output['endpoint-group-pair-with-subject'], consumers = [], @@ -747,7 +747,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi return s; }); - gbp.register.factory('GBPTenantServices', function(GPBServices) { + gbpOld.register.factory('GBPTenantServices', function(GPBServices) { var s = {}; @@ -816,7 +816,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi }); - gbp.register.factory('GBPContractServices', function(GPBServices) { + gbpOld.register.factory('GBPContractServices', function(GPBServices) { var s = {}; @@ -879,7 +879,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi }); - gbp.register.factory('GBPClauseServices', function(GPBServices) { + gbpOld.register.factory('GBPClauseServices', function(GPBServices) { var s = {}; @@ -959,7 +959,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi }); - gbp.register.factory('GBPSubjectServices', function(GPBServices) { + gbpOld.register.factory('GBPSubjectServices', function(GPBServices) { var s = {}; @@ -1024,7 +1024,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi }); - gbp.register.factory('GBPRuleServices', function(GPBServices) { + gbpOld.register.factory('GBPRuleServices', function(GPBServices) { var s = {}; @@ -1091,7 +1091,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi }); - gbp.register.factory('GBPClassifierRefsServices', function(GPBServices) { + gbpOld.register.factory('GBPClassifierRefsServices', function(GPBServices) { var s = {}; @@ -1162,7 +1162,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi }); - gbp.register.factory('GBPActionRefsServices', function(GPBServices) { + gbpOld.register.factory('GBPActionRefsServices', function(GPBServices) { var s = {}; @@ -1231,7 +1231,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi }); - gbp.register.factory('GBPL2FloodDomainServices', function(GPBServices) { + gbpOld.register.factory('GBPL2FloodDomainServices', function(GPBServices) { var s = {}; @@ -1296,7 +1296,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi }); - gbp.register.factory('GBPL2BridgeDomainServices', function(GPBServices) { + gbpOld.register.factory('GBPL2BridgeDomainServices', function(GPBServices) { var s = {}; @@ -1362,7 +1362,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi }); - gbp.register.factory('GBPL3ContextServices', function(GPBServices) { + gbpOld.register.factory('GBPL3ContextServices', function(GPBServices) { var s = {}; @@ -1426,7 +1426,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi }); - gbp.register.factory('GBPSubnetServices', function(GPBServices) { + gbpOld.register.factory('GBPSubnetServices', function(GPBServices) { var s = {}; @@ -1493,7 +1493,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi }); - gbp.register.factory('GBPGatewayServices', function(GPBServices) { + gbpOld.register.factory('GBPGatewayServices', function(GPBServices) { var s = {}; @@ -1556,7 +1556,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi }); - gbp.register.factory('GBPPrefixServices', function(GPBServices) { + gbpOld.register.factory('GBPPrefixServices', function(GPBServices) { var s = {}; @@ -1620,7 +1620,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi }); - gbp.register.factory('GBPClassifierInstanceServices', function(GPBServices) { + gbpOld.register.factory('GBPClassifierInstanceServices', function(GPBServices) { var s = {}; @@ -1681,7 +1681,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi }); - gbp.register.factory('GBPActionInstanceServices', function(GPBServices) { + gbpOld.register.factory('GBPActionInstanceServices', function(GPBServices) { var s = {}; @@ -1740,7 +1740,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi s.getDefinitions = function(successCbk, errorCbk) { var restObj = GBPRestangular.one('restconf').one('operational').one('policy:subject-feature-definitions'); - + restObj.get().then(function(data) { successCbk(data['subject-feature-definitions']['action-definition']); }, function(res) { @@ -1752,7 +1752,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi }); - gbp.register.factory('GBPEpgServices', function(GPBServices) { + gbpOld.register.factory('GBPEpgServices', function(GPBServices) { var s = {}; @@ -1816,7 +1816,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi }); - gbp.register.factory('GBPConNamedSelServices', function(GPBServices) { + gbpOld.register.factory('GBPConNamedSelServices', function(GPBServices) { var s = {}; @@ -1896,7 +1896,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi }); - gbp.register.factory('GBPProNamedSelServices', function(GPBServices) { + gbpOld.register.factory('GBPProNamedSelServices', function(GPBServices) { var s = {}; @@ -1975,7 +1975,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi }); - gbp.register.factory('GBPEndpointServices', function(GPBServices) { + gbpOld.register.factory('GBPEndpointServices', function(GPBServices) { var s = {}; @@ -2022,16 +2022,16 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi }; var createDeleteData = function(obj) { - var o = { - 'input': { + var o = { + 'input': { 'l3': obj['l3-address'], 'l2': [ - { + { 'l2-context': obj['l2-context'], 'mac-address': obj['mac-address'] } - ] - } + ] + } }; return o; @@ -2064,7 +2064,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi }); - gbp.register.factory('GBPEndpointL3Services', function(GPBServices) { + gbpOld.register.factory('GBPEndpointL3Services', function(GPBServices) { var s = {}; @@ -2115,8 +2115,8 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi }; var createDeleteData = function(obj) { - var o = { - 'input': { + var o = { + 'input': { 'l3-prefix': [ { 'l3-context': obj['l3-context'], @@ -2125,7 +2125,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi ], 'l2': obj['endpoint-l2-gateways'], 'l3': obj['endpoint-l3-gateways'] - } + } }; return o; @@ -2159,7 +2159,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi }); - gbp.register.factory('PGNServices', function(GBPRestangular) { + gbpOld.register.factory('PGNServices', function(GBPRestangular) { var s = {}; @@ -2207,11 +2207,11 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi restObj = GBPRestangular.one('restconf').one('operations'), rpcRes = 'pgn-application:create-or-replace-endpoint-groups', reqData = { - "input": + "input": { "endpoint-group":[ { - "pgn-application:tenant-id": tenantID, + "pgn-application:tenant-id": tenantID, "pgn-application:id":uuid, "pgn-application:security-group-tag":sgt, "pgn-application:name":groupName, @@ -2236,7 +2236,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi "input": { "endpoint-group":[ { - "pgn-application:tenant-id": tenantId, + "pgn-application:tenant-id": tenantId, "pgn-application:id":uuid } ] @@ -2270,8 +2270,8 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi reqData = { "input": { "endpoint-group-pair-with-rules": { - "pgn-application:provider-tenant-id": tenantID, - "pgn-application:consumer-tenant-id": tenantID, + "pgn-application:provider-tenant-id": tenantID, + "pgn-application:consumer-tenant-id": tenantID, "pgn-application:provider-group-id":providerId, "pgn-application:consumer-group-id":consumerId, "pgn-application:group-rule": [ @@ -2298,12 +2298,12 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi restObj = GBPRestangular.one('restconf').one('operations'), rpcRes = 'pgn-application:unwire-endpoint-groups', reqData = { - "input": + "input": { "endpoint-group-pair":[ { - "pgn-application:provider-tenant-id": tenantId, - "pgn-application:consumer-tenant-id": tenantId, + "pgn-application:provider-tenant-id": tenantId, + "pgn-application:consumer-tenant-id": tenantId, "pgn-application:provider-group-id":providerId, "pgn-application:consumer-group-id":consumerId } @@ -2355,7 +2355,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi return s; }); - gbp.register.factory('DesignGbpFactory', function(){ + gbpOld.register.factory('DesignGbpFactory', function(){ var dvf = {}; @@ -2369,7 +2369,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi }); - gbp.register.factory('JointGraphOffsetFactory', function(GBPConstants){ + gbpOld.register.factory('JointGraphOffsetFactory', function(GBPConstants){ var jgof = {}; jgof.createWHObj = function(w, h) { @@ -2427,7 +2427,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi return jgof; }); - gbp.register.factory('JointGraphFactory', function(GBPConstants){ + gbpOld.register.factory('JointGraphFactory', function(GBPConstants){ var defaulColor = 'blue'; var jgf = {}; @@ -2467,12 +2467,12 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi jgf.createElement = function(elementName, posx, posy, width, height, objectType, object, tooltip, bgcolor, titleName) { var setWidth = function(width) { - return width < GBPConstants.jointElements.minWidth ? GBPConstants.jointElements.minWidth : + return width < GBPConstants.jointElements.minWidth ? GBPConstants.jointElements.minWidth : width > GBPConstants.jointElements.maxWidth ? GBPConstants.jointElements.maxWidth : width; }; var setHeight = function(height) { - return height < GBPConstants.jointElements.minHeight ? GBPConstants.jointElements.minHeight : + return height < GBPConstants.jointElements.minHeight ? GBPConstants.jointElements.minHeight : height > GBPConstants.jointElements.maxHeight ? GBPConstants.jointElements.maxHeight : height; }; @@ -2481,7 +2481,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi joint.shapes.html.Element = joint.shapes.basic.Generic.extend({ markup: '</g><text class="text1"></text><text class="text2"></text><title /></g>', - + defaults: joint.util.deepSupplement({ type: 'html.Element', attrs: { @@ -2490,7 +2490,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi '.text2': { ref: 'rect', 'ref-x': 0.5, 'ref-y': 0.7, 'y-alignment': 'middle', 'x-alignment': 'middle', cursor: 'pointer'}, 'title': {text: tooltip}, } - + }, joint.shapes.basic.Generic.prototype.defaults) }); @@ -2574,7 +2574,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi target: { id: targetId }, attrs: { '.connection': { stroke: colorIn, 'stroke-width': 2, name: 'normal' }, - '.connection-wrap': { 'stroke-width': 10 } + '.connection-wrap': { 'stroke-width': 10 } }, objData: objData }; @@ -2600,7 +2600,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi return jgf; }); - gbp.register.factory('GBPJointGraphBuilder', function(GBPRestangular, GBPConstants, JointGraphFactory, JointGraphOffsetFactory, TopologyDataLoaders){ + gbpOld.register.factory('GBPJointGraphBuilder', function(GBPRestangular, GBPConstants, JointGraphFactory, JointGraphOffsetFactory, TopologyDataLoaders){ var jgb = {}; var builders = {}; @@ -2645,18 +2645,18 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi r = (paperCenterX < paperCenterY ? paperCenterX : paperCenterY ) - circleMargin; degs = 360 / elementsCount * (elementIndex+1) + 180; rads = deg2rad(degs); - + elementWidth = elementWidth ? elementWidth : GBPConstants.jointElements.minWidth; elementHeight = elementHeight ? elementHeight : GBPConstants.jointElements.minHeight; - + if(elementWidth < GBPConstants.jointElements.minWidth){elementWidth = GBPConstants.jointElements.minWidth;} if(elementWidth > GBPConstants.jointElements.maxWidth){elementWidth = GBPConstants.jointElements.maxWidth;} if(elementHeight < GBPConstants.jointElements.minHeight){elementHeight = GBPConstants.jointElements.minHeight;} if(elementHeight > GBPConstants.jointElements.maxHeight){elementHeight = GBPConstants.jointElements.maxHeight;} - + result.x = paperCenterX + r * Math.cos(rads); result.y = paperCenterY + r * Math.sin(rads); - + degs = degs % 360; if(degs > 90 && degs < 270){ result.x = result.x - elementWidth; @@ -2672,7 +2672,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi } return result; }; - + var paperCenterX = (paper.options.width) / 2; var paperCenterY = (paper.options.height) / 2; topo.nodes.forEach(function(i, index){ @@ -2680,7 +2680,7 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi header = 'Epg', width = Math.max(JointGraphFactory.getLabelLength(label.length), JointGraphFactory.getLabelLength(header.length)), color = GBPConstants.colors[GBPConstants.strings.epg]; - + var itemPos = getXYInCircle(index, topo.nodes.length, paperCenterX, paperCenterY, width, null); var item = JointGraphFactory.createElement(label, itemPos.x, itemPos.y, width, null, GBPConstants.strings.epg , i, label, color, header); @@ -2726,8 +2726,8 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi builders[GBPConstants.strings.config] = function(args, paper) { var storage = args.storage || 'config', tenantId = args.tenantId; - - + + TopologyDataLoaders.getSubjectsBetweenEndpointGroups(false, tenantId, function(data){ setOperConfigTopoData(paper, data); }, function(){}); @@ -2867,4 +2867,4 @@ define(['app/gbp/gbp.module', 'app/gbp/js/joint.clean.build'], function(gbp, joi return jgb; }); -}); \ No newline at end of file +}); diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/images/infinity-loop.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/images/infinity-loop.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/images/infinity-loop.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/images/infinity-loop.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/images/yang-ui-icons/icon-arrow-down.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/images/yang-ui-icons/icon-arrow-down.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/images/yang-ui-icons/icon-arrow-down.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/images/yang-ui-icons/icon-arrow-down.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/images/yang-ui-icons/icon-arrow-right.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/images/yang-ui-icons/icon-arrow-right.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/images/yang-ui-icons/icon-arrow-right.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/images/yang-ui-icons/icon-arrow-right.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/images/yang-ui-icons/icon-arrow-up.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/images/yang-ui-icons/icon-arrow-up.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/images/yang-ui-icons/icon-arrow-up.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/images/yang-ui-icons/icon-arrow-up.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/images/yang-ui-icons/icon-close.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/images/yang-ui-icons/icon-close.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/images/yang-ui-icons/icon-close.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/images/yang-ui-icons/icon-close.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/images/yang-ui-icons/icon-collapse-bits.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/images/yang-ui-icons/icon-collapse-bits.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/images/yang-ui-icons/icon-collapse-bits.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/images/yang-ui-icons/icon-collapse-bits.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/images/yang-ui-icons/icon-danger.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/images/yang-ui-icons/icon-danger.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/images/yang-ui-icons/icon-danger.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/images/yang-ui-icons/icon-danger.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/images/yang-ui-icons/icon-expand-bits.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/images/yang-ui-icons/icon-expand-bits.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/images/yang-ui-icons/icon-expand-bits.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/images/yang-ui-icons/icon-expand-bits.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/images/yang-ui-icons/icon-fill-data.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/images/yang-ui-icons/icon-fill-data.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/images/yang-ui-icons/icon-fill-data.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/images/yang-ui-icons/icon-fill-data.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/images/yang-ui-icons/icon-filter-empty.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/images/yang-ui-icons/icon-filter-empty.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/images/yang-ui-icons/icon-filter-empty.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/images/yang-ui-icons/icon-filter-empty.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/images/yang-ui-icons/icon-filter-full-bck.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/images/yang-ui-icons/icon-filter-full-bck.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/images/yang-ui-icons/icon-filter-full-bck.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/images/yang-ui-icons/icon-filter-full-bck.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/images/yang-ui-icons/icon-filter-full.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/images/yang-ui-icons/icon-filter-full.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/images/yang-ui-icons/icon-filter-full.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/images/yang-ui-icons/icon-filter-full.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/images/yang-ui-icons/icon-list-bck.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/images/yang-ui-icons/icon-list-bck.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/images/yang-ui-icons/icon-list-bck.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/images/yang-ui-icons/icon-list-bck.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/images/yang-ui-icons/icon-list.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/images/yang-ui-icons/icon-list.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/images/yang-ui-icons/icon-list.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/images/yang-ui-icons/icon-list.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/images/yang-ui-icons/icon-next.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/images/yang-ui-icons/icon-next.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/images/yang-ui-icons/icon-next.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/images/yang-ui-icons/icon-next.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/images/yang-ui-icons/icon-plus.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/images/yang-ui-icons/icon-plus.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/images/yang-ui-icons/icon-plus.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/images/yang-ui-icons/icon-plus.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/images/yang-ui-icons/icon-prev.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/images/yang-ui-icons/icon-prev.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/images/yang-ui-icons/icon-prev.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/images/yang-ui-icons/icon-prev.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/images/yang-ui-icons/icon-question.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/images/yang-ui-icons/icon-question.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/images/yang-ui-icons/icon-question.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/images/yang-ui-icons/icon-question.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/images/yang-ui-icons/icon-view.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/images/yang-ui-icons/icon-view.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/images/yang-ui-icons/icon-view.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/images/yang-ui-icons/icon-view.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/js/backbone-min.js b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/js/backbone-min.js similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/js/backbone-min.js rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/js/backbone-min.js diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/js/geometry.js b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/js/geometry.js similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/js/geometry.js rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/js/geometry.js diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/js/joint.clean.build.js b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/js/joint.clean.build.js similarity index 99% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/js/joint.clean.build.js rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/js/joint.clean.build.js index 18e4a0b6c..5d0baa5ff 100644 --- a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/js/joint.clean.build.js +++ b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/js/joint.clean.build.js @@ -1,4 +1,4 @@ -/*! JointJS v0.9.3 - JavaScript diagramming library 2015-05-22 +/*! JointJS v0.9.3 - JavaScript diagramming library 2015-05-22 This Source Code Form is subject to the terms of the Mozilla Public @@ -11,7 +11,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. // For AMD. - define(['app/gbp/js/geometry', 'app/gbp/js/vectorizer', 'jquery', 'app/gbp/js/lodash.min', 'app/gbp/js/backbone-min'], function(g, V, $, _, Backbone) { + define(['app/gbp-old/js/geometry', 'app/gbp-old/js/vectorizer', 'jquery', 'app/gbp-old/js/lodash.min', 'app/gbp-old/js/backbone-min'], function(g, V, $, _, Backbone) { Backbone.$ = $; @@ -46,7 +46,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. }(this, function(root, Backbone, _, $, g, V) { -/*! JointJS v0.9.3 - JavaScript diagramming library 2015-05-22 +/*! JointJS v0.9.3 - JavaScript diagramming library 2015-05-22 This Source Code Form is subject to the terms of the Mozilla Public @@ -6959,4 +6959,4 @@ joint.connectors.smooth = function(sourcePoint, targetPoint, vertices) { return joint; -})); \ No newline at end of file +})); diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/js/joint.css b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/js/joint.css similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/js/joint.css rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/js/joint.css diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/js/lodash.min.js b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/js/lodash.min.js similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/js/lodash.min.js rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/js/lodash.min.js diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/js/vectorizer.js b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/js/vectorizer.js similarity index 99% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/js/vectorizer.js rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/js/vectorizer.js index ee333139d..fe2a05da1 100644 --- a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/js/vectorizer.js +++ b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/js/vectorizer.js @@ -1,4 +1,4 @@ -/*! JointJS v0.9.3 - JavaScript diagramming library 2015-05-22 +/*! JointJS v0.9.3 - JavaScript diagramming library 2015-05-22 This Source Code Form is subject to the terms of the Mozilla Public @@ -18,10 +18,10 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. - define(['app/gbp/js/geometry'], function(g) { + define(['app/gbp-old/js/geometry'], function(g) { return factory(g); }); - + } else if (typeof exports === 'object') { @@ -1052,4 +1052,4 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. return V; -})); \ No newline at end of file +})); diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/action-ref.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/action-ref.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/action-ref.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/action-ref.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/actions.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/actions.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/actions.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/actions.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/box/contract-content-static.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/box/contract-content-static.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/box/contract-content-static.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/box/contract-content-static.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/box/ep-content-static.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/box/ep-content-static.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/box/ep-content-static.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/box/ep-content-static.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/box/epg-content-static.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/box/epg-content-static.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/box/epg-content-static.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/box/epg-content-static.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/box/rule-content-static.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/box/rule-content-static.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/box/rule-content-static.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/box/rule-content-static.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/box/subject-content-static.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/box/subject-content-static.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/box/subject-content-static.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/box/subject-content-static.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/classifier-ref.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/classifier-ref.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/classifier-ref.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/classifier-ref.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/classifiers.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/classifiers.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/classifiers.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/classifiers.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/clause.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/clause.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/clause.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/clause.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/cns.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/cns.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/cns.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/cns.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/contracts.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/contracts.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/contracts.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/contracts.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/docs.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/docs.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/docs.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/docs.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/endpoint.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/endpoint.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/endpoint.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/endpoint.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/epg.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/epg.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/epg.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/epg.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/gateway.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/gateway.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/gateway.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/gateway.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/governance/delivered-policy.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/governance/delivered-policy.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/governance/delivered-policy.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/governance/delivered-policy.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/governance/epg-detail.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/governance/epg-detail.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/governance/epg-detail.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/governance/epg-detail.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/governance/expressed-policy.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/governance/expressed-policy.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/governance/expressed-policy.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/governance/expressed-policy.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/governance/main.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/governance/main.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/governance/main.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/governance/main.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/governance/node-structure.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/governance/node-structure.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/governance/node-structure.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/governance/node-structure.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/governance/renderer-configuration.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/governance/renderer-configuration.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/governance/renderer-configuration.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/governance/renderer-configuration.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/governance/renderer-state.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/governance/renderer-state.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/governance/renderer-state.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/governance/renderer-state.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/governance/subject-detail.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/governance/subject-detail.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/governance/subject-detail.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/governance/subject-detail.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/index.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/index.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/index.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/index.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/l2l3.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/l2l3.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/l2l3.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/l2l3.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/l3-endpoint.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/l3-endpoint.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/l3-endpoint.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/l3-endpoint.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/main/governance.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/main/governance.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/main/governance.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/main/governance.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/main/main.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/main/main.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/main/main.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/main/main.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/main/policy-renderer.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/main/policy-renderer.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/main/policy-renderer.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/main/policy-renderer.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/menu/main-menu.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/menu/main-menu.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/menu/main-menu.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/menu/main-menu.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/parts/breadcrumbs.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/parts/breadcrumbs.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/parts/breadcrumbs.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/parts/breadcrumbs.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/parts/crud-endpoint.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/parts/crud-endpoint.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/parts/crud-endpoint.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/parts/crud-endpoint.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/parts/crud.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/parts/crud.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/parts/crud.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/parts/crud.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/parts/param.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/parts/param.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/parts/param.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/parts/param.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/pns.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/pns.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/pns.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/pns.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/prefix.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/prefix.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/prefix.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/prefix.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/root.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/root.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/root.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/root.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/rules.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/rules.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/rules.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/rules.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/subjects.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/subjects.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/subjects.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/subjects.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/tenants.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/tenants.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/tenants.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/tenants.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/wizards/accessModelWizard.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/wizards/accessModelWizard.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/wizards/accessModelWizard.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/wizards/accessModelWizard.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/wizards/actionReferenceWizard.tpl.html b/groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/wizards/actionReferenceWizard.tpl.html similarity index 100% rename from groupbasedpolicy-old-ui/module/src/main/resources/gbp/views/wizards/actionReferenceWizard.tpl.html rename to groupbasedpolicy-old-ui/module/src/main/resources/gbp-old/views/wizards/actionReferenceWizard.tpl.html diff --git a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/gbp.module.js b/groupbasedpolicy-old-ui/module/src/main/resources/gbp/gbp.module.js deleted file mode 100644 index 39d7f5fb6..000000000 --- a/groupbasedpolicy-old-ui/module/src/main/resources/gbp/gbp.module.js +++ /dev/null @@ -1,58 +0,0 @@ -define(['angularAMD', 'app/routingConfig', 'ui-bootstrap', 'Restangular', 'angular-translate'], function() { - - var gbp = angular.module('app.gbp', ['ui.router.state','app.core', 'ui.bootstrap', 'restangular', 'pascalprecht.translate']); - - gbp.register = gbp; - - gbp.config(function ($stateProvider, $compileProvider, $controllerProvider, $provide, $translateProvider, NavHelperProvider, $filterProvider) { - - $translateProvider.useStaticFilesLoader({ - prefix: 'assets/data/locale-', - suffix: '.json' - }); - - gbp.register = { - directive : $compileProvider.directive, - controller : $controllerProvider.register, - filter: $filterProvider.register, - factory : $provide.factory, - service : $provide.service - }; - - NavHelperProvider.addControllerUrl('app/gbp/gbp.controller'); - NavHelperProvider.addToMenu('gbp', { - "link": "#/gbp/index", - "active": "main.gbp", - "title": "GBP", - "icon": "icon-level-down", - "page": { - "title": "GBP", - "description": "GBP" - } - }); - - var access = routingConfig.accessLevels; - $stateProvider.state('main.gbp', { - url: 'gbp', - abstract: true, - views : { - 'content' : { - templateUrl: 'src/app/gbp/views/root.tpl.html' - } - } - }); - - $stateProvider.state('main.gbp.index', { - url: '/index', - access: access.admin, - views: { - '': { - controller: 'gbpCtrl', - templateUrl: 'src/app/gbp/views/index.tpl.html' - } - } - }); - }); - - return gbp; -}); diff --git a/groupbasedpolicy-ui/bundle/pom.xml b/groupbasedpolicy-ui/bundle/pom.xml new file mode 100644 index 000000000..50752b058 --- /dev/null +++ b/groupbasedpolicy-ui/bundle/pom.xml @@ -0,0 +1,86 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.opendaylight.groupbasedpolicy</groupId> + <artifactId>groupbasedpolicy-ui</artifactId> + <version>0.4.0-SNAPSHOT</version> + </parent> + + <artifactId>groupbasedpolicy-ui-bundle</artifactId> + <name>groupbasedpolicy-ui-bundle</name> + <packaging>bundle</packaging> + + <properties> + <dlux.version>0.4.0-SNAPSHOT</dlux.version> + </properties> + + <dependencies> + <dependency> + <groupId>org.opendaylight.dlux</groupId> + <artifactId>loader</artifactId> + <version>${dlux.version}</version> + </dependency> + <dependency> + <groupId>org.opendaylight.groupbasedpolicy</groupId> + <artifactId>groupbasedpolicy-ui-module</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> + <build> + <resources> + <resource> + <directory>target/generated-resources</directory> + </resource> + <resource> + <directory>src/main/resources</directory> + </resource> + </resources> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <version>2.6</version> + <executions> + <!--loader Resources--> + <execution> + <id>unpack-loader-resources</id> + <goals> + <goal>unpack-dependencies</goal> + </goals> + <phase>generate-resources</phase> + <configuration> + <outputDirectory>${project.build.directory}/generated-resources</outputDirectory> + <groupId>org.opendaylight.dlux</groupId> + <includeArtifactIds>groupbasedpolicy-ui-module</includeArtifactIds> + <excludes>META-INF\/**</excludes> + <excludeTransitive>true</excludeTransitive> + <ignorePermissions>false</ignorePermissions> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <Import-Package>org.osgi.service.http, + org.osgi.framework;version="1.0.0", + org.opendaylight.dlux.loader, + org.slf4j + </Import-Package> + <Export-Package></Export-Package> + </instructions> + </configuration> + </plugin> + </plugins> + </build> + <scm> + <connection>scm:git:ssh://git.opendaylight.org:29418/dlux.git</connection> + <developerConnection>scm:git:ssh://git.opendaylight.org:29418/dlux.git</developerConnection> + <tag>HEAD</tag> + <url>https://wiki.opendaylight.org/view/OpenDaylight_dlux:Main</url> + </scm> +</project> diff --git a/groupbasedpolicy-ui/bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/groupbasedpolicy-ui/bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml new file mode 100644 index 000000000..7031224b8 --- /dev/null +++ b/groupbasedpolicy-ui/bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml @@ -0,0 +1,16 @@ +<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"> + <reference id="httpService" availability="mandatory" activation="eager" interface="org.osgi.service.http.HttpService"/> + <reference id="loader" availability="mandatory" activation="eager" interface="org.opendaylight.dlux.loader.DluxModuleLoader"/> + <bean id="bundle" init-method="initialize" destroy-method="clean" class="org.opendaylight.dlux.loader.DluxModule"> + <property name="httpService" ref="httpService"/> + <property name="loader" ref="loader"/> + <property name="moduleName" value="gbp"/> + <property name="url" value="/src/app/gbp"/> + <property name="directory" value="/gbp"/> + <property name="requireJs" value="app/gbp/gbp.module"/> + <property name="angularJs" value="app.gbp"/> + <property name="cssDependencies"> + <list></list> + </property> + </bean> +</blueprint> diff --git a/groupbasedpolicy-ui/module/pom.xml b/groupbasedpolicy-ui/module/pom.xml new file mode 100644 index 000000000..8060b1569 --- /dev/null +++ b/groupbasedpolicy-ui/module/pom.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (c) 2014 Inocybe Technologies, and others. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v1.0 which accompanies this distribution, + and is available at http://www.eclipse.org/legal/epl-v10.html +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.opendaylight.groupbasedpolicy</groupId> + <artifactId>groupbasedpolicy-ui</artifactId> + <version>0.4.0-SNAPSHOT</version> + </parent> + + <artifactId>groupbasedpolicy-ui-module</artifactId> + <name>${project.artifactId}</name> + <description>GBP UI Module Resources</description> + <packaging>jar</packaging> + +</project> diff --git a/groupbasedpolicy-ui/module/src/main/resources/gbp/common/views/index.tpl.html b/groupbasedpolicy-ui/module/src/main/resources/gbp/common/views/index.tpl.html new file mode 100644 index 000000000..e3959e5d2 --- /dev/null +++ b/groupbasedpolicy-ui/module/src/main/resources/gbp/common/views/index.tpl.html @@ -0,0 +1,3 @@ +<section class="gbpWrapper clearfix"> + New GBP UI +</section> diff --git a/groupbasedpolicy-ui/module/src/main/resources/gbp/common/views/root.tpl.html b/groupbasedpolicy-ui/module/src/main/resources/gbp/common/views/root.tpl.html new file mode 100644 index 000000000..b5c9f540b --- /dev/null +++ b/groupbasedpolicy-ui/module/src/main/resources/gbp/common/views/root.tpl.html @@ -0,0 +1 @@ +<div class="main" ui-view></div> diff --git a/groupbasedpolicy-ui/module/src/main/resources/gbp/gbp.controller.js b/groupbasedpolicy-ui/module/src/main/resources/gbp/gbp.controller.js new file mode 100644 index 000000000..c8ba87064 --- /dev/null +++ b/groupbasedpolicy-ui/module/src/main/resources/gbp/gbp.controller.js @@ -0,0 +1,7 @@ +define('app/gbp/gbp.module', function (gbp) { + + gbp.register.controller('rootGbpCtrl', ['$rootScope', '$scope', + function ($rootScope, $scope) { + + }]); +}); diff --git a/groupbasedpolicy-ui/module/src/main/resources/gbp/gbp.module.js b/groupbasedpolicy-ui/module/src/main/resources/gbp/gbp.module.js new file mode 100644 index 000000000..fb9e51360 --- /dev/null +++ b/groupbasedpolicy-ui/module/src/main/resources/gbp/gbp.module.js @@ -0,0 +1,78 @@ +define([ + 'app/routingConfig', + 'Restangular', + 'angular-translate-loader-partial'], function () { + + var gbp = angular.module('app.gbp', + [ + 'app.core', 'ui.router.state', 'restangular' + ]); + + gbp.register = gbp; // for adding services, controllers, directives etc. to angular module before bootstrap + + gbp.config(function ($stateProvider, $compileProvider, $controllerProvider, $provide, NavHelperProvider, + $translateProvider, $translatePartialLoaderProvider) { + gbp.register = { + controller: $controllerProvider.register, + directive: $compileProvider.directive, + factory: $provide.factory, + service: $provide.service + }; + + //$translatePartialLoaderProvider.addPart('app/gbp/assets/data/locale'); + + NavHelperProvider.addControllerUrl('app/gbp/gbp.controller'); + + NavHelperProvider.addToMenu('gbp', { + "link": "#/gbp/index", + "active": "main.gbp", + "title": "GBP", + "icon": "icon-level-down", + "page": { + "title": "GBP", + "description": "GBP ui" + } + }); + + var access = routingConfig.accessLevels; + + $stateProvider.state('main.gbp', { + url: 'gbp', + abstract: true, + // access: access.public, + views: { + 'content': { + templateUrl: 'src/app/gbp/common/views/root.tpl.html', + + } + } + }); + + $stateProvider.state('main.gbp.index', { + url: '/index', + access: access.admin, + views: { + '': { + controller: 'rootGbpCtrl', + templateUrl: 'src/app/gbp/common/views/index.tpl.html' + } + } + }); + + // TODO: serve it + /*$stateProvider.state('main.gbp.tenant', { + url: '/tenant', + access: access.admin, + views: { + 'gbp': { + controller: 'gbpTenantController', + controllerAs: 'tenantCtrl', + templateUrl: 'src/app/gbp/views/tenant.tpl.html' + } + } + });*/ + + }); + + return gbp; +}); diff --git a/groupbasedpolicy-ui/module/src/main/resources/gbp/main.js b/groupbasedpolicy-ui/module/src/main/resources/gbp/main.js new file mode 100644 index 000000000..3e1ce0db9 --- /dev/null +++ b/groupbasedpolicy-ui/module/src/main/resources/gbp/main.js @@ -0,0 +1,12 @@ +require.config({ + paths : { + + }, + + shim : { + + }, + +}); + +define(['app/gbp/gbp.module']); diff --git a/groupbasedpolicy-ui/pom.xml b/groupbasedpolicy-ui/pom.xml new file mode 100644 index 000000000..a90ba5bb7 --- /dev/null +++ b/groupbasedpolicy-ui/pom.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (c) 2014 Inocybe Technologies, and others. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v1.0 which accompanies this distribution, + and is available at http://www.eclipse.org/legal/epl-v10.html +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>org.opendaylight.groupbasedpolicy</groupId> + <artifactId>groupbasedpolicy-ui</artifactId> + <name>groupbasedpolicy-ui</name> + <description>Resources</description> + <version>0.4.0-SNAPSHOT</version> + <packaging>pom</packaging> + + <prerequisites> + <maven>3.0</maven> + </prerequisites> + + <modules> + <module>module</module> + <module>bundle</module> + </modules> + +</project> diff --git a/pom.xml b/pom.xml index 990686bab..fbecf22f6 100644 --- a/pom.xml +++ b/pom.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved. - This program and the accompanying materials are made available under the - terms of the Eclipse Public License v1.0 which accompanies this distribution, +<!-- Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved. + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html --><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> @@ -22,6 +22,7 @@ <module>neutron-mapper</module> <module>neutron-ovsdb</module> <module>ui-backend</module> + <module>groupbasedpolicy-ui</module> <module>groupbasedpolicy-old-ui</module> <module>distribution-karaf</module> <module>features</module> -- 2.36.6