From 5fa92b4eb456b5f4959c39578a3c6e3555c4ae7d Mon Sep 17 00:00:00 2001 From: seshukm Date: Mon, 6 Mar 2017 18:07:52 +0530 Subject: SDNO service details CLIENT-40 Change-Id: I30eec66cf3073ac918895c3f14b8bf608606a8c1 Signed-off-by: seshukm --- .../src/main/webapp/lifecyclemgr/js/app.js | 64 +++++++++++++++++++--- .../main/webapp/lifecyclemgr/templates/home.html | 18 +++--- .../webapp/lifecyclemgr/templates/overlayVPN.html | 4 +- .../webapp/lifecyclemgr/templates/underlayVPN.html | 4 +- 4 files changed, 68 insertions(+), 22 deletions(-) (limited to 'lifecyclemgr/src/main') 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 += '
'; content += '
'; - content += ''; + content += ''; content += ''+text+''; content += '
'; if(type == "sdno") { @@ -478,25 +502,47 @@ var app = angular.module("lcApp", ["ui.router", "ngTable"])/*, 'ui.bootstrap', ' } else { content += '
'; } + //content += '
'; + content += '
    '; if(type == "sdno") { - content += ''; content += ''; + content += '';*/ } else if(type == "gso"){ - content += '
  • OPEN-O
  • '; + //content += '
  • OPEN-O
  • '; } else if(type == "nfvo"){ - content += '
  • ZTE
  • '; + //content += '
  • ZTE
  • '; } content += '
'; 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 @@
- - + + - + {{lcData.createtime}} @@ -56,7 +56,7 @@ -
+
- {{lcData.serviceName}} + {{lcData.serviceName}} + {{lcData.templateName}} - {{lcData.createTime}} {{lcData.creator}} - +
- 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 @@
+ {{overlayData.name}}
- -- cgit 1.2.3-korg
+ {{underlayData.name}}