summaryrefslogtreecommitdiffstats
path: root/openo-portal/portal-catalog
diff options
context:
space:
mode:
authornancylizi <li.zi30@zte.com.cn>2016-09-22 15:55:40 +0800
committernancylizi <li.zi30@zte.com.cn>2016-09-22 15:55:40 +0800
commit9928f051cbd5d46d134c2239f2d605b98af1336d (patch)
tree8450ff603fe74fc981ac318a7050078710d140f8 /openo-portal/portal-catalog
parent717ef92726dd5a98ade36d4cb96c8c4112ec30e3 (diff)
Add codes splitting template detail tab page into single pages, and modify import path of common files.
Issue-id:TOSCA-71 Change-Id: I4aad4695debe425ca616c0a737862ddb246f2f12 Signed-off-by: nancylizi <li.zi30@zte.com.cn>
Diffstat (limited to 'openo-portal/portal-catalog')
-rw-r--r--openo-portal/portal-catalog/src/main/webapp/catalog/csarPackage.html46
-rw-r--r--openo-portal/portal-catalog/src/main/webapp/catalog/i18n/nfv-nso-iui-i18n-en-US.properties5
-rw-r--r--openo-portal/portal-catalog/src/main/webapp/catalog/i18n/nfv-nso-iui-i18n-zh-CN.properties5
-rw-r--r--openo-portal/portal-catalog/src/main/webapp/catalog/js/template/tmController.js21
-rw-r--r--openo-portal/portal-catalog/src/main/webapp/catalog/js/template/tmNodesController.js233
-rw-r--r--openo-portal/portal-catalog/src/main/webapp/catalog/js/template/tmNodesDetailUtil.js23
-rw-r--r--openo-portal/portal-catalog/src/main/webapp/catalog/js/template/tmTopoController.js200
-rw-r--r--openo-portal/portal-catalog/src/main/webapp/catalog/js/template/tmUtil.js9
-rw-r--r--openo-portal/portal-catalog/src/main/webapp/catalog/nodesDetail.html109
-rw-r--r--openo-portal/portal-catalog/src/main/webapp/catalog/template.html26
-rw-r--r--openo-portal/portal-catalog/src/main/webapp/catalog/templateDetail.html28
-rw-r--r--openo-portal/portal-catalog/src/main/webapp/catalog/topologyDetail.html211
12 files changed, 861 insertions, 55 deletions
diff --git a/openo-portal/portal-catalog/src/main/webapp/catalog/csarPackage.html b/openo-portal/portal-catalog/src/main/webapp/catalog/csarPackage.html
index 3509c94e..501b9126 100644
--- a/openo-portal/portal-catalog/src/main/webapp/catalog/csarPackage.html
+++ b/openo-portal/portal-catalog/src/main/webapp/catalog/csarPackage.html
@@ -21,13 +21,13 @@
<head lang="en">
<meta charset="UTF-8">
<title></title>
- <link href="../component/thirdparty/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
- <link href="../component/thirdparty/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
- <link href="../component/thirdparty/uniform/css/uniform.default.min.css" rel="stylesheet" />
- <link href="../component/css/ZteIctIcons/style.css" rel="stylesheet"/>
- <link href="../framework/css/ngict-component.css" rel="stylesheet"/>
- <link href="../framework/css/plugins.css" rel="stylesheet"/>
- <link href="../vendor/jQuery-File-Upload/css/jquery.fileupload.css" rel="stylesheet" />
+ <link href="../common/thirdparty/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
+ <link href="../common/thirdparty/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
+ <link href="../common/thirdparty/uniform/css/uniform.default.min.css" rel="stylesheet" />
+ <link href="../common/cssstyle.css" rel="stylesheet"/>
+ <link href="../common/css/ngict-component.css" rel="stylesheet"/>
+ <link href="../common/css/plugins.css" rel="stylesheet"/>
+ <link href="../common/thirdparty/jQuery-File-Upload/css/jquery.fileupload.css" rel="stylesheet" />
<link href="css/fileupload.css" rel="stylesheet" />
<link href="css/package.css" rel="stylesheet" />
<style>
@@ -275,24 +275,24 @@
</div>
- <script type="text/javascript" src="../component/thirdparty/jquery/jquery-1.10.2.min.js"></script>
- <script type="text/javascript" src="../component/thirdparty/bootstrap/js/bootstrap.min.js"></script>
- <script type="text/javascript" src="../component/thirdparty/bootbox/bootbox.min.js"></script>
- <script type="text/javascript" src="../component/thirdparty/data-tables/jquery.dataTables.min.js"></script>
- <script type="text/javascript" src="../component/thirdparty/jquery.i18n/jquery.i18n.properties-1.0.9.js"></script>
+ <script type="text/javascript" src="../common/thirdparty/jquery/jquery-1.10.2.min.js"></script>
+ <script type="text/javascript" src="../common/thirdparty/bootstrap/js/bootstrap.min.js"></script>
+ <script type="text/javascript" src="../common/thirdparty/bootbox/bootbox.min.js"></script>
+ <script type="text/javascript" src="../common/thirdparty/data-tables/jquery.dataTables.min.js"></script>
+ <script type="text/javascript" src="../common/thirdparty/jquery.i18n/jquery.i18n.properties-1.0.9.js"></script>
- <script type="text/javascript" src="../vendor/cometd/cometd.js"></script>
- <script type="text/javascript" src="../vendor/cometd/jquery.cometd.js"></script>
- <script type="text/javascript" src="../vendor/jQuery-File-Upload/js/vendor/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../vendor/jQuery-File-Upload/js/jquery.iframe-transport.js"></script>
- <script type="text/javascript" src="../vendor/jQuery-File-Upload/js/jquery.fileupload.js"></script>
- <script type="text/javascript" src="../vendor/bootstrap-growl/bootstrap-growl.min.js"></script>
- <script type="text/javascript" src="../framework/js/core/hk.min.js"></script>
- <script src="../vendor/echarts/echarts-all.js"></script>
- <script type="text/javascript" src="../vendor/avalon/avalon.modern.js"></script>
- <script src="../vendor/avalon/avalon.js"></script>
+ <script type="text/javascript" src="../common/thirdparty/cometd/cometd.js"></script>
+ <script type="text/javascript" src="../common/thirdparty/cometd/jquery.cometd.js"></script>
+ <script type="text/javascript" src="../common/thirdparty/jQuery-File-Upload/../common/thirdparty/jquery.ui.widget.js"></script>
+ <script type="text/javascript" src="../common/thirdparty/jQuery-File-Upload/js/jquery.iframe-transport.js"></script>
+ <script type="text/javascript" src="../common/thirdparty/jQuery-File-Upload/js/jquery.fileupload.js"></script>
+ <script type="text/javascript" src="../common/thirdparty/bootstrap-growl/bootstrap-growl.min.js"></script>
+ <script type="text/javascript" src="../common/js/core/hk.min.js"></script>
+ <script src="../common/thirdparty/echarts/echarts-all.js"></script>
+ <script type="text/javascript" src="../common/thirdparty/avalon/avalon.modern.js"></script>
+ <script src="../common/thirdparty/avalon/avalon.js"></script>
- <script type="text/javascript" src="../framework/js/tools.js"></script>
+ <script type="text/javascript" src="../common/js/tools.js"></script>
<script type="text/javascript" src="js/component/commonUtil.js"></script>
<script type="text/javascript" src="js/component/serverPageTable.js"></script>
diff --git a/openo-portal/portal-catalog/src/main/webapp/catalog/i18n/nfv-nso-iui-i18n-en-US.properties b/openo-portal/portal-catalog/src/main/webapp/catalog/i18n/nfv-nso-iui-i18n-en-US.properties
index 33c6154d..ced9a839 100644
--- a/openo-portal/portal-catalog/src/main/webapp/catalog/i18n/nfv-nso-iui-i18n-en-US.properties
+++ b/openo-portal/portal-catalog/src/main/webapp/catalog/i18n/nfv-nso-iui-i18n-en-US.properties
@@ -94,10 +94,15 @@ nfv-package-iui-drop-zone-selectBtn=Browse
nfv-package-iui-drop-zone-removeBtn=Remove
nfv-package-iui-drop-zone-uploadBtn=Upload
+nfv-template-topo-iui-title=Topology
+nfv-template-nodes-iui-title=Nodes
+
//template table colums
nfv-template-iui-title=Service Template
nfv-template-iui-field-order=Order
nfv-template-iui-field-templatename=Name
+nfv-template-iui-field-templatename-topo=Name(Topo)
+nfv-template-iui-field-templatename-nodes=Name(Nodes)
nfv-template-iui-field-producttype=Type
nfv-template-iui-field-vendor=Vendor
nfv-template-iui-field-version=Version
diff --git a/openo-portal/portal-catalog/src/main/webapp/catalog/i18n/nfv-nso-iui-i18n-zh-CN.properties b/openo-portal/portal-catalog/src/main/webapp/catalog/i18n/nfv-nso-iui-i18n-zh-CN.properties
index f3c45845..d7ee3428 100644
--- a/openo-portal/portal-catalog/src/main/webapp/catalog/i18n/nfv-nso-iui-i18n-zh-CN.properties
+++ b/openo-portal/portal-catalog/src/main/webapp/catalog/i18n/nfv-nso-iui-i18n-zh-CN.properties
@@ -96,10 +96,15 @@ nfv-package-iui-drop-zone-selectBtn=选择
nfv-package-iui-drop-zone-removeBtn=移除
nfv-package-iui-drop-zone-uploadBtn=上传
+nfv-template-topo-iui-title=拓扑
+nfv-template-nodes-iui-title=节点
+
//模板管理表格字段名称定义
nfv-template-iui-title=模板管理
nfv-template-iui-field-order=序号
nfv-template-iui-field-templatename=名称
+nfv-template-iui-field-templatename-topo=名称(拓扑)
+nfv-template-iui-field-templatename-nodes=名称(节点)
nfv-template-iui-field-producttype=类型
nfv-template-iui-field-vendor=厂商
nfv-template-iui-field-version=版本
diff --git a/openo-portal/portal-catalog/src/main/webapp/catalog/js/template/tmController.js b/openo-portal/portal-catalog/src/main/webapp/catalog/js/template/tmController.js
index 2724fc06..a6027bf5 100644
--- a/openo-portal/portal-catalog/src/main/webapp/catalog/js/template/tmController.js
+++ b/openo-portal/portal-catalog/src/main/webapp/catalog/js/template/tmController.js
@@ -24,13 +24,12 @@ var vm = avalon.define({
table: [
{"mData": "serviceTemplateId", name: "ID", "bVisible": false},
{"mData": "templateName", name: $.i18n.prop("nfv-template-iui-field-templatename"), "fnRender" : tmUtil.nameRender},
- // {"mData": "producttype", name: $.i18n.prop("nfv-template-iui-field-producttype")},
+ //{"mData": "templateName", name: $.i18n.prop("nfv-template-iui-field-templatename-topo"), "fnRender" : tmUtil.topoRender},
+ //{"mData": "templateName", name: $.i18n.prop("nfv-template-iui-field-templatename-nodes"), "fnRender" : tmUtil.nodesRender},
{"mData": "vendor", name: $.i18n.prop("nfv-template-iui-field-vendor")},
{"mData": "version", name: $.i18n.prop("nfv-template-iui-field-version")},
{"mData":"csarId", name: "packageID","bVisible": false},
{"mData": "type", name: $.i18n.prop("nfv-template-iui-field-type")},
- //{"mData":"downloadUri", name: $.i18n.prop("nfv-template-iui-field-download-uri")},
- //{"mData": "inputs", name: $.i18n.prop("nfv-template-iui-field-inputs"), "fnRender" : tmUtil.inputsRender}
]
},
$language: {
@@ -76,6 +75,22 @@ var vm = avalon.define({
}
window.open("./templateDetail.html?templateId="+templateId+"&flavor="+flavor,"_self");
},
+ $openTopoDetail : function(templateId, rowId) {
+ var oSelect = $("tbody tr select").eq(rowId);
+ var flavor = "";
+ if(oSelect.length) {
+ oSelect.find("option:selected").val();
+ }
+ window.open("./topologyDetail.html?templateId="+templateId+"&flavor="+flavor,"_self");
+ },
+ $openNodesDetail : function(templateId, rowId) {
+ var oSelect = $("tbody tr select").eq(rowId);
+ var flavor = "";
+ if(oSelect.length) {
+ oSelect.find("option:selected").val();
+ }
+ window.open("./nodesDetail.html?templateId="+templateId+"&flavor="+flavor,"_self");
+ }
});
avalon.scan();
vm.$initTable();
diff --git a/openo-portal/portal-catalog/src/main/webapp/catalog/js/template/tmNodesController.js b/openo-portal/portal-catalog/src/main/webapp/catalog/js/template/tmNodesController.js
new file mode 100644
index 00000000..a25b10cd
--- /dev/null
+++ b/openo-portal/portal-catalog/src/main/webapp/catalog/js/template/tmNodesController.js
@@ -0,0 +1,233 @@
+/*
+ * 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 : "tmNodesController",
+ templateId : "",
+ $language: {
+ "sProcessing": "<img src='../component/thirdparty/data-tables/images/loading-spinner-grey.gif'/><span>&nbsp;&nbsp;"
+ +$.i18n.prop("nfv-nso-iui-table-sProcess")+"</span>",
+ "sLengthMenu": $.i18n.prop("nfv-nso-iui-table-sLengthMenu"),
+ "sZeroRecords": $.i18n.prop("nfv-nso-iui-table-sZeroRecords"),
+ "sInfo": "<span class='seperator'> </span>" + $.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();
+ vm.$initNodesData();
+ },
+ $initTemplateData : function() {
+ $.ajax({
+ type : "GET",
+ url : vm.$restUrl.queryTemplateInfoUrl,
+ success : function(resp) {
+ if(resp) {
+ vm.servicesTemplateData = [];
+ for(var i=0; i<resp.length; i++) {
+ //generate node table display data
+ vm.servicesTemplateData.push(resp[i]);
+ }
+ vm.$initNfvNodesTab();
+ }
+ },
+ error : function() {
+ commonUtil.showMessage($.i18n.prop("nfv-topology-iui-message-error"), "danger");
+ }
+ });
+ },
+ $initNodesData : function() {
+ $.ajax({
+ type: "GET",
+ url: vm.$restUrl.queryNodeTemplateUrl,
+ success: function (resp) {
+ if (resp) {
+ vm.nodesDetail.nodesTemplateDetailData = [];
+ for (var i = 0; i < resp.length; i++) {
+ //generate node table display data
+ var nodeTemplate = topoUtil.generateNodeTemplate(resp[i]);
+ vm.nodesList.nodesData.push(nodeTemplate);
+ }
+ vm.nodesDetail.nodesTemplateDetailData = resp;
+ //generate topology graph display data
+ //vm.topologyTab.topoTemplateData = topoUtil.generateTopoTemplate(vm.nodesList.nodesData.$model);
+ //initialize topology data
+ //topoUtil.initTopoData(vm.topologyTab.topoTemplateData.$model);
+ vm.nodesList.$initNodesTable();
+ }
+ },
+ error: function () {
+ commonUtil.showMessage($.i18n.prop("nfv-topology-iui-message-error"), "danger");
+ }
+ });
+ },
+ servicesTemplateData: [],
+ $nodesTabId : "ict_nodes_template_table",
+ $nodesTemplateTabFields : {// table columns
+ table: [
+ {"mData": "serviceTemplateId", name: "ID","bVisible": false},
+ {"mData": "", name: "","sClass": 'details-control'},
+ {"mData": "templateName", name: $.i18n.prop("nfv-template-iui-field-templatename")},
+ {"mData": "vendor", name: $.i18n.prop("nfv-template-iui-field-vendor")},
+ {"mData": "version", name: $.i18n.prop("nfv-template-iui-field-version")},
+ {"mData":"csarid", name: "packageID","bVisible": false},
+ {"mData": "type", name: $.i18n.prop("nfv-template-iui-field-type")},
+ ]
+ },
+ $initNfvNodesTab: function() {
+ var setting = {};
+ setting.language = vm.$language;
+ setting.paginate = true;
+ setting.info = true;
+ setting.columns = vm.$nodesTemplateTabFields.table;
+ setting.restUrl = vm.$restUrl.queryTemplateInfoUrl;
+ setting.tableId = vm.$nodesTabId;
+ serverPageTable.initDataTable(setting,{},vm.$nodesTabId + '_div');
+ $('#' + vm.$nodesTabId + '>tbody').on("click", 'td.details-control', function () {
+ var tr = $(this).closest('tr');
+ var table = $('#' + vm.$nodesTabId).dataTable();
+ if (table.fnIsOpen(tr[0])) {
+ table.fnClose(tr[0]);
+ tr.removeClass('shown');
+ }
+ else {
+ table.fnOpen(tr[0], vm.nodesList.$format_Detail(), 'details');
+ tr.addClass('shown');
+ }
+ });
+ },
+
+ //nodes list table
+ nodesList :{
+ nodesData: [],
+ $nodesTabDataId : "ict_nodes_table",
+ $nodesTabFields : {// table columns
+ table: [
+ {"mData": "id", name: "ID", "bVisible": false},
+ {"mData": "name", name: $.i18n.prop("nfv-templateDetail-iui-field-nodetypename"), "bSortable": true, "fnRender" : tmNodesDetailUtil.nameRender},
+ {"mData": "type", name: $.i18n.prop("nfv-templateDetail-iui-field-type"), "bSortable": false},
+ {"mData": "containedin", name: $.i18n.prop("nfv-templateDetail-iui-field-containedin"), "bSortable": false},
+ {"mData": "deployedon", name: $.i18n.prop("nfv-templateDetail-iui-field-deployedon"), "bSortable": false},
+ {"mData": "connectedto", name: $.i18n.prop("nfv-templateDetail-iui-field-connectedto"), "bSortable": false},
+ {"mData": "virtuallinksto", name: $.i18n.prop("nfv-templateDetail-iui-field-virtuallinksto"), "bSortable": false}
+ ]
+ },
+ $initNodesTable: function () {
+ var setting = {};
+ setting.language = vm.$language;
+ setting.paginate = true;
+ setting.info = true;
+ setting.columns = vm.nodesList.$nodesTabFields.table;
+ setting.restUrl = vm.$restUrl.queryNodeTemplateUrl;
+ setting.tableId = vm.nodesList.$nodesTabDataId;
+ serverPageTable.initTableWithoutLib(setting,{},vm.nodesList.$nodesTabDataId + '_div');
+ },
+ $format_Detail: function() {
+ var sOut = '<div class="row-fluid" data-name="table_zone"><div class="col-xs-12" id="ict_nodes_table_div"></div></div>'
+ vm.$initNodesData();
+ return sOut;
+ },
+ },
+ //Nodes Details
+ nodesDetail : {
+ nodesTemplateDetailData: [],
+ detailTitle : "",
+ isShow : "none",
+ detailIndex : 0,
+ detailData : [
+ {id: "general", name: $.i18n.prop("nfv-templateDetail-nodesTab-iui-tab-general"), isActive: true},
+ {id: "properties", name: $.i18n.prop("nfv-templateDetail-nodesTab-iui-tab-properties"), isActive: false},
+ {id: "relationShips", name: $.i18n.prop("nfv-templateDetail-nodesTab-iui-tab-relationShips"), isActive: false}
+ ],
+ $showDetails : function(isShow, nodetypeid, nodetypename) {
+ vm.nodesDetail.isShow = isShow;
+ if (isShow == "block") {
+ vm.nodesDetail.detailTitle = nodetypename + " " + $.i18n.prop("nfv-templateDetail-nodesTab-iui-title-nodeDetail"),
+ $('#' + vm.nodesDetail.detailData[0].id).click();
+ vm.nodesDetail.detailData[0].isActive = true;
+ vm.nodesDetail.$initNodeDetailTable(nodetypeid);
+ }
+ },
+ detailCondChange : function(index) {
+ vm.nodesDetail.detailIndex = index;
+ for(var i=0; i<vm.nodesDetail.detailData.length; i++) {
+ vm.nodesDetail.detailData[i].isActive = false;
+ }
+ vm.nodesDetail.detailData[index].isActive = true;
+ },
+ $tableFields : {// table columns
+ general: [
+ {"mData": "key", "name": $.i18n.prop("nfv-templateDetail-nodesTab-iui-field-key"), "bSortable" : false},
+ {"mData": "value", "name": $.i18n.prop("nfv-templateDetail-nodesTab-iui-field-value"), "bSortable" : false}
+ ],
+ properties: [
+ {"mData": "key", "name": $.i18n.prop("nfv-templateDetail-nodesTab-iui-field-key"), "bSortable" : false},
+ {"mData": "value", "name": $.i18n.prop("nfv-templateDetail-nodesTab-iui-field-value"), "bSortable" : false}
+ ],
+ relationShips: [
+ {"mData": "sourceNodeName", "name": $.i18n.prop("nfv-templateDetail-nodesTab-iui-field-sourceNodeName"), "bSortable" : false},
+ {"mData": "targetNodeName", "name": $.i18n.prop("nfv-templateDetail-nodesTab-iui-field-targetNodeName"), "bSortable" : false},
+ {"mData": "type", "name": $.i18n.prop("nfv-templateDetail-nodesTab-iui-field-type"), "bSortable" : false}
+ ]
+ },
+ $initNodeDetailTable: function(nodetemplateid) {
+ var data = topoUtil.getCurrentDetailData(vm.nodesDetail.nodesTemplateDetailData.$model, nodetemplateid);
+ //initialize three tables of nodedetail
+ $.each(vm.nodesDetail.$tableFields, function(key, value){
+ var setting = {};
+ setting.language = vm.$language;
+ setting.paginate = false;
+ setting.info = false;
+ setting.columns = value;
+ setting.tableId = "ict_table_" + key;
+ serverPageTable.initTableWithData(setting, setting.tableId + '_div', data[key]);
+ });
+ }
+ },
+});
+
+var initParam = function() { //initialize template detail params
+ var paramStr = window.location.search.substring(1);
+ if(paramStr.length > 0) {
+ var params = paramStr.split("&");
+ var templateId = params[0].substring(params[0].indexOf('=') + 1);
+ var flavor = params[1].substring(params[1].indexOf('=') + 1);
+ avalon.scan();
+
+ vm.templateId = templateId;
+ vm.$restUrl.queryNodeTemplateUrl = commonUtil.format(vm.$restUrl.queryNodeTemplateUrl, templateId);
+
+ if(flavor) {
+ vm.$restUrl.queryNodeTemplateUrl += "?flavor=" + flavor;
+ }
+
+ vm.$init();
+ }
+};
+initParam(); \ No newline at end of file
diff --git a/openo-portal/portal-catalog/src/main/webapp/catalog/js/template/tmNodesDetailUtil.js b/openo-portal/portal-catalog/src/main/webapp/catalog/js/template/tmNodesDetailUtil.js
new file mode 100644
index 00000000..b5f7dab3
--- /dev/null
+++ b/openo-portal/portal-catalog/src/main/webapp/catalog/js/template/tmNodesDetailUtil.js
@@ -0,0 +1,23 @@
+/*
+ * 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 tmNodesDetailUtil = {};
+tmNodesDetailUtil.timer = null;
+
+tmNodesDetailUtil.nameRender = function(obj) {
+ return '<a href="#" onclick="vm.nodesDetail.$showDetails('
+ + '\'block\',\'' + obj.aData.id + '\', \'' + obj.aData.name + '\')">' + obj.aData.name + '</a>';
+}
+
diff --git a/openo-portal/portal-catalog/src/main/webapp/catalog/js/template/tmTopoController.js b/openo-portal/portal-catalog/src/main/webapp/catalog/js/template/tmTopoController.js
new file mode 100644
index 00000000..bcae3abf
--- /dev/null
+++ b/openo-portal/portal-catalog/src/main/webapp/catalog/js/template/tmTopoController.js
@@ -0,0 +1,200 @@
+/*
+ * 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": "<img src='../component/thirdparty/data-tables/images/loading-spinner-grey.gif'/><span>&nbsp;&nbsp;"
+ +$.i18n.prop("nfv-nso-iui-table-sProcess")+"</span>",
+ "sLengthMenu": $.i18n.prop("nfv-nso-iui-table-sLengthMenu"),
+ "sZeroRecords": $.i18n.prop("nfv-nso-iui-table-sZeroRecords"),
+ "sInfo": "<span class='seperator'> </span>" + $.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<resp.length; i++) {
+ //generate node table display data
+ vm.servicesTemplateData.push(resp[i]);
+ }
+ //vm.$initNfvNodesTab();
+ }
+ },
+ error : function() {
+ commonUtil.showMessage($.i18n.prop("nfv-topology-iui-message-error"), "danger");
+ }
+ });
+ },
+ $initTopoNodesData : function() {
+ $.ajax({
+ type : "GET",
+ url : vm.$restUrl.queryNodeTemplateUrl,
+ success : function(resp) {
+ if(resp) {
+ vm.nodesDetail.nodesTemplateDetailData = [];
+ for(var i=0; i<resp.length; i++) {
+ //generate node table display data
+ var nodeTemplate = topoUtil.generateNodeTemplate(resp[i]);
+ vm.nodesData.push(nodeTemplate);
+ }
+ vm.nodesDetail.nodesTemplateDetailData = resp;
+ //generate topology graph display data
+ vm.topologyTab.topoTemplateData = topoUtil.generateTopoTemplate(vm.nodesData.$model);
+ //initialize topology data
+ topoUtil.initTopoData(vm.topologyTab.topoTemplateData.$model);
+ }
+ },
+ error : function() {
+ commonUtil.showMessage($.i18n.prop("nfv-topology-iui-message-error"), "danger");
+ }
+ });
+ },
+ topologyTab : {
+ topology : "topology.html",
+ vnfTip : $.i18n.prop("nfv-topology-iui-vnf-tip"),
+ btnTip : $.i18n.prop("nfv-topology-iui-btn-return-tip"),
+ topoTemplateData:[],
+ boxTopoDatas:[],
+ networkTopoDatas:[],
+ isShowNum: false,
+ returnBtnVisible : false,
+ $getColor: function(index) {
+ return topoUtil.getColor(index);
+ },
+ $getCidr: function(properties){
+ return topoUtil.getCidr(properties);
+ },
+ $getCpTop: function(index, parentBoxId){
+ return topoUtil.getCpTop(index, parentBoxId);
+ },
+ $initTopology : function() {
+ topoUtil.initTopoData(vm.topologyTab.topoTemplateData.$model);
+ },
+ $showTopo:function(id, name){
+ vm.nodesDetail.$showDetails("block", id, name);
+ },
+ $showVnfTopo: function(templateId) {
+ vm.topologyTab.returnBtnVisible = true;
+ vm.$restUrl.queryNodeTemplateUrl = "/openoapi/catalog/v1/servicetemplates/" + templateId + "/nodetemplates";
+ vm.$init();
+ },
+ $returnNS: function() {
+ vm.topologyTab.returnBtnVisible = false;
+ vm.$restUrl.queryNodeTemplateUrl = "/openoapi/catalog/v1/servicetemplates/" + vm.templateId + "/nodetemplates";
+ vm.$init();
+ }
+ },
+ //Nodes Details
+ nodesDetail : {
+ nodesTemplateDetailData: [],
+ detailTitle : "",
+ isShow : "none",
+ detailIndex : 0,
+ detailData : [
+ {id: "general", name: $.i18n.prop("nfv-templateDetail-nodesTab-iui-tab-general"), isActive: true},
+ {id: "properties", name: $.i18n.prop("nfv-templateDetail-nodesTab-iui-tab-properties"), isActive: false},
+ {id: "relationShips", name: $.i18n.prop("nfv-templateDetail-nodesTab-iui-tab-relationShips"), isActive: false}
+ ],
+ $showDetails : function(isShow, nodetypeid, nodetypename) {
+ vm.nodesDetail.isShow = isShow;
+ if (isShow == "block") {
+ vm.nodesDetail.detailTitle = nodetypename + " " + $.i18n.prop("nfv-templateDetail-nodesTab-iui-title-nodeDetail"),
+ $('#' + vm.nodesDetail.detailData[0].id).click();
+ vm.nodesDetail.detailData[0].isActive = true;
+ vm.nodesDetail.$initNodeDetailTable(nodetypeid);
+ }
+ },
+ detailCondChange : function(index) {
+ vm.nodesDetail.detailIndex = index;
+ for(var i=0; i<vm.nodesDetail.detailData.length; i++) {
+ vm.nodesDetail.detailData[i].isActive = false;
+ }
+ vm.nodesDetail.detailData[index].isActive = true;
+ },
+ $tableFields : {// table columns
+ general: [
+ {"mData": "key", "name": $.i18n.prop("nfv-templateDetail-nodesTab-iui-field-key"), "bSortable" : false},
+ {"mData": "value", "name": $.i18n.prop("nfv-templateDetail-nodesTab-iui-field-value"), "bSortable" : false}
+ ],
+ properties: [
+ {"mData": "key", "name": $.i18n.prop("nfv-templateDetail-nodesTab-iui-field-key"), "bSortable" : false},
+ {"mData": "value", "name": $.i18n.prop("nfv-templateDetail-nodesTab-iui-field-value"), "bSortable" : false}
+ ],
+ relationShips: [
+ {"mData": "sourceNodeName", "name": $.i18n.prop("nfv-templateDetail-nodesTab-iui-field-sourceNodeName"), "bSortable" : false},
+ {"mData": "targetNodeName", "name": $.i18n.prop("nfv-templateDetail-nodesTab-iui-field-targetNodeName"), "bSortable" : false},
+ {"mData": "type", "name": $.i18n.prop("nfv-templateDetail-nodesTab-iui-field-type"), "bSortable" : false}
+ ]
+ },
+ $initNodeDetailTable: function(nodetemplateid) {
+ var data = topoUtil.getCurrentDetailData(vm.nodesDetail.nodesTemplateDetailData.$model, nodetemplateid);
+ //initialize three tables of nodedetail
+ $.each(vm.nodesDetail.$tableFields, function(key, value){
+ var setting = {};
+ setting.language = vm.$language;
+ setting.paginate = false;
+ setting.info = false;
+ setting.columns = value;
+ setting.tableId = "ict_table_" + key;
+ serverPageTable.initTableWithData(setting, setting.tableId + '_div', data[key]);
+ });
+ }
+ },
+});
+
+var initParam = function() { //initialize template detail params
+ var paramStr = window.location.search.substring(1);
+ if(paramStr.length > 0) {
+ var params = paramStr.split("&");
+ var templateId = params[0].substring(params[0].indexOf('=') + 1);
+ var flavor = params[1].substring(params[1].indexOf('=') + 1);
+ avalon.scan();
+
+ vm.templateId = templateId;
+ vm.$restUrl.queryNodeTemplateUrl = commonUtil.format(vm.$restUrl.queryNodeTemplateUrl, templateId);
+
+ if(flavor) {
+ vm.$restUrl.queryNodeTemplateUrl += "?flavor=" + flavor;
+ }
+
+ vm.$init();
+ }
+};
+initParam(); \ No newline at end of file
diff --git a/openo-portal/portal-catalog/src/main/webapp/catalog/js/template/tmUtil.js b/openo-portal/portal-catalog/src/main/webapp/catalog/js/template/tmUtil.js
index f604225c..b0137b0c 100644
--- a/openo-portal/portal-catalog/src/main/webapp/catalog/js/template/tmUtil.js
+++ b/openo-portal/portal-catalog/src/main/webapp/catalog/js/template/tmUtil.js
@@ -20,10 +20,15 @@ tmUtil.nameRender = function(obj) {
+ '\',' + obj.iDataRow + ')">' + obj.aData.templateName + '</a>';
}
-tmUtil.elasticRender = function(obj) {
- return null;
+tmUtil.topoRender = function(obj) {
+ return '<a href="#" onclick="vm.$openTopoDetail(\'' + obj.aData.serviceTemplateId
+ + '\',' + obj.iDataRow + ')">' + obj.aData.templateName + '</a>';
}
+tmUtil.nodesRender = function(obj) {
+ return '<a href="#" onclick="vm.$openNodesDetail(\'' + obj.aData.serviceTemplateId
+ + '\',' + obj.iDataRow + ')">' + obj.aData.templateName + '</a>';
+}
/*tmUtil.openDetail = function(obj) {
if (obj) {
var framework;
diff --git a/openo-portal/portal-catalog/src/main/webapp/catalog/nodesDetail.html b/openo-portal/portal-catalog/src/main/webapp/catalog/nodesDetail.html
new file mode 100644
index 00000000..dfb771c8
--- /dev/null
+++ b/openo-portal/portal-catalog/src/main/webapp/catalog/nodesDetail.html
@@ -0,0 +1,109 @@
+<!--
+
+ 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.
+
+-->
+<html>
+<head>
+ <head lang="en">
+ <meta charset="UTF-8">
+ <title></title>
+ <link href="../common/thirdparty/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
+ <link href="../common/thirdparty/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
+ <link href="../common/thirdparty/uniform/css/uniform.default.min.css" rel="stylesheet" />
+ <link href="../common/css/style.css" rel="stylesheet"/>
+ <link href="../common/css/ngict-component.css" rel="stylesheet"/>
+ <link href="../common/css/plugins.css" rel="stylesheet"/>
+ <link href="css/platform/animate.min.css" rel="stylesheet"/>
+ <link href="css/datatable-sort.css" rel="stylesheet"/>
+ <link href="css/templateDetail.css" rel="stylesheet" />
+ <link href="css/topology.css" rel="stylesheet" />
+ <style type="text/css">
+ .ms-controller {
+ visibility: hidden;
+ }
+ .ms-nodedetail {
+ display: none;
+ }
+ </style>
+ </head>
+<body>
+ <div ms-controller="tmNodesController" class="container-fluid ms-controller">
+ <div class="row">
+ <div class="col-xs-6 col-md-6 col-sm-6 col-lg-6 titlefont">
+ <span id="nfv-template-nodes-iui-title" name_i18n="com_zte_nfv_nsoc_i18n"></span>
+ </div>
+ </div>
+ <div class="separator-line"></div>
+ <div class="row-fluid" data-name="table_zone">
+ <div class="col-xs-12" id='ict_nodes_template_table_div'></div>
+ </div>
+
+ <div id="right-menu" class="ms-nodedetail" ms-css-display="vm.nodesDetail.isShow">
+ <div>
+ <div class="title"><h4>{{vm.nodesDetail.detailTitle}}</h4>
+ <div class="rigth right-button-pointer" ms-click="vm.nodesDetail.$showDetails('none')">
+ <button type="button" class="btn btn-default">
+ <span id="nfv-templateDetail-nodesTab-iui-btn-close" name_i18n="com_zte_nfv_nsoc_i18n"></span>
+ </button>
+ </div>
+ </div>
+ <div>
+ <div class="btn-group" >
+ <button type="button" class="btn btn-default" ms-repeat="vm.nodesDetail.detailData" ms-click="vm.nodesDetail.detailCondChange($index)" ms-attr-id="el.id"
+ ms-class="active: el.isActive">{{el.name}}
+ </button>
+ </div>
+ <div ms-if="vm.nodesDetail.detailIndex === 0">
+ <div class="row-fluid" data-name="table_zone">
+ <div id='ict_table_general_div' class="vm.nodesDetail"></div>
+ </div>
+ </div>
+ <div ms-if="vm.nodesDetail.detailIndex === 1">
+ <div class="row-fluid" data-name="table_zone">
+ <div id='ict_table_properties_div' class="vm.nodesDetail"></div>
+ </div>
+ </div>
+ <div ms-if="vm.nodesDetail.detailIndex === 2">
+ <div class="row-fluid" data-name="table_zone">
+ <div id='ict_table_relationShips_div' class="vm.nodesDetail"></div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <script type="text/javascript" src="../common/thirdparty/jquery/jquery-1.10.2.min.js"></script>
+ <script type="text/javascript" src="../common/thirdparty/bootstrap/js/bootstrap.min.js"></script>
+ <script type="text/javascript" src="../common/thirdparty/data-tables/jquery.dataTables.js"></script>
+ <script type="text/javascript" src="../common/thirdparty/data-tables/jquery.dataTables.min.js"></script>
+ <script type="text/javascript" src="../common/thirdparty/jquery.i18n/jquery.i18n.properties-1.0.9.js"></script>
+
+ <script type="text/javascript" src="../common/bootstrap-growl/bootstrap-growl.min.js"></script>
+ <script type="text/javascript" src="../common/thirdparty/avalon/avalon.modern.js"></script>
+
+ <script type="text/javascript" src="../common/js/tools.js"></script>
+
+ <script type="text/javascript" src="js/component/commonUtil.js"></script>
+ <script type="text/javascript" src="js/component/serverPageTable.js"></script>
+ <script type="text/javascript" src="js/component/loadi18n_nsoc.js"></script>
+
+ <script type="text/javascript" src="js/template/tmNodesDetailUtil.js"></script>
+ <script type="text/javascript" src="js/template/tmUtil.js"></script>
+ <script type="text/javascript" src="js/template/tmNodesController.js"></script>
+ <script type="text/javascript" src="js/template/topoUtil.js"></script>
+ </div>
+</body>
+</html> \ No newline at end of file
diff --git a/openo-portal/portal-catalog/src/main/webapp/catalog/template.html b/openo-portal/portal-catalog/src/main/webapp/catalog/template.html
index cbc6528c..8a80c24b 100644
--- a/openo-portal/portal-catalog/src/main/webapp/catalog/template.html
+++ b/openo-portal/portal-catalog/src/main/webapp/catalog/template.html
@@ -21,12 +21,12 @@
<head lang="en">
<meta charset="UTF-8">
<title></title>
- <link href="../component/thirdparty/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
- <link href="../component/thirdparty/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
- <link href="../component/thirdparty/uniform/css/uniform.default.min.css" rel="stylesheet" />
- <link href="../component/css/ZteIctIcons/style.css" rel="stylesheet"/>
- <link href="../framework/css/ngict-component.css" rel="stylesheet"/>
- <link href="../framework/css/plugins.css" rel="stylesheet"/>
+ <link href="../common/thirdparty/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
+ <link href="../common/thirdparty/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
+ <link href="../common/thirdparty/uniform/css/uniform.default.min.css" rel="stylesheet" />
+ <link href="../common/css/style.css" rel="stylesheet"/>
+ <link href="../common/css/ngict-component.css" rel="stylesheet"/>
+ <link href="../common/css/plugins.css" rel="stylesheet"/>
<link href="css/template.css" rel="stylesheet" />
<style type="text/css">
.ms-controller {
@@ -51,15 +51,15 @@
</div>
</div>
- <script type="text/javascript" src="../component/thirdparty/jquery/jquery-1.10.2.min.js"></script>
- <script type="text/javascript" src="../component/thirdparty/bootstrap/js/bootstrap.min.js"></script>
- <script type="text/javascript" src="../component/thirdparty/bootbox/bootbox.min.js"></script>
- <script type="text/javascript" src="../component/thirdparty/data-tables/jquery.dataTables.min.js"></script>
- <script type="text/javascript" src="../component/thirdparty/jquery.i18n/jquery.i18n.properties-1.0.9.js"></script>
+ <script type="text/javascript" src="../common/thirdparty/jquery/jquery-1.10.2.min.js"></script>
+ <script type="text/javascript" src="../common/thirdparty/bootstrap/js/bootstrap.min.js"></script>
+ <script type="text/javascript" src="../common/thirdparty/bootbox/bootbox.min.js"></script>
+ <script type="text/javascript" src="../common/thirdparty/data-tables/jquery.dataTables.min.js"></script>
+ <script type="text/javascript" src="../common/thirdparty/jquery.i18n/jquery.i18n.properties-1.0.9.js"></script>
- <script type="text/javascript" src="../vendor/avalon/avalon.modern.js"></script>
+ <script type="text/javascript" src="../common/thirdparty/avalon/avalon.modern.js"></script>
- <script type="text/javascript" src="../framework/js/tools.js"></script>
+ <script type="text/javascript" src="../common/js/tools.js"></script>
<script type="text/javascript" src="js/component/commonUtil.js"></script>
<script type="text/javascript" src="js/component/serverPageTable.js"></script>
diff --git a/openo-portal/portal-catalog/src/main/webapp/catalog/templateDetail.html b/openo-portal/portal-catalog/src/main/webapp/catalog/templateDetail.html
index 8937d3b1..856a3bb4 100644
--- a/openo-portal/portal-catalog/src/main/webapp/catalog/templateDetail.html
+++ b/openo-portal/portal-catalog/src/main/webapp/catalog/templateDetail.html
@@ -21,12 +21,12 @@
<head lang="en">
<meta charset="UTF-8">
<title></title>
- <link href="../component/thirdparty/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
- <link href="../component/thirdparty/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
- <link href="../component/thirdparty/uniform/css/uniform.default.min.css" rel="stylesheet" />
- <link href="../component/css/ZteIctIcons/style.css" rel="stylesheet"/>
- <link href="../framework/css/ngict-component.css" rel="stylesheet"/>
- <link href="../framework/css/plugins.css" rel="stylesheet"/>
+ <link href="../common/thirdparty/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
+ <link href="../common/thirdparty/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
+ <link href="../common/thirdparty/uniform/css/uniform.default.min.css" rel="stylesheet" />
+ <link href="../common/cssstyle.css" rel="stylesheet"/>
+ <link href="../common/css/ngict-component.css" rel="stylesheet"/>
+ <link href="../common/css/plugins.css" rel="stylesheet"/>
<link href="css/platform/animate.min.css" rel="stylesheet"/>
<link href="css/datatable-sort.css" rel="stylesheet"/>
<link href="css/templateDetail.css" rel="stylesheet" />
@@ -105,16 +105,16 @@
</div>
</div>
- <script type="text/javascript" src="../component/thirdparty/jquery/jquery-1.10.2.min.js"></script>
- <script type="text/javascript" src="../component/thirdparty/bootstrap/js/bootstrap.min.js"></script>
- <script type="text/javascript" src="../component/thirdparty/data-tables/jquery.dataTables.js"></script>
- <script type="text/javascript" src="../component/thirdparty/data-tables/jquery.dataTables.min.js"></script>
- <script type="text/javascript" src="../component/thirdparty/jquery.i18n/jquery.i18n.properties-1.0.9.js"></script>
+ <script type="text/javascript" src="../common/thirdparty/jquery/jquery-1.10.2.min.js"></script>
+ <script type="text/javascript" src="../common/thirdparty/bootstrap/js/bootstrap.min.js"></script>
+ <script type="text/javascript" src="../common/thirdparty/data-tables/jquery.dataTables.js"></script>
+ <script type="text/javascript" src="../common/thirdparty/data-tables/jquery.dataTables.min.js"></script>
+ <script type="text/javascript" src="../common/thirdparty/jquery.i18n/jquery.i18n.properties-1.0.9.js"></script>
- <script type="text/javascript" src="../vendor/bootstrap-growl/bootstrap-growl.min.js"></script>
- <script type="text/javascript" src="../vendor/avalon/avalon.modern.js"></script>
+ <script type="text/javascript" src="../common/thirdparty/bootstrap-growl/bootstrap-growl.min.js"></script>
+ <script type="text/javascript" src="../common/thirdparty/avalon/avalon.modern.js"></script>
- <script type="text/javascript" src="../framework/js/tools.js"></script>
+ <script type="text/javascript" src="../common/js/tools.js"></script>
<script type="text/javascript" src="js/component/commonUtil.js"></script>
<script type="text/javascript" src="js/component/serverPageTable.js"></script>
diff --git a/openo-portal/portal-catalog/src/main/webapp/catalog/topologyDetail.html b/openo-portal/portal-catalog/src/main/webapp/catalog/topologyDetail.html
new file mode 100644
index 00000000..5a905b64
--- /dev/null
+++ b/openo-portal/portal-catalog/src/main/webapp/catalog/topologyDetail.html
@@ -0,0 +1,211 @@
+<!--
+
+ 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.
+
+-->
+<html>
+<head>
+ <head lang="en">
+ <meta charset="UTF-8">
+ <title></title>
+ <link href="../common/thirdparty/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
+ <link href="../common/thirdparty/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
+ <link href="../common/thirdparty/uniform/css/uniform.default.min.css" rel="stylesheet" />
+ <link href="../common/cssstyle.css" rel="stylesheet"/>
+ <link href="../common/css/ngict-component.css" rel="stylesheet"/>
+ <link href="../common/css/plugins.css" rel="stylesheet"/>
+ <link href="css/platform/animate.min.css" rel="stylesheet"/>
+ <link href="css/datatable-sort.css" rel="stylesheet"/>
+ <link href="css/templateDetail.css" rel="stylesheet" />
+ <link href="css/topology.css" rel="stylesheet" />
+ <style type="text/css">
+ .ms-controller {
+ visibility: hidden;
+ }
+ .ms-nodedetail {
+ display: none;
+ }
+ </style>
+ </head>
+<body>
+ <div ms-controller="tmTopoController" class="container-fluid ms-controller">
+ <div class="row">
+ <div class="col-xs-6 col-md-6 col-sm-6 col-lg-6 titlefont">
+ <span id="nfv-template-topo-iui-title" name_i18n="com_zte_nfv_nsoc_i18n"></span>
+ </div>
+ </div>
+ <div class="separator-line"></div>
+ <div class="container-fluid">
+ <div id="networks" style="float:left;display:inline-block">
+ <div class="networksContainer">
+ <div class="network" ms-repeat-network="topologyTab.networkTopoDatas">
+ <div class="name" tooltip="" ms-attr-title="network.name" ms-if="network.name"
+ ms-click="topologyTab.$showTopo(network.id, network.name)">
+ <div ms-if="topologyTab.isShowNum" ms-text="network.num" class="badge">0</div>
+ <span>{{network.name}}</span>
+ </div>
+ <div class="subnet" ms-repeat-subnet="network.subnets">
+ <div class="line">
+ <div class="vlan" ms-attr-id="subnet.id" ms-css-background-color="topologyTab.$getColor($index+$outer.$index)" ms-attr-title="subnet.name" ms-click="topologyTab.$showTopo(subnet.id, subnet.name)">
+ <div ms-if="topologyTab.isShowNum" ms-text="subnet.num" class="badge">0</div>
+ <p>{{subnet.name}}</p>
+ <p class="cidr" ms-text="topologyTab.$getCidr(subnet.properties)"></p>
+ </div>
+ </div>
+ </div><!--end repeat network.subnets-->
+ </div><!--end repeat topologyTab.networkTopoDatas-->
+ </div>
+ </div>
+ <div id="topo" style="float:left;display:inline-block">
+ <div class="row-fluid" data-name="topo_zone">
+ <div class="bpContainer" ms-each-host="topologyTab.boxTopoDatas">
+ <div>
+ <div class="box" ms-attr-id="host.id">
+ <div class="piProgress" size="55">
+ <div class="circle">
+ <i class="gs-node-icon fa fa-desktop" ></i>
+ <div ms-if="topologyTab.isShowNum" ms-text="host.num" class="badge">1</div>
+ </div>
+ <div class="smallCircle" ms-repeat-cp="host.cp" ms-attr-id="cp.id" ms-title="cp.name"
+ ms-click="topologyTab.$showTopo(cp.id,cp.name)" ms-css-top="topologyTab.$getCpTop($index,host.id)">
+ <i class="gs-cp-icon fa fa-credit-card" ></i>
+ </div>
+ </div>
+ <div class="head" ms-hover="boxHover" tooltip ms-attr-title="host.name" ms-text="host.name" ms-click="topologyTab.$showTopo(host.id, host.name)">
+ </div>
+ <div class="holder">
+ <div class="nest" ms-if="host.vnfdid" ms-click="topologyTab.$showVnfTopo(host.vnfdid)"
+ ms-attr-title="topologyTab.vnfTip"><!-- only display nested ns template -->
+ <div class="plus">
+ <i class="fa fa-plus" style="color: #3aaeda;"></i>
+ </div>
+ </div>
+ <div ms-each-box="host.children" ><!-- ngRepeat: node in map track by node.name -->
+ <div>
+ <div class="box" ms-attr-id="box.id">
+ <div class="piProgress" size="55">
+ <div class="circle">
+ <i class="gs-node-icon fa fa-cogs"></i>
+ <div ms-if="topologyTab.isShowNum" ms-text="box.num" class="badge">1</div>
+ </div>
+ <div class="smallCircle" ms-repeat-cp="box.cp" ms-attr-id="cp.id" ms-title="cp.name" ms-click="topologyTab.$showTopo(cp.id,cp.name)" ms-css-top="topologyTab.$getCpTop($index,box.id)">
+ <i class="gs-cp-icon fa fa-credit-card" ></i>
+ </div>
+ </div>
+ <div class="head" ms-hover="boxHover"
+ tooltip="" ms-click="topologyTab.$showTopo(box.id, box.name)" ms-attr-title="box.name" ms-text="box.name"></div>
+ <div class="holder" >
+ <div ms-each-app="box.children">
+ <!-- ngRepeat: node in map track by node.name -->
+ <div>
+ <div class="app" ms-attr-id="app.id" ms-click="topologyTab.$showTopo(app.id, app.name)" ms-hover="appHover">
+ <div class="piProgress" size="55">
+ <div class="circle" >
+ <i class="gs-node-icon fa fa-cog" ></i>
+ <div ms-if="topologyTab.isShowNum" ms-text="app.num" class="badge">1</div>
+ </div>
+ </div>
+ <p tooltip="" ms-attr-id="app.id" ms-attr-title="app.name" ms-text="app.name"></p>
+ </div>
+ </div>
+ <!-- end ngRepeat: node in map track by node.name -->
+ </div>
+ </div><!-- end ngIf: node.isApp == false -->
+ </div><!-- end ngRepeat: node in map track by node.name -->
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div>
+ <div class="coordinates">
+ <svg id="svg_vl" width="100%" height="100%" fill="silver">
+ <g transform="translate(0, 0)" >
+ </g>
+ </svg>
+ </div>
+ <div class="coordinates" style="z-index:3;">
+ <svg id="svg_vdu" width="100%" height="100%" fill="silver">
+ <g transform="translate(0, 0)" >
+ </g>
+ <defs>
+ <marker id="arrowhead" viewBox="0 0 20 20" refX="16" refY="10" markerUnits="userSpaceOnUse" markerWidth="16" markerHeight="12" orient="auto" fill="#7A7A7A">
+ <path d="M 0 0 L 20 10 L 0 20 z"></path>
+ </marker>
+ </defs>
+ </svg>
+ </div>
+ </div>
+ </div>
+
+ <div id="right-menu" class="ms-nodedetail" ms-css-display="nodesDetail.isShow">
+ <div>
+ <div class="title"><h4>{{nodesDetail.detailTitle}}</h4>
+ <div class="rigth right-button-pointer" ms-click="nodesDetail.$showDetails('none')">
+ <button type="button" class="btn btn-default">
+ <span id="nfv-templateDetail-nodesTab-iui-btn-close" name_i18n="com_zte_nfv_nsoc_i18n"></span>
+ </button>
+ </div>
+ </div>
+ <div>
+ <div class="btn-group" >
+ <button type="button" class="btn btn-default" ms-repeat="nodesDetail.detailData" ms-click="nodesDetail.detailCondChange($index)" ms-attr-id="el.id"
+ ms-class="active: el.isActive">{{el.name}}
+ </button>
+ </div>
+ <div ms-if="nodesDetail.detailIndex === 0">
+ <div class="row-fluid" data-name="table_zone">
+ <div id='ict_table_general_div' class="nodesDetail"></div>
+ </div>
+ </div>
+ <div ms-if="nodesDetail.detailIndex === 1">
+ <div class="row-fluid" data-name="table_zone">
+ <div id='ict_table_properties_div' class="nodesDetail"></div>
+ </div>
+ </div>
+ <div ms-if="nodesDetail.detailIndex === 2">
+ <div class="row-fluid" data-name="table_zone">
+ <div id='ict_table_relationShips_div' class="nodesDetail"></div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <script type="text/javascript" src="../common/thirdparty/jquery/jquery-1.10.2.min.js"></script>
+ <script type="text/javascript" src="../common/thirdparty/bootstrap/js/bootstrap.min.js"></script>
+ <script type="text/javascript" src="../common/thirdparty/data-tables/jquery.dataTables.js"></script>
+ <script type="text/javascript" src="../common/thirdparty/data-tables/jquery.dataTables.min.js"></script>
+ <script type="text/javascript" src="../common/thirdparty/jquery.i18n/jquery.i18n.properties-1.0.9.js"></script>
+
+ <script type="text/javascript" src="../common/thirdparty/bootstrap-growl/bootstrap-growl.min.js"></script>
+ <script type="text/javascript" src="../common/thirdparty/avalon/avalon.modern.js"></script>
+
+ <script type="text/javascript" src="../common/js/tools.js"></script>
+
+ <script type="text/javascript" src="js/component/commonUtil.js"></script>
+ <script type="text/javascript" src="js/component/serverPageTable.js"></script>
+ <script type="text/javascript" src="js/component/loadi18n_nsoc.js"></script>
+
+ <script type="text/javascript" src="js/template/tmDetailUtil.js"></script>
+ <script type="text/javascript" src="js/template/tmUtil.js"></script>
+ <script type="text/javascript" src="js/template/tmTopoController.js"></script>
+ <script type="text/javascript" src="js/template/topoUtil.js"></script>
+ </div>
+</body>
+</html> \ No newline at end of file