Fixes for dlux 72/47872/1
authorYakir Dorani <yakir.dorani@hpe.com>
Wed, 2 Nov 2016 18:37:13 +0000 (20:37 +0200)
committerYakir Dorani <yakir.dorani@hpe.com>
Thu, 3 Nov 2016 09:38:23 +0000 (11:38 +0200)
Change-Id: I87f62bd688b202d38548c03172c528edbcefe8ce
Signed-off-by: Yakir Dorani <yakir.dorani@hpe.com>
12 files changed:
dlux/cpeui/cpeui-module/src/main/resources/cpeui/admin.controller.js
dlux/cpeui/cpeui-module/src/main/resources/cpeui/admin.tpl.html
dlux/cpeui/cpeui-module/src/main/resources/cpeui/cpeui.controller.js
dlux/cpeui/cpeui-module/src/main/resources/cpeui/dialogs/AddTenant.tpl.html
dlux/cpeui/cpeui-module/src/main/resources/cpeui/services/cpeui.services.js
dlux/cpeui/cpeui-module/src/main/resources/cpeui/static/cpeui-custom.css
dlux/cpeui/cpeui-module/src/main/resources/cpeui/tenant.controller.js
dlux/cpeui/cpeui-module/src/main/resources/cpeui/tenant.tpl.html
dlux/cpeui/cpeui-module/src/main/resources/cpeui/tenantsTable.controller.js
dlux/cpeui/cpeui-module/src/main/resources/cpeui/tenantsTable.tpl.html
impl/pom.xml
legato-api/src/main/yang/mef-global.yang

index 4c8eea4e349c6119cd02d4dd7798d63faf830506..baa0a699b1dee6850c55a2823d1f5ddc3a7024fc 100644 (file)
@@ -13,15 +13,15 @@ define([ 'app/cpeui/cpeui.module' ], function(cpeui) {
           });
         }
 
-        $scope.AddTenant = function(serviceType) {
-          CpeuiSvc.addTenant($scope.tenantId, serviceType, function() {
+        $scope.AddTenant = function() {
+          CpeuiSvc.addTenant($scope.tenantId, function() {
             $scope.updateView();
           });
         };
 
         $scope.tenantDialog = new CpeuiDialogs.Dialog('AddTenant', {},
             function(obj) {
-              CpeuiSvc.addTenant(obj.id, obj.service_type, function() {
+              CpeuiSvc.addTenant(obj.id, function() {
                 $scope.updateView();
               });
             });
@@ -75,6 +75,20 @@ define([ 'app/cpeui/cpeui.module' ], function(cpeui) {
               });
         }
 
+        $scope.assignNetworkToTenant = function(svc) {
+          CpeuiDialogs.customConfirm("Are You Sure?",
+              "Are you sure you want to assign service "+ svc['svc-id'] +" to tenant " + $scope.selectedTenant[svc['svc-id']] +"?",
+              function() {
+                CpeuiSvc.addTenantToService(svc['svc-id'], $scope.selectedTenant[svc['svc-id']], function(){
+                  svc['tenant-id'] = $scope.selectedTenant[svc['svc-id']];
+                },function(){
+                  $scope.selectedTenant[svc['svc-id']] = undefined;
+                });
+              }, function() {
+                $scope.selectedTenant[svc['svc-id']] = undefined;
+              });
+        };
+
         function updateCpeTenants(unis) {
           // update tenant cpe tenant column
           var hasMultipleTenants = [];
@@ -111,11 +125,7 @@ define([ 'app/cpeui/cpeui.module' ], function(cpeui) {
         // UNIs
         $scope.updateUniView = function() {
           CpeuiSvc.getUnis(function(unis) {
-                $scope.unis = unis;
-                $scope.unis.forEach(function(u) {
-                      u.prettyID = u['uni-id'].split(":")[u['uni-id']
-                          .split(":").length - 1];
-                    });
+                $scope.unis = unis;                
                 updateCpeTenants(unis);
               });
         };
@@ -135,8 +145,53 @@ define([ 'app/cpeui/cpeui.module' ], function(cpeui) {
           });
         };
 
+        $scope.addCEName = function(ce){
+          ce._naming = true;
+          var input = $('#INPUT_' +ce['dev-id']);          
+          // hack to focus input after show is complete
+          setTimeout(function(){input.focus();},20);          
+          input.parent().on('blur',function(){
+            setTimeout(function(){
+              ce._naming = false;
+              delete ce._new_name;
+            },20);
+          });
+          
+          input.bind("keyup", function (eventSubmit) {
+            if(eventSubmit.which === 13) {            
+              $('#OK_' +ce['dev-id']).click();
+            } else if(eventSubmit.which === 27) {              
+              input.parent().blur();
+            }
+          });
+        }
+        
+        $scope.renameCE = function(ce){
+          CpeuiSvc.addCeName(ce, ce._new_name, function(){
+            ce['device-name'] = ce._new_name;
+            });
+          ce._naming = false;
+        }
+        
+        $scope.services = [];
+        $scope.networkNames = {};
+        
+        $scope.updateNetworksView = function() {
+          CpeuiSvc.getAllServices(function(services) {
+            $scope.services = services;
+          });
+          CpeuiSvc.getNetworkNames(function(networks){        
+            networks.forEach(function(net){
+              $scope.networkNames[net.uuid] = net.name;
+            });
+          });
+        };
+        
         // General
         $scope.updateView = function() {
+          if ($scope.isTabSet('admin',4)){
+            $scope.updateNetworksView();
+          }
           $scope.updateTenantView();
           $scope.updateCesView();
           $scope.updateUniView();
index 19b98de87c6faf5dcd5289a1f64892d1a095fb49..75bbd0b53bd0acdba43d5b6f97acc40dc79ea94a 100644 (file)
                                        <i class="icon-tasks"></i> CPEs (Devices)</a></li>
                        <li ng-class="{ active: isTabSet('admin',3)}"
                                ng-click="setTab('admin',3);updateView()"><a id="dashboard-tab"  href="#/cpeui/admin/unis">
-                                <i class="icon-signal"></i> UNIs</a></li>
+                                <i class="icon-exchange"></i> UNIs</a>
+                        </li>
+                        <li ng-class="{ active: isTabSet('admin',4)}"
+                               ng-click="setTab('admin',4);updateNetworksView()"><a id="dashboard-tab"  href="#/cpeui/admin/networks">
+                               <i class="icon-signal"></i> Networks</a>
+                        </li>
                        <li id="refresh_btn" class="active refresh-btn"
                                ng-click="updateView()"><button class="btn add-row"> <i class="icon-refresh"></i> Refresh</button>
                                </li>
                        <tbody id="ces_table">
                                <tr ng-repeat="item in ces | orderBy: '[\'dev-id\']'">                                  
                                        <td class="minimal-width">{{ item['dev-id'] }}</td>
-                                       <td>{{ item['device-name'] }}</td>
+                                       <td>{{ item['device-name'] }}
+                                               <button ng-if="!(item['device-name'] || item._naming)" class="btn right" ng-click="addCEName(item)"><i class="icon-edit"></i> Add Name</button>
+                                               <i class="clear"></i>
+                                               <md-input-container class="md-block no-error-spacer left" ng-show="item._naming" style="width:79%">
+                                                       <label>Device Name</label>
+                                                       <input id="INPUT_{{item['dev-id']}}" type="text" ng-model="item._new_name"/>
+                                               </md-input-container>                                                   
+                                               <button id="OK_{{item['dev-id']}}" ng-show="item._naming" class="btn right" style="max-width:20%" ng-click="renameCE(item)"><i class="icon-ok"></i> OK</button>                                                 
+                                       </td>
                                        <td>
-                                       <!-- 
-                                       <button class="btn add-row btn-block" ng-click="assignCpeToTenant(item['dev-id'], )">SHOW OF RULES ...</button>
-                                        -->
                                                <md-input-container class="md-block">
                                                <label>Multiple</label>
                                                <md-select ng-change="assignCpeToTenant(item['dev-id'])" ng-model="selectedTenant[item['dev-id']]" name="selectedTenant">
                        </tbody>
                </table>
        </div>
+       <div ng-show="isTabSet('admin',4)">
+               <div class="table-header">Networks</div>
+               <table class="footable table table-striped">
+                       <thead>
+                               <tr>
+                                       <th>Network ID</th>
+                                       <th>Network name</th>
+                                       <th>Tenant</th>
+                               </tr>
+                       </thead>
+                       <tbody id="ces_table">
+                               <tr ng-repeat="svc in services ">                                       
+                                       <td class="minimal-width">{{ svc['svc-id'] }}</td>
+                                       <td class="minimal-width">{{ networkNames[svc['svc-id']] }}</td>                                        
+                                       <td ng-if="svc['tenant-id']" class="minimal-width">{{ svc['tenant-id'] }}</td>
+                                       <td ng-if="!(svc['tenant-id'])" class="minimal-width">
+                                       <md-input-container class="md-block">
+                                                       <label>Assign Tenant</label>
+                                               <md-select ng-change="assignNetworkToTenant(svc)" ng-model="selectedTenant[svc['svc-id']]" name="selectedTenant">
+                                                       <md-option ng-repeat="tenant in tenantArray" value="{{ tenant.name }}">{{ tenant.name }}</md-option>
+                                               </md-select>
+                                       </md-input-container>
+                                       </td>
+                               </tr>
+                       </tbody>
+               </table>                
+       </div>
 </div>
index 5ef550057564ed686af4ce388f395bd6f5420bea..b747c79e01b051fdcd3a5c189030152efbcd3bad 100644 (file)
@@ -20,7 +20,8 @@ define([].concat(modules).concat(services).concat(directives).concat(controllers
     var mainTabIndexs = {
       "tenants" : 1,
       "cpes" : 2,
-      "unis" : 3
+      "unis" : 3,
+      "networks" : 4
     }
 
     $scope.tab = {
index 8d1443666d4a88a15b845a3474d37e7db0748514..2afdbec96947dc30ed786f40c9177bc1dec1b561 100644 (file)
                <div ng-message="pattern">name must be only numbers and English characters</div>
                <div ng-message="md-maxlength">The name has to be less than 30 characters long.</div>
        </div>
-      </md-input-container>
-      <md-input-container class="md-block">
-        <label>Service Type</label>
-        <md-select ng-model="obj.service_type" name="servicetype">
-                       <md-option value="L2" default>Layer 2 VPN</md-option>
-                       <md-option value="L3">Layer 3 VPN</md-option>
-        </md-select>
-      </md-input-container>
-
-
+       
+       
+       
+       
+      </md-input-container>      
       </md-content>
       </div>
     </md-dialog-content>
index c8b59254a47d1a4d475ee6bc18cf6ec385e7f52c..2daea7ba52699c730ccfdc48aba77345300fa13c 100644 (file)
@@ -19,13 +19,12 @@ define(['app/cpeui/cpeui.module'],function(cpeui) {
             });
         };
 
-        svc.addTenant = function(name, serviceType, callback){
+        svc.addTenant = function(name, callback){
             $http({
                 method:'POST',
                 url:baseUrl + "tenants-instances/",
                 data: {"tenant-list":[{
-                      "name": name,
-                      "service_type": serviceType
+                      "name": name
                     }]}
             }).then(function successCallback(response) {
                 if (callback != undefined) {
@@ -64,6 +63,26 @@ define(['app/cpeui/cpeui.module'],function(cpeui) {
                 }
             });
         };
+        
+        svc.addCeName = function(ce, new_name, callback) {
+          $http({
+            method:'POST',
+            url:"/restconf/config/mef-topology:mef-topology/devices/device/" + ce['dev-id'],
+            data: {"device-name": new_name}
+        }).then(function successCallback(response) {
+            if (callback != undefined) {
+                callback();
+            }
+          }, function errorCallback(response) {          
+            console.log(response);
+            $http({
+              method:'GET',
+              url:"/restconf/config/mef-topology:mef-topology/devices/device/" + ce['dev-id']              
+            }).then(function successCallback(response) {
+              ce["device-name"] = response.data["device"][0]["device-name"];
+            });
+          });
+        };
 
         svc.getCes = function(callback) {
             var ces;
@@ -153,7 +172,9 @@ define(['app/cpeui/cpeui.module'],function(cpeui) {
                         }
                     }
                 }
-
+                unis.forEach(function(u) {
+                  u.prettyID = u['uni-id'].split(":")[u['uni-id'].split(":").length - 1];
+                });
                 if (callback != undefined) {
                     callback(unis);
                 }
@@ -232,7 +253,7 @@ define(['app/cpeui/cpeui.module'],function(cpeui) {
             });
         };
 
-        svc.getEvc = function(tenantid, callback) {
+        svc.getServices = function(tenantid, callback) {
             var evcs;
             $http({
                 method:'GET',
@@ -243,8 +264,8 @@ define(['app/cpeui/cpeui.module'],function(cpeui) {
                 if (evcs != undefined) {
                     evcs = evcs.filter(function(evc){return evc["tenant-id"] == tenantid;});
                     for (i=0; i < evcs.length; i++) {
-                        var unis = evcs[i].evc.unis.uni;
-                        if (unis != undefined) {
+                        if ((evcs[i].evc != undefined) && (evcs[i].evc.unis.uni != undefined)) {
+                            var unis = evcs[i].evc.unis.uni;
                             for (j=0; j < unis.length; j++) {
                                 if ((unis[j]['evc-uni-ce-vlans'] != undefined) && (unis[j]['evc-uni-ce-vlans']['evc-uni-ce-vlan'] != undefined)){
                                     unis[j].vlans = unis[j]['evc-uni-ce-vlans']['evc-uni-ce-vlan'].map(function(u){return u.vid;}).sort();
@@ -264,6 +285,38 @@ define(['app/cpeui/cpeui.module'],function(cpeui) {
 
             return evcs;
         };
+
+        svc.getAllServices = function(callback) {          
+          $http({
+              method:'GET',
+              url:"/restconf/config/mef-services:mef-services/"
+          }).then(function successCallback(response) {              
+              if (callback != undefined) {
+                  callback(response.data["mef-services"]["mef-service"]);
+              }
+          }, function errorCallback(response) {
+              console.log(response);
+          });
+        };
+        
+        svc.addTenantToService = function(svcId, tenantName, callbackSuccess, callbackFailure){
+          $http({
+            method:'POST',
+            url:"/restconf/config/mef-services:mef-services/mef-service/" + svcId,
+            data:{"tenant-id":tenantName}
+          }).then(function() {
+              if (callbackSuccess != undefined) {
+                callbackSuccess();
+              }
+          }, function() {
+            if (callbackFailure != undefined) {
+              callbackFailure();
+            } else {
+              console.log(response);
+            }
+          });
+        };
+
         svc.removeEvc = function(svcid, callback) {
              $http({
                 method:'DELETE',
@@ -351,6 +404,17 @@ define(['app/cpeui/cpeui.module'],function(cpeui) {
             });
         };
 
+        svc.getNetworkNames = function(callback){
+          $http({
+            method:'GET',
+            url:"/restconf/config/neutron:neutron/networks/"            
+        }).then(function successCallback(response) {
+            if (callback != undefined) {                
+                callback(response.data.networks.network);
+            }
+        });
+        };
+        
         return svc;
 
     });
index 6c306a0b5b79dfb284ea244c6aa2b182930b22a6..d5a0f09dd8f8cdd778766206aed8baba0e588a6c 100644 (file)
@@ -105,6 +105,11 @@ MD-DIALOG {
        min-width: 30% !important;
 }
 
+.no-error-spacer .md-errors-spacer {
+       display: none;
+}
+
+
 MD-TOOLBAR {
     cursor: move; /* fallback if grab cursor is unsupported */
     cursor: grab;
@@ -145,7 +150,7 @@ MD-TOOLBAR:active {
 .showmm label, .showmm input, .showmm div{
        height:inherit;
 }
-.hidemm label, .hidemm input, .hidemm div{{
+.hidemm label, .hidemm input, .hidemm div{
        height:0;
 }
 
@@ -158,4 +163,4 @@ MD-TOOLBAR:active {
 .animate-if.ng-leave,
 .animate-if.ng-enter.ng-enter-active {
   height:0;
-}
+}
\ No newline at end of file
index 53bf797f76b5b8d3eafb85baeeb4bbd6626941c5..53da2fbf1aca7ad945a9ea8aa68f2b87718c0923 100644 (file)
@@ -6,15 +6,22 @@ define([ 'app/cpeui/cpeui.module' ], function(cpeui) {
     $scope.unisTables = {};
     $scope.unis = [];
     $scope.ces = [];
+    $scope.ipvcs = []
     $scope.cesDisplayNames = {};
     $scope.unisMap = {};
+    $scope.networkNames = {};
 
 
     function init(){
       $scope.updateUnis(function(unis){
         CpeuiSvc.getCes(function(ces) {
           $scope.ces = ces.filter(function(item) {
-            return (unis.filterByField('device', item["dev-id"]).length);
+            
+            var filteredUnis = unis.filterByField('device', item["dev-id"]); 
+            filteredUnis = filteredUnis.filterByField('prettyID', 'br-int', true);
+            filteredUnis = filteredUnis.filter(function(i){return !(i.prettyID && i.prettyID.startsWith('tun'));});
+
+            return (filteredUnis.length);
           });
           ces.forEach(function(ce){
             $scope.cesDisplayNames[ce['dev-id']] = ce['device-name'] ? ce['device-name'] : ce['dev-id'];
@@ -22,6 +29,12 @@ define([ 'app/cpeui/cpeui.module' ], function(cpeui) {
           $scope.updateEvcView();
         });
       });
+      
+      CpeuiSvc.getNetworkNames(function(networks){        
+        networks.forEach(function(net){
+          $scope.networkNames[net.uuid] = net.name;
+        });
+      });
     }
 
     $scope.updateUnis = function(callback) {
@@ -39,11 +52,17 @@ define([ 'app/cpeui/cpeui.module' ], function(cpeui) {
     };
 
     $scope.updateEvcView = function() {
-      CpeuiSvc.getEvc($scope.curTenant, function(evcs) {
-        $scope.evcs = evcs;
+      CpeuiSvc.getServices($scope.curTenant, function(services) {
+        
+        $scope.evcs = services.filter(function(svc){ return svc.evc != undefined;});
+        $scope.ipvcs = services.filter(function(svc){ return svc.ipvc != undefined;});
 
         $scope.updateUnis();
 
+        $scope.ipvcs.forEach(function(e){
+          e.isTree = (e.ipvc['ipvc-type'] == 'rooted-multipoint');
+        });
+        
         $scope.evcs.forEach(function(e){
           e.isTree = (e.evc['evc-type'] == 'rooted-multipoint');
           e.device2unis = {};
@@ -52,6 +71,7 @@ define([ 'app/cpeui/cpeui.module' ], function(cpeui) {
               if (e.device2unis[$scope.unisMap[u['uni-id']].device] == undefined){
                 e.device2unis[$scope.unisMap[u['uni-id']].device] = [];
               }
+              u.prettyID = u['uni-id'].split(":")[u['uni-id'].split(":").length - 1];              
               e.device2unis[$scope.unisMap[u['uni-id']].device].push(u);
             });
           }
@@ -60,6 +80,9 @@ define([ 'app/cpeui/cpeui.module' ], function(cpeui) {
     };
 
     $scope.title = function(str) {
+      if (!str) {
+        return str;
+        }
       return str.split('-').map(function(s) {
         return s[0].toUpperCase() + s.slice(1);
       }).join(' ');
@@ -122,9 +145,15 @@ define([ 'app/cpeui/cpeui.module' ], function(cpeui) {
       };
       
       $scope.filterUsedUnis = function(evc){
-        return function(u) {
-          if (evc.evc.unis.uni == undefined) {
-            evc.evc.unis.uni = [];
+        return function(u) {          
+          if (u.prettyID == 'br-int') {
+            return false;
+          }
+          if (u.prettyID && u.prettyID.startsWith('tun')) {
+            return false;
+          }
+          if (evc.evc.unis.uni == undefined){
+            evc.evc.unis.uni = [];     
           }
           return evc.evc.unis.uni.filterByField('uni-id',u['uni-id']).length == 0;
         };
@@ -171,6 +200,9 @@ define([ 'app/cpeui/cpeui.module' ], function(cpeui) {
     $scope.sortUni = function(uni) {
       return uni['uni-id'];
     };
+    $scope.sortIpvc = function(ipvc) {
+      return ipvc['ipvc-id'];
+    };    
 
     init();
   });
index 18458712a7f6dfbb32ed5d4bd09122eb88fddd6c..df5de4d5b1f66c8ace0a39954e18dd6627fda044 100644 (file)
@@ -3,11 +3,13 @@
        <div class="menu">
                <ul id="EVCs-tab" class="nav nav-pills" role="tablist">
                        <li ng-class="{ active: isTabSet('tenantData',1)}" ng-click="setTab('tenantData',1)" >
-                               <a id="evcs-configure-tab" > <i class="icon-tasks"></i> Services</a>
+                               <a id="evcs-configure-tab" > <i class="icon-tasks"></i> L2 Services</a>
                        </li>
+                       <!-- UnComment to add L3 Services 
                        <li ng-class="{ active: isTabSet('tenantData',2)}" ng-click="setTab('tenantData',2)" >
-                               <a id="dashboard-tab" > <i class="icon-signal"></i> Dashboard</a>
-                       </li>
+                               <a id="evcs-configure-tab" > <i class="icon-tasks"></i> L3 Services</a>
+                       </li>                   
+                         END of UnComment to add L3 Services-->
                        <li id="refresh_btn" class="active refresh-btn" ng-click="updateEvcView()">
                                <button class="btn add-row"> <i class="icon-refresh"></i> Refresh</button>
                        </li>
@@ -21,6 +23,7 @@
                                        <tr>
                                                <th>EVC ID</th>
                                                <th>UNIs</th>
+                                               <th>Network Name</th>
                                                <th>SVC Type</th>
                                                <th>EVC Type</th>
                                                <th colspan="2" >Tenant</th>
                                                        <button ng-show="!unisTables[item['svc-id']]" class="btn add-row btn-block" ng-click="unisTables[item['svc-id']] = true;">Show Unis</button>
                                                        <button ng-show="unisTables[item['svc-id']]" class="btn add-row btn-block" ng-click="unisTables[item['svc-id']] = false;">Hide Unis</button>
                                                </td>
+                                               <td >{{ networkNames[item['svc-id']] }}</td>
                                                <td >{{ item['svc-type'] }}</td>
                                                <td >{{ title(item.evc['evc-type']) }}</td>
                                                <td>{{ item['tenant-id'] }}</td>
                                                <td class="delete-tr"><button class="btn btn-md btn-danger" ng-click="deleteEvc(item['svc-id'])"> <i class="icon-trash"></i> </button></td>
                                        </tr>
                                        <tr ng-repeat-end ng-show="unisTables[item['svc-id']]">
-                                               <td colspan="5">
+                                               <td colspan="6">
                                                        <table class="footable table table-striped inner-table">
                                                                <thead>
                                                                        <tr>
                                                                <tbody id="l2_table">
                                                                        <tr ng-repeat-start="(ce, unis) in item.device2unis | orderBy : ce ">
                                                                                <td rowspan="{{unis.length}}">{{ cesDisplayNames[ce] }}</td>
-                                                                               <td ng-repeat-start="uni in unis | orderBy: sortUni | limitTo :1">{{ uni['uni-id'] }}</td>
+                                                                               <td ng-repeat-start="uni in unis | orderBy: sortUni | limitTo :1">{{ uni.prettyID }}</td>
                                                                                <td ng-if="item.isTree">{{ uni['role'] }}</td>
                                                                                <td class="clickable" ng-click="!item.evc['preserve-ce-vlan-id'] ? editVlanDialog.show($event, {svcid:item['svc-id'], uniid:uni['uni-id'], vlans:uni.vlans}) : 0">
                                                                                {{ uni.vlans.join(', ') }} {{item.evc['preserve-ce-vlan-id'] ? '(Preserved)' : ''}}
                                                                                </td>
-                                                                               <td ng-repeat-end class="delete-tr"><button class="btn btn-md btn-danger" ng-click="deleteEvcUni(item['svc-id'], uni['uni-id'])"> <i class="icon-trash"></i> </button></td>
+                                                                               <td ng-repeat-end class="delete-tr" style="white-space: nowrap;">
+                                                                               <button class="btn btn-md btn-danger" ng-click="deleteEvcUni(item['svc-id'], uni['uni-id'])"> <i class="icon-trash"></i> </button>
+                                                                               </td>
                                                                        </tr>
                                                                        <tr ng-repeat-end ng-repeat="uni in unis | orderBy: sortUni | limitTo :(unis.length-1) :1">
-                                                                               <td>{{ uni['uni-id'] }}</td>
+                                                                               <td>{{ uni.prettyID }}</td>
                                                                                <td ng-if="item.isTree">{{ uni['role'] }}</td>
                                                                                <td class="clickable" ng-click="!item.evc['preserve-ce-vlan-id'] ? editVlanDialog.show($event, {svcid:item['svc-id'], uniid:uni['uni-id'], vlans:uni.vlans}) : 0">
                                                                                {{ uni.vlans.join(', ') }} {{item.evc['preserve-ce-vlan-id'] ? '(Preserved)' : ''}}
                                                                                </td>
-                                                                               <td class="delete-tr"><button class="btn btn-md btn-danger" ng-click="deleteEvcUni(item['svc-id'], uni['uni-id'])"> <i class="icon-trash"></i> </button></td>
+                                                                               <td class="delete-tr" style="white-space: nowrap;">
+                                                                               <button class="btn btn-md btn-danger" ng-click="deleteEvcUni(item['svc-id'], uni['uni-id'])"> <i class="icon-trash"></i> </button>
+                                                                               </td>
                                                                        </tr>
                                                                </tbody>
                                                        </table>
                        </table>
                        <div><a class="btn btn-info add-row" ng-click="evcDialog.show($event,{'svcTypes':svcTypes})" >Create EVC</a></div>
                </div>
+               <!-- UnComment to add L3 Services 
                <div ng-show="isTabSet('tenantData',2)">
-                       <h3>To Be Implemented...</h3>
+                       <div class="table-header">IPVCs Table</div>
+                       <table class="footable table table-striped">
+                               <thead>
+                                       <tr>
+                                               <th>IPVC ID</th>
+                                               <th>UNIs</th>
+                                               <th>IPVC Type</th>                                              
+                                               <th colspan="2" >Tenant</th>
+                                       </tr>
+                               </thead>
+                               <tbody id="l2_table">
+                                       <tr ng-repeat-start="ipvc in ipvcs | orderBy : sortIpvc">
+                                               <td rowspan="{{ 1 + unisTables[ipvc.ipvc['ipvc-id']] }}">{{ ipvc.ipvc['ipvc-id'] }}</td>
+                                               <td >
+                                                       <button ng-show="!unisTables[ipvc.ipvc['ipvc-id']]" class="btn add-row btn-block" ng-click="unisTables[ipvc.ipvc['ipvc-id']] = true;">Show Unis</button>
+                                                       <button ng-show="unisTables[ipvc.ipvc['ipvc-id']]" class="btn add-row btn-block" ng-click="unisTables[ipvc.ipvc['ipvc-id']] = false;">Hide Unis</button>
+                                               </td>
+                                               <td >{{ ipvc.ipvc['ipvc-type'] }}</td>                                          
+                                               <td>{{ ipvc['tenant-id'] }}</td>
+                                               <td class="delete-tr"><button class="btn btn-md btn-danger" ng-click="deleteEvc(ipvc['svc-id'])"> <i class="icon-trash"></i> </button></td>
+                                       </tr>
+                                       <tr ng-repeat-end ng-show="unisTables[ipvc.ipvc['ipvc-id']]">
+                                               <td colspan="5">
+                                                       <table class="footable table table-striped inner-table">
+                                                               <thead>
+                                                                       <tr>
+                                                                               <th>Device</th>
+                                                                               <th>UNI</th>
+                                                                               <th ng-if="ipvc.isTree" >Role</th>
+                                                                               <th>Vlans <span style="font-size:small;color:inherit;"> (click to edit)</span></th>
+                                                                               <th class="delete-tr"><button class="btn btn-md btn-info" ng-click="linkEvcUniDialog.show($event, {'ipvc':ipvc,'unis':unis,'ces':ces})"> <i class="icon-plus"></i> </button></th>
+                                                                       </tr>
+                                                               </thead>
+                                                               <tbody id="l2_table">
+                                                                       <tr ng-repeat-start="(ce, unis) in ipvc.device2unis | orderBy : ce ">
+                                                                               <td rowspan="{{unis.length}}">{{ cesDisplayNames[ce] }}</td>
+                                                                               <td ng-repeat-start="uni in unis | orderBy: sortUni | limitTo :1">{{ uni['uni-id'] }}</td>
+                                                                               <td ng-if="ipvc.isTree">{{ uni['role'] }}</td>
+                                                                               <td class="clickable" ng-click="!ipvc.evc['preserve-ce-vlan-id'] ? editVlanDialog.show($event, {svcid:ipvc['svc-id'], uniid:uni['uni-id'], vlans:uni.vlans}) : 0">
+                                                                               {{ uni.vlans.join(', ') }} {{ipvc.evc['preserve-ce-vlan-id'] ? '(Preserved)' : ''}}
+                                                                               </td>
+                                                                               <td ng-repeat-end class="delete-tr"><button class="btn btn-md btn-danger" ng-click="deleteEvcUni(ipvc['svc-id'], uni['uni-id'])"> <i class="icon-trash"></i> </button></td>
+                                                                       </tr>
+                                                                       <tr ng-repeat-end ng-repeat="uni in unis | orderBy: sortUni | limitTo :(unis.length-1) :1">
+                                                                               <td>{{ uni['uni-id'] }}</td>
+                                                                               <td ng-if="item.isTree">{{ uni['role'] }}</td>
+                                                                               <td class="clickable" ng-click="!item.evc['preserve-ce-vlan-id'] ? editVlanDialog.show($event, {svcid:ipvc['svc-id'], uniid:uni['uni-id'], vlans:uni.vlans}) : 0">
+                                                                               {{ uni.vlans.join(', ') }} {{ipvc.evc['preserve-ce-vlan-id'] ? '(Preserved)' : ''}}
+                                                                               </td>
+                                                                               <td class="delete-tr"><button class="btn btn-md btn-danger" ng-click="deleteEvcUni(ipvc['svc-id'], uni['uni-id'])"> <i class="icon-trash"></i> </button></td>
+                                                                       </tr>
+                                                               </tbody>
+                                                       </table>
+                                               </td>
+                                       </tr>
+                               </tbody>
+                       </table>
+                       <div><a class="btn btn-info add-row" ng-click="evcDialog.show($event,{'svcTypes':svcTypes})" >Create IPVC</a></div>
                </div>
+                END OF UnComment to add L3 Services -->                
        </div>
        <div class="clear">
                <button class="btn btn-default pull-right" onclick="window.location='#/cpeui/admin/tenants'" > Back </button>
index f4fee41345e0ce664e0a1221e81a44fc473aa0dd..7277551600c5d9afd7adc9296fe20570669ac320 100644 (file)
@@ -10,15 +10,15 @@ define([ 'app/cpeui/cpeui.module' ], function(cpeui) {
       });
     }
 
-    $scope.AddTenant = function(serviceType) {
-      CpeuiSvc.addTenant($scope.tenantId, serviceType, function() {
+    $scope.AddTenant = function() {
+      CpeuiSvc.addTenant($scope.tenantId, function() {
         $scope.updateTenantView();
       });
     };
 
     $scope.tenantDialog = new CpeuiDialogs.Dialog('AddTenant', {},
         function(obj) {
-          CpeuiSvc.addTenant(obj.id, obj.service_type, function() {
+          CpeuiSvc.addTenant(obj.id, function() {
             $scope.updateTenantView();
           });
         });
index 9084cf8277ecc67f5b7f73e79b4286b856b92513..530b6a72e967278cb7a1edbfde3f0618352fb8bf 100644 (file)
@@ -4,14 +4,12 @@
                        <thead>
                                <tr>
                                        <th>Tenant name</th>
-                                       <th>Service Type</th>
                                        <th colspan="2">Open ...</th>
                                </tr>
                        </thead>
                        <tbody id="tenants_table">
                                <tr ng-repeat="item in tenantArray | orderBy : 'name'">
                                        <td>{{ item.name }}</td>
-                                       <td>{{ item.service_type }}</td>
                                        <td><button class="btn add-row btn-block" ng-click="OpenTenantPortal(item)">Open ...</button></td>
                                        <td class="delete-tr"><button class="btn btn-md btn-danger" ng-click="DeleteTenant(item.name)"> <i class="icon-trash"></i> </button></td>
                                </tr>
index 41ea0c4eb569cb6169c8e5197ea8ee3782a25681..8449913cb1f332353d14825643665d3f07a66f76 100644 (file)
@@ -40,11 +40,11 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
                 <artifactId>maven-bundle-plugin</artifactId>
                 <configuration>
                     <instructions>
-                        <Export-Package>
-                            org.opendaylight.unimgr.mef.nrp.common,
-                            org.opendaylight.unimgr.mef.nrp.api,
-                            org.opendaylight.unimgr.api
-                        </Export-Package>
+<!--                         <Export-Package> -->
+<!--                             org.opendaylight.unimgr.mef.nrp.common, -->
+<!--                             org.opendaylight.unimgr.mef.nrp.api, -->
+<!--                             org.opendaylight.unimgr.api -->
+<!--                         </Export-Package> -->
                     </instructions>
                 </configuration>
             </plugin>
index e86a7bd35233df13540068a07885ef3e6c2f72e9..92e3ce9ba371c07242930e257b2738568bf19433 100644 (file)
@@ -1505,16 +1505,6 @@ module mef-global {
             type string;\r
             description "Tenant Name";\r
         }\r
-        leaf service_type {\r
-            type enumeration {\r
-                enum L2 {\r
-                    description "Layer 2 VPN";\r
-                }\r
-                enum L3 {\r
-                    description "Layer 3 VPN";\r
-                }\r
-            }\r
-        }\r
     }\r
     \r
     container tenants-instances {\r