From: Luji7 Date: Thu, 22 Sep 2016 04:27:22 +0000 (+0800) Subject: add nfvo topo for detail page X-Git-Tag: release/sun~181 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=717ef92726dd5a98ade36d4cb96c8c4112ec30e3;p=vnfsdk%2Frefrepo.git add nfvo topo for detail page Change-Id: I3679ef9a1f89ad01f43d9fa4a0c1bb80dc304e82 Signed-off-by: Luji7 --- diff --git a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/tmTopoController.js b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/tmTopoController.js new file mode 100644 index 00000000..73d776a0 --- /dev/null +++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/tmTopoController.js @@ -0,0 +1,210 @@ +/* + * Copyright (C) 2015 ZTE, Inc. and others. All rights reserved. (ZTE) + * + * 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 vm = avalon.define({ + $id : "tmTopoController", + templateId : "", + nodesData: [], + $language: { + "sProcessing": "  " + +$.i18n.prop("nfv-nso-iui-table-sProcess")+"", + "sLengthMenu": $.i18n.prop("nfv-nso-iui-table-sLengthMenu"), + "sZeroRecords": $.i18n.prop("nfv-nso-iui-table-sZeroRecords"), + "sInfo": " " + $.i18n.prop("nfv-nso-iui-table-sInfo"), + "sInfoEmpty": $.i18n.prop("nfv-nso-iui-table-sInfoEmpty"), + "sGroupActions": $.i18n.prop("nfv-nso-iui-table-sGroupActions"), + "sAjaxRequestGeneralError":$.i18n.prop("nfv-nso-iui-table-sAjaxRequestGeneralError"), + "sEmptyTable": $.i18n.prop("nfv-nso-iui-table-sEmptyTable"), + "oPaginate": { + "sPrevious": $.i18n.prop("nfv-nso-iui-table-sPrevious"), + "sNext": $.i18n.prop("nfv-nso-iui-table-sNext"), + "sPage": $.i18n.prop("nfv-nso-iui-table-sPage"), + "sPageOf": $.i18n.prop("nfv-nso-iui-table-sPageOf") + } + }, + $restUrl : { + queryNodeTemplateUrl : "/openoapi/catalog/v1/servicetemplates/{0}/nodetemplates", + queryTemplateInfoUrl : "/openoapi/catalog/v1/servicetemplates" + }, + $init : function() { + vm.$initTemplateData(); + vm.$initTopoNodesData(); + }, + $initTemplateData : function() { + $.ajax({ + type : "GET", + url : vm.$restUrl.queryTemplateInfoUrl, + success : function(resp) { + if(resp) { + vm.servicesTemplateData = []; + for(var i=0; i 0) { + avalon.scan(); + var params = paramStr.split("&"); + var instanceId = params[0].substring(params[0].indexOf('=') + 1); + var templateQueryUrl = '/openoapi/nslcm/v1.0/ns/' + instanceId; + $.ajax({ + type : "GET", + url : templateQueryUrl, + contentType : "application/json", + dataType : "json", + success : function(jsonResp) { + initTopo(jsonResp.nsdId) + }, + error : function(xhr, ajaxOptions, thrownError) { + alert("Error on page : " + xhr.responseText); + } + }); + } +}; + +function initTopo(templateId) { + vm.templateId = templateId; + vm.$restUrl.queryNodeTemplateUrl = commonUtil.format(vm.$restUrl.queryNodeTemplateUrl, templateId); + vm.$init(); +} + +initParam(); \ No newline at end of file diff --git a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/lcm_detail_nfvo_topology.html b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/lcm_detail_nfvo_topology.html new file mode 100644 index 00000000..efca2326 --- /dev/null +++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/lcm_detail_nfvo_topology.html @@ -0,0 +1,211 @@ + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+
+
+
+
+
+
+
+
0
+ {{network.name}} +
+
+
+
+
0
+

{{subnet.name}}

+

+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
1
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
1
+
+
+ +
+
+
+
+
+ +
+
+
+
+ +
1
+
+
+

+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + +
+
+ + + + + + + + + +
+
+
+ +
+
+

{{nodesDetail.detailTitle}}

+
+ +
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + +
+ + \ No newline at end of file