diff options
author | jin xin <j00101220@huawei.com> | 2016-10-31 06:52:42 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@open-o.org> | 2016-10-31 06:52:42 +0000 |
commit | e7a6d382c1abe682a3cb5ac3ee7ce1ee074c64c6 (patch) | |
tree | 84f30b8b685cde3d16d71bd90f50a9f4d3445685 | |
parent | 2ead90ffccdf40a2e6b2c859819720b8770d9cfa (diff) | |
parent | 661bdd125756ecf3df3872a0ff069c2fda8f6a5d (diff) |
Merge "Fix the bug "Can not show package detail", remove the modeldsigner child menu." into sun
4 files changed, 19 insertions, 21 deletions
diff --git a/openo-portal/portal-catalog/src/main/webapp/catalog/js/package/pmController.js b/openo-portal/portal-catalog/src/main/webapp/catalog/js/package/pmController.js index 3b19d23e..714d953c 100644 --- a/openo-portal/portal-catalog/src/main/webapp/catalog/js/package/pmController.js +++ b/openo-portal/portal-catalog/src/main/webapp/catalog/js/package/pmController.js @@ -83,6 +83,7 @@ var vm = avalon.define({ setting.language = vm.$language;
setting.paginate = true;
setting.info = true;
+ setting.sort = true;
setting.columns = vm.$packageTableFields.table;
setting.restUrl = vm.$restUrl.queryPackageInfoUrl;
setting.tableId = vm.$tableId;
@@ -120,15 +121,13 @@ var vm = avalon.define({ vm.packageDetail.detailData[index].isActive = true;
},
$initPackageDetailTable : function (csarId) {
- var data;
- for(var i=0; i<vm.resource.packageInfo.length; i++) {
- if (vm.resource.packageInfo[i].csarId == csarId) {
- data = vm.resource.packageInfo[i];
- break;
+ var url=vm.$restUrl.queryPackageInfoUrl + "/" + csarId;
+ commonUtil.get(url,null,function(resp) {
+ if (resp) {
+ vm.resource.packageDetails=resp;
}
- }
- vm.resource.packageDetails = data;
- vm.resource.relationInfo = [];
+ })
+
},
$isRowDeletingStatus : function(name) {
var table = $("#" + vm.$tableId).dataTable();
diff --git a/openo-portal/portal-catalog/src/main/webapp/catalog/js/package/pmUtil.js b/openo-portal/portal-catalog/src/main/webapp/catalog/js/package/pmUtil.js index d69be0a0..80067abc 100644 --- a/openo-portal/portal-catalog/src/main/webapp/catalog/js/package/pmUtil.js +++ b/openo-portal/portal-catalog/src/main/webapp/catalog/js/package/pmUtil.js @@ -110,8 +110,13 @@ pmUtil.doOnBoard = function(url,param) { }
refreshByCond();
},
- error : function() {
- commonUtil.showMessage($.i18n.prop("nfv-package-iui-message-onBoard-error"), "failed");
+ error : function(resp) {
+ if(resp != "" && resp.responseText == "success") {
+ commonUtil.showMessage($.i18n.prop("nfv-package-iui-message-onBoarded"), "success");
+ refreshByCond();
+ } else {
+ commonUtil.showMessage($.i18n.prop("nfv-package-iui-message-onBoard-error"), "failed");
+ }
}
});
}
@@ -132,7 +137,7 @@ pmUtil.doNFAROnboard = function(extData) { }
refreshByCond();
},
- error : function() {
+ error : function(resp) {
commonUtil.showMessage($.i18n.prop("nfv-package-iui-message-onBoard-error"), "failed");
}
});
@@ -151,7 +156,7 @@ pmUtil.doSSAROnboard = function(url) { }
refreshByCond();
},
- error : function() {
+ error : function(resp) {
commonUtil.showMessage($.i18n.prop("nfv-package-iui-message-onBoard-error"), "failed");
}
});
@@ -182,7 +187,7 @@ pmUtil.delPackage = function (url) { pmUtil.nameRender = function(obj) {
return '<a href="#" onclick="vm.packageDetail.$showDetails('
- + '\'block\',\'' + obj.aData.id + '\', \'' + obj.aData.name + '\')">' + obj.aData.name + '</a>';
+ + '\'block\',\'' + obj.aData.csarId + '\', \'' + obj.aData.name + '\')">' + obj.aData.name + '</a>';
}
pmUtil.onBoardRender = function(obj) {
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 2c0561e0..47bd9a5d 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 @@ -388,7 +388,7 @@ topoUtil.generateNodeTemplate = function(data) { nodeTemplate.currentLinkNum = 0;
var relationShips = data.relationShips || []; //some nodes may not have relationships
$.each(relationShips, function(index, obj){
- if (obj.sourceNodeId == data.id) {
+ if (obj.sourceNodeId == data.name) {
switch(obj.type) {
case "containedIn" :
case "tosca.relationships.nfv.ContainedIn" :
@@ -414,7 +414,7 @@ topoUtil.generateNodeTemplate = function(data) { break;
}
}
- if (obj.targetNodeId == data.id) {
+ if (obj.targetNodeId == data.name) {
switch(obj.type) {
case "connectedTo" :
case "tosca.relationships.nfv.ConnectsTo" :
diff --git a/openo-portal/portal-common/src/main/webapp/common/json/menu_list.json b/openo-portal/portal-common/src/main/webapp/common/json/menu_list.json index d99bce15..b7c088f4 100644 --- a/openo-portal/portal-common/src/main/webapp/common/json/menu_list.json +++ b/openo-portal/portal-common/src/main/webapp/common/json/menu_list.json @@ -52,12 +52,6 @@ },
{
"parentId":"openo_menu_orchestrator",
- "id":"openo_menu_orchestrator_model_design",
- "url":"/winery/servicetemplates.html",
- "iconClass":"fa fa-folder-open-o"
- },
- {
- "parentId":"openo_menu_orchestrator",
"id":"openo_menu_orchestrator_package",
"url":"../catalog/csarPackage.html",
"iconClass":"fa fa-folder-open-o"
|