summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuji <lu.ji3@zte.com.cn>2016-09-26 14:13:29 +0000
committerGerrit Code Review <gerrit@open-o.org>2016-09-26 14:13:29 +0000
commit3fc01bacfb37015bc31e5cadcaeae9e943c7e46d (patch)
tree554684686ba90df75d679d1c6043d521ce015ac6
parent5b50b801c517127c64f580384972e2450d9ce863 (diff)
parente1fadaca4898b54705e78da772fc7add41da1683 (diff)
Merge "Remove Chinese comment, modify pom. Issue-id:TOSCA-80"
-rw-r--r--openo-portal/pom.xml1
-rw-r--r--openo-portal/portal-catalog/pom.xml18
-rw-r--r--openo-portal/portal-catalog/src/main/webapp/catalog/csarPackage.html1
-rw-r--r--openo-portal/portal-catalog/src/main/webapp/catalog/css/hostMirror.css2
-rw-r--r--openo-portal/portal-catalog/src/main/webapp/catalog/css/package.css2
-rw-r--r--openo-portal/portal-catalog/src/main/webapp/catalog/css/software.css2
-rw-r--r--openo-portal/portal-catalog/src/main/webapp/catalog/css/template.css2
-rw-r--r--openo-portal/portal-catalog/src/main/webapp/catalog/css/templateDetail.css2
-rw-r--r--openo-portal/portal-catalog/src/main/webapp/catalog/css/virtualApplication.css3
-rw-r--r--openo-portal/portal-catalog/src/main/webapp/catalog/css/vnfm.css3
-rw-r--r--openo-portal/portal-catalog/src/main/webapp/catalog/i18n/nfv-nso-iui-i18n-zh-CN.properties18
-rw-r--r--openo-portal/portal-catalog/src/main/webapp/catalog/js/component/serverPageTable.js2
-rw-r--r--openo-portal/portal-catalog/src/main/webapp/catalog/js/template/tmDetailController.js258
-rw-r--r--openo-portal/portal-catalog/src/main/webapp/catalog/js/template/topoUtil.js1
14 files changed, 196 insertions, 119 deletions
diff --git a/openo-portal/pom.xml b/openo-portal/pom.xml
index 75007e35..2cbc32f3 100644
--- a/openo-portal/pom.xml
+++ b/openo-portal/pom.xml
@@ -35,5 +35,6 @@
<module>portal-extsys</module>
<module>portal-auth</module>
<module>portal-lifecyclemgr</module>
+ <module>portal-catalog</module>
</modules>
</project>
diff --git a/openo-portal/portal-catalog/pom.xml b/openo-portal/portal-catalog/pom.xml
index 6a647b03..9c6d7da4 100644
--- a/openo-portal/portal-catalog/pom.xml
+++ b/openo-portal/portal-catalog/pom.xml
@@ -18,12 +18,26 @@
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.openo.gso.gui</groupId>
<artifactId>openo-portal</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
+
+ <modelVersion>4.0.0</modelVersion>
<artifactId>portal-catalog</artifactId>
- <packaging>pom</packaging>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>war</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <failOnMissingWebXml>false</failOnMissingWebXml>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
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 36f944b0..aabbaa02 100644
--- a/openo-portal/portal-catalog/src/main/webapp/catalog/csarPackage.html
+++ b/openo-portal/portal-catalog/src/main/webapp/catalog/csarPackage.html
@@ -281,7 +281,6 @@
<script type="text/javascript" src="../common/thirdparty/jquery.i18n/jquery.i18n.properties-1.0.9.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>
diff --git a/openo-portal/portal-catalog/src/main/webapp/catalog/css/hostMirror.css b/openo-portal/portal-catalog/src/main/webapp/catalog/css/hostMirror.css
index a63d3bc1..eee3d1bc 100644
--- a/openo-portal/portal-catalog/src/main/webapp/catalog/css/hostMirror.css
+++ b/openo-portal/portal-catalog/src/main/webapp/catalog/css/hostMirror.css
@@ -306,7 +306,7 @@ div.separator-line {
margin-bottom: 10px
}
-/*增加daterangepicker的css*/
+/*increase daterangepicker's css*/
input[name="daterange"] {
width: 220px;
line-height: 0;
diff --git a/openo-portal/portal-catalog/src/main/webapp/catalog/css/package.css b/openo-portal/portal-catalog/src/main/webapp/catalog/css/package.css
index 94ea2e94..73bc6f4c 100644
--- a/openo-portal/portal-catalog/src/main/webapp/catalog/css/package.css
+++ b/openo-portal/portal-catalog/src/main/webapp/catalog/css/package.css
@@ -293,7 +293,7 @@ div.separator-line {
margin-bottom: 10px
}
-/*����daterangepicker��css*/
+/*daterangepicker css*/
input[name="daterange"] {
width: 220px;
line-height: 0;
diff --git a/openo-portal/portal-catalog/src/main/webapp/catalog/css/software.css b/openo-portal/portal-catalog/src/main/webapp/catalog/css/software.css
index 2068df92..6648b455 100644
--- a/openo-portal/portal-catalog/src/main/webapp/catalog/css/software.css
+++ b/openo-portal/portal-catalog/src/main/webapp/catalog/css/software.css
@@ -306,7 +306,7 @@ div.separator-line {
margin-bottom: 10px
}
-/*增加daterangepicker的css*/
+/*increase daterangepicker's css*/
input[name="daterange"] {
width: 220px;
line-height: 0;
diff --git a/openo-portal/portal-catalog/src/main/webapp/catalog/css/template.css b/openo-portal/portal-catalog/src/main/webapp/catalog/css/template.css
index 09b6ae62..25bf17d4 100644
--- a/openo-portal/portal-catalog/src/main/webapp/catalog/css/template.css
+++ b/openo-portal/portal-catalog/src/main/webapp/catalog/css/template.css
@@ -310,7 +310,7 @@ div.separator-line {
margin-bottom: 10px
}
-/*����daterangepicker��css*/
+/*increase daterangepicker's css*/
input[name="daterange"] {
width: 220px;
line-height: 0;
diff --git a/openo-portal/portal-catalog/src/main/webapp/catalog/css/templateDetail.css b/openo-portal/portal-catalog/src/main/webapp/catalog/css/templateDetail.css
index 7314f5db..9503500f 100644
--- a/openo-portal/portal-catalog/src/main/webapp/catalog/css/templateDetail.css
+++ b/openo-portal/portal-catalog/src/main/webapp/catalog/css/templateDetail.css
@@ -310,7 +310,7 @@ div.separator-line {
margin-bottom: 10px
}
-/*����daterangepicker��css*/
+/*increase daterangepicker's css*/
input[name="daterange"] {
width: 220px;
line-height: 0;
diff --git a/openo-portal/portal-catalog/src/main/webapp/catalog/css/virtualApplication.css b/openo-portal/portal-catalog/src/main/webapp/catalog/css/virtualApplication.css
index 3ec06815..99eafbb3 100644
--- a/openo-portal/portal-catalog/src/main/webapp/catalog/css/virtualApplication.css
+++ b/openo-portal/portal-catalog/src/main/webapp/catalog/css/virtualApplication.css
@@ -297,7 +297,7 @@ div.separator-line {
margin-bottom: 10px
}
-/*����daterangepicker��css*/
+/*increase daterangepicker's css*/
input[name="daterange"] {
width: 220px;
line-height: 0;
@@ -452,7 +452,6 @@ td .icheckbox_square-aero {
margin-right: 0;
}
-/*卡片面板样式*/
.hpanel {
background-color: none;
border: none;
diff --git a/openo-portal/portal-catalog/src/main/webapp/catalog/css/vnfm.css b/openo-portal/portal-catalog/src/main/webapp/catalog/css/vnfm.css
index 66348da0..1dac48f3 100644
--- a/openo-portal/portal-catalog/src/main/webapp/catalog/css/vnfm.css
+++ b/openo-portal/portal-catalog/src/main/webapp/catalog/css/vnfm.css
@@ -302,7 +302,7 @@ div.separator-line {
margin-bottom: 10px
}
-/*增加daterangepicker的css*/
+/*increase daterangepicker's css*/
input[name="daterange"] {
width: 220px;
line-height: 0;
@@ -408,7 +408,6 @@ input.pagination-panel-input {
}
-/*卡片面板样式*/
.animated-panel {
-webkit-animation-duration: .5s;
animation-duration: .5s;
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 1e33352b..86d82ce6 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
@@ -14,7 +14,7 @@
# limitations under the License.
#
-//表格相关
+//table
nfv-nso-iui-table-sLengthMenu=每页 _MENU_ 条结果
nfv-nso-iui-table-sZeroRecords=没有匹配结果
nfv-nso-iui-table-sInfo=总共找到 _TOTAL_ 条结果
@@ -31,7 +31,7 @@ nfv-nso-iui-table-sProcess=处理中...
//common
nfv-nso-iui-common-tip=提示:
-//包管理表格字段名称定义
+//package table colums
nfv-package-iui-title=包管理
nfv-package-iui-field-sn=序号
nfv-package-iui-field-name=名称
@@ -43,7 +43,7 @@ nfv-package-iui-field-onboardstate=上载状态
nfv-package-iui-field-deletionpending=待删除
nfv-package-iui-field-operation=操作
-//包详细信息字段
+//package detail message
nfv-package-iui-field-detail-name=名称
nfv-package-iui-field-detail-type=类型
nfv-package-iui-field-detail-usagestate=使用状态
@@ -99,7 +99,7 @@ nfv-package-iui-drop-zone-uploadBtn=上传
nfv-template-topo-iui-title=拓扑
nfv-template-nodes-iui-title=节点
-//模板管理表格字段名称定义
+//template table colums
nfv-template-iui-title=模板管理
nfv-template-iui-field-order=序号
nfv-template-iui-field-templatename=名称
@@ -114,7 +114,7 @@ nfv-template-iui-field-operations=操作
nfv-template-iui-field-download-uri=下载Uri
nfv-template-iui-field-type=节点类型
-//模板明细表格字段名称定义
+//template detail table colums
nfv-templateDetail-iui-index=序号
nfv-templateDetail-iui-title=节点模板
nfv-templateDetail-iui-field-nodeId=ID
@@ -147,7 +147,7 @@ nfv-topology-iui-vnf-tip=点击查看嵌套拓扑图
nfv-topology-iui-btn-return-tip=返回
nfv-topology-iui-message-error=查询拓扑图模板信息失败
-//虚拟应用表格字段名称定义
+//virtual application table colums
nfv-virtualApplication-iui-title=生命周期管理
nfv-virtualApplication-iui-field-name=名称
nfv-virtualApplication-iui-field-template=模板
@@ -247,7 +247,7 @@ nfv-virtualApplication-iui-validate-noinputParam=无需输入参数
nfv-virtualApplication-iui-validate-digits=只能输入整数
nfv-virtualApplication-iui-validate-range=请输入在 {0} 和 {1} 之间的值
-//节点明细表格字段名称定义
+//virtual application detail table colums
nfv-virtualApplicationDetail-iui-field-nodeId=ID
nfv-virtualApplicationDetail-iui-field-nodeName=名称
nfv-virtualApplicationDetail-iui-field-nodeType=节点类型
@@ -265,7 +265,7 @@ nfv-virtualApplicationDetail-iui-text-events=事件
nfv-virtualApplicationDetail-iui-text-nodeDetail=节点详情
nfv-virtualApplicationDetail-iui-btn-close=关闭
-//主机镜像表格字段名称定义
+//host image table colums
nfv-host-iui-title=主机镜像
nfv-host-iui-field-name=名称
nfv-host-iui-field-size=大小
@@ -304,7 +304,7 @@ nfv-host-iui-progress-uploading=上传中
nfv-host-iui-progress-success=上传成功
nfv-host-iui-progress-fail=上传失败
-//软件镜像表格字段名称定义
+//software image table colums
nfv-software-iui-title=软件镜像
nfv-software-iui-field-name=名称
nfv-software-iui-field-size=大小
diff --git a/openo-portal/portal-catalog/src/main/webapp/catalog/js/component/serverPageTable.js b/openo-portal/portal-catalog/src/main/webapp/catalog/js/component/serverPageTable.js
index cfa4a990..00a6782b 100644
--- a/openo-portal/portal-catalog/src/main/webapp/catalog/js/component/serverPageTable.js
+++ b/openo-portal/portal-catalog/src/main/webapp/catalog/js/component/serverPageTable.js
@@ -436,7 +436,7 @@ serverPageTable.initDataTableForEvent = function( setting ,cond , divId) {
"bAutoWidth":true,//automatically set the column width
"bLengthChange": true,// record number in each row
"iDisplayLength": 10,// row number in each page
- "bSort": setting.sort ? true : false,// 排序
+ "bSort": setting.sort ? true : false,
"bInfo": setting.info,// Showing 1 to 10 of 23 entries
"bWidth": true,
"bScrollCollapse": true,
diff --git a/openo-portal/portal-catalog/src/main/webapp/catalog/js/template/tmDetailController.js b/openo-portal/portal-catalog/src/main/webapp/catalog/js/template/tmDetailController.js
index 834562a6..ee490385 100644
--- a/openo-portal/portal-catalog/src/main/webapp/catalog/js/template/tmDetailController.js
+++ b/openo-portal/portal-catalog/src/main/webapp/catalog/js/template/tmDetailController.js
@@ -15,21 +15,21 @@
*/
var vm = avalon.define({
- $id : "tmDetailController",
- templateId : "",
- templateData : [
+ $id: "tmDetailController",
+ templateId: "",
+ templateData: [
{href: "#topology", name: "Topology", value: true},
{href: "#nodes", name: "Nodes", value: false}
],
$language: {
"sProcessing": "<img src='../component/thirdparty/data-tables/images/loading-spinner-grey.gif'/><span>&nbsp;&nbsp;"
- +$.i18n.prop("nfv-nso-iui-table-sProcess")+"</span>",
+ + $.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"),
+ "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"),
@@ -38,41 +38,41 @@ var vm = avalon.define({
"sPageOf": $.i18n.prop("nfv-nso-iui-table-sPageOf")
}
},
- $restUrl : {
- queryNodeTemplateUrl : "/openoapi/catalog/v1/servicetemplates/{0}/nodetemplates",
- queryTemplateInfoUrl : "/openoapi/catalog/v1/servicetemplates"
+ $restUrl: {
+ queryNodeTemplateUrl: "/openoapi/catalog/v1/servicetemplates/{0}/nodetemplates",
+ queryTemplateInfoUrl: "/openoapi/catalog/v1/servicetemplates"
},
- $init : function() {
+ $init: function () {
vm.$initTemplateData();
vm.$initTopoNodesData();
},
- $initTemplateData : function() {
+ $initTemplateData: function () {
$.ajax({
- type : "GET",
- url : vm.$restUrl.queryTemplateInfoUrl,
- success : function(resp) {
- if(resp) {
+ type: "GET",
+ url: vm.$restUrl.queryTemplateInfoUrl,
+ success: function (resp) {
+ if (resp) {
vm.nodesTab.servicesTemplateData = [];
- for(var i=0; i<resp.length; i++) {
+ for (var i = 0; i < resp.length; i++) {
//generate node table display data
vm.nodesTab.servicesTemplateData.push(resp[i]);
}
vm.nodesTab.$initNfvNodesTab();
}
},
- error : function() {
+ error: function () {
commonUtil.showMessage($.i18n.prop("nfv-topology-iui-message-error"), "danger");
}
});
},
- $initTopoNodesData : function() {
+ $initTopoNodesData: function () {
$.ajax({
- type : "GET",
- url : vm.$restUrl.queryNodeTemplateUrl,
- success : function(resp) {
- if(resp) {
+ type: "GET",
+ url: vm.$restUrl.queryNodeTemplateUrl,
+ success: function (resp) {
+ if (resp) {
vm.nodesTab.nodesDetail.nodesTemplateDetailData = [];
- for(var i=0; i<resp.length; i++) {
+ for (var i = 0; i < resp.length; i++) {
//generate node table display data
var nodeTemplate = topoUtil.generateNodeTemplate(resp[i]);
vm.nodesTab.nodesList.nodesData.push(nodeTemplate);
@@ -85,12 +85,12 @@ var vm = avalon.define({
//vm.nodesTab.nodesList.$initNodesTable();
}
},
- error : function() {
+ error: function () {
commonUtil.showMessage($.i18n.prop("nfv-topology-iui-message-error"), "danger");
}
});
},
- $initNodesData : function() {
+ $initNodesData: function () {
$.ajax({
type: "GET",
url: vm.$restUrl.queryNodeTemplateUrl,
@@ -115,59 +115,59 @@ var vm = avalon.define({
}
});
},
- topologyTab : {
- topology : "topology.html",
- vnfTip : $.i18n.prop("nfv-topology-iui-vnf-tip"),
- btnTip : $.i18n.prop("nfv-topology-iui-btn-return-tip"),
- topoTemplateData:[],
- boxTopoDatas:[],
- networkTopoDatas:[],
+ 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) {
+ returnBtnVisible: false,
+ $getColor: function (index) {
return topoUtil.getColor(index);
},
- $getCidr: function(properties){
+ $getCidr: function (properties) {
return topoUtil.getCidr(properties);
},
- $getCpTop: function(index, parentBoxId){
+ $getCpTop: function (index, parentBoxId) {
return topoUtil.getCpTop(index, parentBoxId);
},
- $initTopology : function() {
+ $initTopology: function () {
topoUtil.initTopoData(vm.topologyTab.topoTemplateData.$model);
- },
- $showTopo:function(id, name){
+ },
+ $showTopo: function (id, name) {
vm.nodesTab.nodesDetail.$showDetails("block", id, name);
},
- $showVnfTopo: function(templateId) {
+ $showVnfTopo: function (templateId) {
vm.topologyTab.returnBtnVisible = true;
vm.$restUrl.queryNodeTemplateUrl = "/openoapi/catalog/v1/servicetemplates/" + templateId + "/nodetemplates";
vm.$init();
},
- $returnNS: function() {
+ $returnNS: function () {
vm.topologyTab.returnBtnVisible = false;
vm.$restUrl.queryNodeTemplateUrl = "/openoapi/catalog/v1/servicetemplates/" + vm.templateId + "/nodetemplates";
vm.$init();
}
},
- nodesTab : {
+ nodesTab: {
servicesTemplateData: [],
- $nodesTabId : "ict_nodes_template_table",
- $nodesTemplateTabFields : {// table columns
+ $nodesTabId: "ict_nodes_template_table",
+ $nodesTemplateTabFields: {// table columns
table: [
- {"mData": "serviceTemplateId", name: "ID","bVisible": false},
- {"mData": "", name: "","sClass": 'details-control'},
+ {"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": "csarid", name: "packageID", "bVisible": false},
{"mData": "type", name: $.i18n.prop("nfv-template-iui-field-type")},
//{"mData": "inputs", name: $.i18n.prop("nfv-template-iui-field-inputs"),"fnRender" : tmDetailUtil.inputsRender},
//{"mData": "outputs", name: $.i18n.prop("nfv-template-iui-field-outputs"),"fnRender" : tmDetailUtil.outputsRender},
//{"mData": "operations", name: $.i18n.prop("nfv-template-iui-field-operations")}
]
},
- $initNfvNodesTab: function() {
+ $initNfvNodesTab: function () {
var setting = {};
setting.language = vm.$language;
setting.paginate = true;
@@ -177,10 +177,10 @@ var vm = avalon.define({
setting.restUrl = vm.$restUrl.queryTemplateInfoUrl;
setting.tableId = vm.nodesTab.$nodesTabId;
//serverPageTable.initTableWithData(setting,vm.nodesTab.$nodesTabId + '_div',vm.nodesTab.servicesTemplateData.$model);
- serverPageTable.initDataTable(setting,{},vm.nodesTab.$nodesTabId + '_div');
+ serverPageTable.initDataTable(setting, {}, vm.nodesTab.$nodesTabId + '_div');
$('#' + vm.nodesTab.$nodesTabId + '>tbody').on("click", 'td.details-control', function () {
var tr = $(this).closest('tr');
- var table = $('#' + vm.nodesTab.$nodesTabId).dataTable();
+ var table = $('#' + vm.nodesTab.$nodesTabId).dataTable();
if (table.fnIsOpen(tr[0])) {
table.fnClose(tr[0]);
tr.removeClass('shown');
@@ -193,18 +193,39 @@ var vm = avalon.define({
},
//nodes list table
- nodesList :{
+ nodesList: {
nodesData: [],
- $nodesTabDataId : "ict_nodes_table",
- $nodesTabFields : {// table columns
+ $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" : tmDetailUtil.nameRender},
+ {
+ "mData": "name",
+ name: $.i18n.prop("nfv-templateDetail-iui-field-nodetypename"),
+ "bSortable": true,
+ "fnRender": tmDetailUtil.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}
+ {
+ "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 () {
@@ -217,60 +238,96 @@ var vm = avalon.define({
setting.restUrl = vm.$restUrl.queryNodeTemplateUrl;
setting.tableId = vm.nodesTab.nodesList.$nodesTabDataId;
//serverPageTable.initTableWithData(setting,vm.nodesTab.nodesList.$nodesTabDataId + '_div',vm.nodesTab.nodesList.nodesData.$model);
- serverPageTable.initTableWithoutLib(setting,{},vm.nodesTab.nodesList.$nodesTabDataId + '_div');
+ serverPageTable.initTableWithoutLib(setting, {}, vm.nodesTab.nodesList.$nodesTabDataId + '_div');
},
- $format_Detail: function() {
+ $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 : {
+ nodesDetail: {
nodesTemplateDetailData: [],
- detailTitle : "",
- isShow : "none",
- detailIndex : 0,
- detailData : [
+ 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}
+ {
+ 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) {
+ $showDetails: function (isShow, nodetypeid, nodetypename) {
vm.nodesTab.nodesDetail.isShow = isShow;
if (isShow == "block") {
vm.nodesTab.nodesDetail.detailTitle = nodetypename + " " + $.i18n.prop("nfv-templateDetail-nodesTab-iui-title-nodeDetail"),
- $('#' + vm.nodesTab.nodesDetail.detailData[0].id).click();
+ $('#' + vm.nodesTab.nodesDetail.detailData[0].id).click();
vm.nodesTab.nodesDetail.detailData[0].isActive = true;
vm.nodesTab.nodesDetail.$initNodeDetailTable(nodetypeid);
}
},
- detailCondChange : function(index) {
+ detailCondChange: function (index) {
vm.nodesTab.nodesDetail.detailIndex = index;
- for(var i=0; i<vm.nodesTab.nodesDetail.detailData.length; i++) {
+ for (var i = 0; i < vm.nodesTab.nodesDetail.detailData.length; i++) {
vm.nodesTab.nodesDetail.detailData[i].isActive = false;
}
vm.nodesTab.nodesDetail.detailData[index].isActive = true;
},
- $tableFields : {// table columns
+ $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}
+ {
+ "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}
+ {
+ "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}
+ {
+ "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) {
+ $initNodeDetailTable: function (nodetemplateid) {
var data = topoUtil.getCurrentDetailData(vm.nodesTab.nodesDetail.nodesTemplateDetailData.$model, nodetemplateid);
//initialize three tables of nodedetail
- $.each(vm.nodesTab.nodesDetail.$tableFields, function(key, value){
+ $.each(vm.nodesTab.nodesDetail.$tableFields, function (key, value) {
var setting = {};
setting.language = vm.$language;
setting.paginate = false;
@@ -282,25 +339,34 @@ var vm = avalon.define({
}
}
},
- executionTab : {
- $eventsTabId : "ict_events_table",
- $eventsTabFields : {// table columns
+ executionTab: {
+ $eventsTabId: "ict_events_table",
+ $eventsTabFields: {// table columns
table: [
{"mData": "currentStepId", name: "ID", "bVisible": false},
- {"mData": "currentStepName", name: $.i18n.prop("nfv-templateDetail-executionTab-iui-field-currentStepName")},
- {"mData": "currentStepStatus", name: $.i18n.prop("nfv-templateDetail-executionTab-iui-field-currentStepStatus")},
- {"mData": "currentStepDesc", name: $.i18n.prop("nfv-templateDetail-executionTab-iui-field-currentStepDesc")},
+ {
+ "mData": "currentStepName",
+ name: $.i18n.prop("nfv-templateDetail-executionTab-iui-field-currentStepName")
+ },
+ {
+ "mData": "currentStepStatus",
+ name: $.i18n.prop("nfv-templateDetail-executionTab-iui-field-currentStepStatus")
+ },
+ {
+ "mData": "currentStepDesc",
+ name: $.i18n.prop("nfv-templateDetail-executionTab-iui-field-currentStepDesc")
+ },
{"mData": "currentTime", name: $.i18n.prop("nfv-templateDetail-executionTab-iui-field-executionTime")},
{"mData": "allSteps", name: "allSteps", "bVisible": false}
]
},
$queryEventsInfoUrl: "/api/nsoc/appinstance/operateschedule?instanceId=",
$queryStepUrl: "",
- $getEventsCond: function() {
+ $getEventsCond: function () {
var cond = {};
return cond;
},
- $initEventsTable: function() {
+ $initEventsTable: function () {
console.log("initEventsTable ");
var setting = {};
setting.language = vm.$language;
@@ -310,29 +376,29 @@ var vm = avalon.define({
setting.restUrl = vm.executionTab.$queryEventsInfoUrl;
setting.tableId = vm.executionTab.$eventsTabId;
serverPageTable.initDataTable(setting, vm.executionTab.$getEventsCond(),
- vm.executionTab.$eventsTabId + '_div');
+ vm.executionTab.$eventsTabId + '_div');
},
- $operation : "",
- steps : [],
- $init: function() {
+ $operation: "",
+ steps: [],
+ $init: function () {
vm.executionTab.$initEventsTable();
}
},
});
-var initParam = function() { //initialize template detail params
+var initParam = function () { //initialize template detail params
var paramStr = window.location.search.substring(1);
- if(paramStr.length > 0) {
+ 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) {
+ if (flavor) {
vm.$restUrl.queryNodeTemplateUrl += "?flavor=" + flavor;
}
diff --git a/openo-portal/portal-catalog/src/main/webapp/catalog/js/template/topoUtil.js b/openo-portal/portal-catalog/src/main/webapp/catalog/js/template/topoUtil.js
index a531278a..2545314d 100644
--- a/openo-portal/portal-catalog/src/main/webapp/catalog/js/template/topoUtil.js
+++ b/openo-portal/portal-catalog/src/main/webapp/catalog/js/template/topoUtil.js
@@ -149,7 +149,6 @@ topoUtil.getInstanceNum = function(nodeTemplate, nodeInstanceData) {
var num = 0;
var id;
if(nodeTemplate.properties && nodeTemplate.properties.vnfdid) {
- //ns嵌套vnf,ns中vnf的nodetemplate的属性vnfdid才是嵌套vnf的真实id
id = nodeTemplate.properties.vnfdid;
} else {
id = nodeTemplate.id;