diff options
author | jin xin <j00101220@huawei.com> | 2016-10-31 06:53:02 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@open-o.org> | 2016-10-31 06:53:02 +0000 |
commit | c20be4700823e4b95a68e74a04867b008efb9ae1 (patch) | |
tree | 282767bdacb6473633cb2ed5b48b8e78d529a48c /openo-portal | |
parent | 7b44cab5387ec86bb2ec5b756205d8231de32d2f (diff) | |
parent | 334034c7ac2d382b5a91084a833a6d152db31436 (diff) |
Merge "Fix the bug "Can not show package detail", remove the modeldsigner child menu."
Diffstat (limited to 'openo-portal')
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 37447d54..859c69b5 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 @@ -58,12 +58,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"
|