diff options
Diffstat (limited to 'lifecyclemgr/src/main')
4 files changed, 68 insertions, 22 deletions
diff --git a/lifecyclemgr/src/main/webapp/lifecyclemgr/js/app.js b/lifecyclemgr/src/main/webapp/lifecyclemgr/js/app.js index 593c6a3d..75541d06 100644 --- a/lifecyclemgr/src/main/webapp/lifecyclemgr/js/app.js +++ b/lifecyclemgr/src/main/webapp/lifecyclemgr/js/app.js @@ -1,3 +1,21 @@ +/*
+
+ Copyright 2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+*/
+
var app = angular.module("lcApp", ["ui.router", "ngTable"])/*, 'ui.bootstrap', 'ui.bootstrap.modal'*/
/*.run(function($rootScope, $location, $state, LoginService) {
@@ -76,12 +94,18 @@ var app = angular.module("lcApp", ["ui.router", "ngTable"])/*, 'ui.bootstrap', ' templateUrl : "templates/inputData.html",
controller : "inputDataCtrl"
})
- .state("home.lcTabs.detailInfo.overlayVPN", {
+
+ .state("home.lcTabs.detailInfo.vpnManager", {
+ url : "/vpnManager",
+ templateUrl : "templates/vpnManager.html",
+ controller : "vpnManagerCtrl"
+ })
+ .state("home.lcTabs.detailInfo.vpnManager.overlayVPN", {
url: "/overlayVPN",
templateUrl : "templates/overlayVPN.html",
controller : "overlayVPNCtrl"
})
- .state("home.lcTabs.detailInfo.underlayVPN", {
+ .state("home.lcTabs.detailInfo.vpnManager.underlayVPN", {
url: "/underlayVPN",
templateUrl : "templates/underlayVPN.html",
controller : "underlayVPNCtrl"
@@ -379,7 +403,7 @@ var app = angular.module("lcApp", ["ui.router", "ngTable"])/*, 'ui.bootstrap', ' var serviceBaseInfo = {
'name' : $scope.lifecycleData.serviceName,
'description' : $scope.lifecycleData.description,
- 'templateId' : $scope.lifecycleData.optSelect.serviceTemplateId,
+ 'templateId' : $scope.lifecycleData.optSelect.serviceTemplateId
};
//send message
$.when(DataService.createService(serviceBaseInfo))
@@ -441,7 +465,7 @@ var app = angular.module("lcApp", ["ui.router", "ngTable"])/*, 'ui.bootstrap', ' .controller('detailInfoCtrl', function($scope, $stateParams, $compile, DataService) {
console.log("detailInfoCtrl --> $stateParams.id:: " + $stateParams.id);
//$scope.currentId = $stateParams.id;
- $scope.rightPanelHeader = "SDNO-VPN Manager";
+ $scope.rightPanelHeader = "VPN Manager";
var jsonData = DataService.loadServiceDetails($stateParams.id);
$(".accordion").html("");
@@ -470,7 +494,7 @@ var app = angular.module("lcApp", ["ui.router", "ngTable"])/*, 'ui.bootstrap', ' var content = '';
content += '<div class="panel panel-default"><div class="panel-heading">';
content += '<h6 class="panel-title">';
- content += '<a style="text-decoration:none;" data-toggle="collapse" data-parent="#accordion" data-target="#collapseOne_'+type+'" onClick="fnLoadTblData(this, \''+type+'\');">';
+ content += '<a style="text-decoration:none;" data-toggle="collapse" data-parent="#accordion" data-target="#collapseOne_'+type+'" ui-sref=".vpnManager" ui-sref-active="link_active_DetailInfo">';
content += '<span id="sdnoLink">'+text+'</span></a>';
content += '</h6></div>';
if(type == "sdno") {
@@ -478,25 +502,47 @@ var app = angular.module("lcApp", ["ui.router", "ngTable"])/*, 'ui.bootstrap', ' } else {
content += '<div id="collapseOne_' + type + '" class="panel-collapse collapse">';
}
+ //content += '<div id="collapseOne_' + type + '" class="panel-collapse collapse" ui-sref=".vpnManager" ui-sref-active="link_active_DetailInfo">';
+
content += '<ul class="list-group nomargin">';
if(type == "sdno") {
- content += '<li id="overLink" class="list-group-item selected textAlign"><span class="glyphicon glyphicon-pencil text-primary pencilimg"></span><a ui-sref=".overlayVPN" ui-sref-active="link_active_DetailInfo" href="#/home/lcTabs/'+id+'/detailInfo/overlayVPN">Overlay VPN</a>';
+ /*content += '<li id="overLink" class="list-group-item selected textAlign"><span class="glyphicon glyphicon-pencil text-primary pencilimg"></span><a ui-sref=".overlayVPN" ui-sref-active="link_active_DetailInfo" href="#/home/lcTabs/'+id+'/detailInfo/overlayVPN">Overlay VPN</a>';
content += '</li>';
content += '<li id="underLink" class="list-group-item textAlign"><span class="glyphicon glyphicon-pencil text-primary pencilimg"></span><a ui-sref=".underlayVPN" ui-sref-active="link_active_DetailInfo" href="#/home/lcTabs/'+id+'/detailInfo/underlayVPN">Underlay VPN</a>';
- content += '</li>';
+ content += '</li>';*/
}
else if(type == "gso"){
- content += '<li id="linkgso" class="list-group-item textAlign"><!--<span class="glyphicon glyphicon-pencil text-primary"></span>--><span class="glyphicon glyphicon-pencil text-primary pencilimg"></span><span>OPEN-O</span></li>';
+ //content += '<li id="linkgso" class="list-group-item textAlign"><!--<span class="glyphicon glyphicon-pencil text-primary"></span>--><span class="glyphicon glyphicon-pencil text-primary pencilimg"></span><span>OPEN-O</span></li>';
}
else if(type == "nfvo"){
- content += '<li id="linknfvo" class="list-group-item textAlign"><span class="glyphicon glyphicon-pencil text-primary pencilimg"></span><span>ZTE</span></li>';
+ //content += '<li id="linknfvo" class="list-group-item textAlign"><span class="glyphicon glyphicon-pencil text-primary pencilimg"></span><span>ZTE</span></li>';
}
content += '</ul></div></div>';
return content;
}
})
+ /*-------------------------------------------------------------------------------VPN Manager---------------------------------------------------------------------*/
+
+ .controller('vpnManagerCtrl', function($scope, $stateParams, $log, DataService) {
+ console.log("vpnManagerCtrl --> $stateParams.id:: " + $stateParams.id);
+ //$scope.rightPanelHeader = "VPN Manager";
+ /*var vtab_tpl = $(modelTemplate).filter('#vtabs').html();
+ var vTabData = {
+ "items": [{
+ "tablabel": "Overlay VPN",
+ "isActive": false
+ }, {
+ "tablabel": "Underlay VPN",
+ "isActive": false
+ }]
+ };
+ var html = Mustache.to_html(vtab_tpl, vTabData);
+ $('#vpnLinks').html(html);*/
+
+ })
+
/*-------------------------------------------------------------------------------OverlayVPN---------------------------------------------------------------------*/
.controller("overlayVPNCtrl", function($scope, $rootScope, $compile, DataService, NgTableParams){
diff --git a/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/home.html b/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/home.html index c2e4917b..cac3f80d 100644 --- a/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/home.html +++ b/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/home.html @@ -25,24 +25,24 @@ <br> <div class="panel panel-default"> <table ng-table="tableParams" class="table table table-striped table-hover table-bordered lctable" show-filter="true"> - <tr ng-repeat="lcData in $data" ui-sref=".lcTabs({id: lcData.serviceId})" ui-sref-active="selected-row" ui-sref-opts="{reload: false}"><!--target="_self" ng-click="setClickedRow($index, lcData.id)" --> - <td header="'ng-table/headers/checkbox.html'"> + <tr ng-repeat="lcData in $data" ui-sref=".lcTabs({id: lcData.serviceId})" ui-sref-active="selected-row" ui-sref-opts="{reload: true}"><!--target="_self" ng-click="setClickedRow($index, lcData.id)" --> + <!--<td header="'ng-table/headers/checkbox.html'"> <input type="checkbox" ng-model="checkboxes.items[lcData.serviceId]" /> - </td> - <td title="'Service Name'" filter="{ name: 'text'}" sortable="'name'"> + </td>--> + <td title="'Service Name'" filter="{ serviceName: 'text'}" sortable="'serviceName'"> <!--<a data-toggle="modal" class="srvname" ng-click="callModal(lcData.id)">{{lcData.name}}</a>--> - <a data-toggle="modal" ng-click="test(lcData.id)" href="#popupModal" class="srvname">{{lcData.serviceName}}</a> + <a data-toggle="modal" ng-click="test(lcData.serviceId)" href="#popupModal" class="srvname">{{lcData.serviceName}}</a> <!--<a data-toggle="modal" ng-href="#popupModal" class="srvname">{{lcData.name}}</a>--><!-- ui-sref=".modal1"--> </td> - <td title="'Template Name'" filter="{ template: 'text'}" sortable="'template'"> + <td title="'Template Name'" filter="{ templateName: 'text'}" sortable="'templateName'"> {{lcData.templateName}}</td> <td title="'Create time'" filter="{ createtime: 'text'}" sortable="'createtime'"> - {{lcData.createTime}}</td> + {{lcData.createtime}}</td> <td title="'Creator'" filter="{ creator: 'text'}" sortable="'creator'"> {{lcData.creator}}</td> <td title="'Action'"> <!--<img src="../images/delete.png" ng-click="editData(lcData.id)" style="cursor: pointer"></img>--> - <span class="pull-right glyphicon glyphicon-edit" ng-click="editData(lcData.serviceId)" style="cursor: pointer;margin: 0 5px"></span> + <!--<span class="pull-right glyphicon glyphicon-edit" ng-click="editData(lcData.serviceId)" style="cursor: pointer;margin: 0 5px"></span>--> <span class="pull-right glyphicon glyphicon-trash" ng-click="deleteIndividualData(lcData.serviceId)" style="cursor: pointer;margin: 0 5px"></span> </td> </tr> @@ -56,7 +56,7 @@ <ui-view></ui-view> </div> -<div id="popupModal" class="modal fade" role="dialog"> +<div id="popupModal" class="modal fade modal-lg" role="dialog"> <ui-view></ui-view> </div> diff --git a/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/overlayVPN.html b/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/overlayVPN.html index 8f13edcf..791f95ac 100644 --- a/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/overlayVPN.html +++ b/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/overlayVPN.html @@ -27,9 +27,9 @@ <div class="panel panel-default">
<table ng-table="tableParams" class="table table table-striped table-hover table-bordered lctable" show-filter="true">
<tr ng-repeat="overlayData in $data">
- <td header="'ng-table/headers/checkbox.html'">
+ <!--<td header="'ng-table/headers/checkbox.html'">
<input type="checkbox" ng-model="checkboxes.items[overlayData.id]" />
- </td>
+ </td>-->
<td title="'Name'" filter="{ name: 'text'}" sortable="'name'">
{{overlayData.name}}
</td>
diff --git a/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/underlayVPN.html b/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/underlayVPN.html index 3489c618..385db8ce 100644 --- a/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/underlayVPN.html +++ b/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/underlayVPN.html @@ -27,9 +27,9 @@ <div class="panel panel-default">
<table ng-table="tableParams" class="table table table-striped table-hover table-bordered lctable" show-filter="true">
<tr ng-repeat="underlayData in $data">
- <td header="'ng-table/headers/checkbox.html'">
+ <!--<td header="'ng-table/headers/checkbox.html'">
<input type="checkbox" ng-model="checkboxes.items[underlayData.id]" />
- </td>
+ </td>-->
<td title="'Name'" filter="{ name: 'text'}" sortable="'name'">
{{underlayData.name}}
</td>
|