From 5256104f3b8480a0ba5add221caa98784035dd28 Mon Sep 17 00:00:00 2001
From: nancylizi
Date: Thu, 29 Sep 2016 20:38:44 +0800
Subject: Sync the changes from service template tab page to single page of
nodes Issue-id:TOSCA-93
Change-Id: I20081f704f187964e4f02cf20cca5830f8718dab
Signed-off-by: nancylizi
---
.../webapp/catalog/js/template/tmDetailUtil.js | 2 +-
.../catalog/js/template/tmNodesController.js | 184 ++++++++++++++-------
.../catalog/js/template/tmNodesDetailUtil.js | 2 +-
3 files changed, 127 insertions(+), 61 deletions(-)
(limited to 'openo-portal/portal-catalog')
diff --git a/openo-portal/portal-catalog/src/main/webapp/catalog/js/template/tmDetailUtil.js b/openo-portal/portal-catalog/src/main/webapp/catalog/js/template/tmDetailUtil.js
index 4fccf7f4..2cb15b4d 100644
--- a/openo-portal/portal-catalog/src/main/webapp/catalog/js/template/tmDetailUtil.js
+++ b/openo-portal/portal-catalog/src/main/webapp/catalog/js/template/tmDetailUtil.js
@@ -18,7 +18,7 @@ tmDetailUtil.timer = null;
tmDetailUtil.nameRender = function(obj) {
return '' + obj.aData.name + '';
+ + '\'block\',\'' + obj.aData.id + '\', \'' + obj.aData.name + '\',\'' + vm.nodesTab.nodesList.tempId + '\')">' + obj.aData.name + '';
}
tmDetailUtil.inputsRender = function(obj) {
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
index b6f554f9..ef63ba9f 100644
--- 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
@@ -16,15 +16,16 @@
var vm = avalon.define({
$id : "tmNodesController",
templateId : "",
+ globalNodesData: {},
$language: {
"sProcessing": " "
- +$.i18n.prop("nfv-nso-iui-table-sProcess")+"",
+ + $.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"),
+ "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"),
@@ -33,52 +34,53 @@ 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();
- vm.$initNodesData();
},
- $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.servicesTemplateData = [];
- for(var i=0; i'
+ vm.$initNodesData(tempId);
return sOut;
},
},
//Nodes Details
nodesDetail : {
nodesTemplateDetailData: [],
- detailTitle : "",
- isShow : "none",
- detailIndex : 0,
- detailData : [
+ templatesNodesDetailData:[],
+ 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,tempId) {
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);
+ vm.nodesDetail.$initNodeDetailTable(nodetypeid,tempId);
}
},
- detailCondChange : function(index) {
+ detailCondChange: function (index) {
vm.nodesDetail.detailIndex = index;
- for(var i=0; i' + obj.aData.name + '';
+ + '\'block\',\'' + obj.aData.id + '\', \'' + obj.aData.name + '\',\'' + vm.nodesList.tempId + '\')">' + obj.aData.name + '';
}
--
cgit 1.2.3-korg