From c704b0d36fd67aa639e0214b8a6b8f25a7648e43 Mon Sep 17 00:00:00 2001 From: nancylizi Date: Thu, 27 Oct 2016 15:41:15 +0800 Subject: Fix the alert message while onboard package. Change-Id: Iaf8494f32ed05764faad5ba77a56876729727b98 Issue-id:GSO-66 Signed-off-by: nancylizi --- .../src/main/webapp/catalog/i18n/nfv-nso-iui-i18n-en-US.properties | 2 +- .../src/main/webapp/catalog/i18n/nfv-nso-iui-i18n-zh-CN.properties | 2 +- .../portal-catalog/src/main/webapp/catalog/js/package/pmUtil.js | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'openo-portal/portal-catalog') 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 5b34be2a..5e9b97bf 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 @@ -82,7 +82,7 @@ nfv-package-iui-message-delete-confirm=Do you want to delete the current package nfv-package-iui-message-delete-success=Csar package deleted successfully. nfv-package-iui-message-upload-csar-exist=There is a package in the same name, they may be the same package, whether still upload this package? nfv-package-iui-message-upload-csar-deletionpending=This package is referenced in an instance. whether to re upload? -nfv-package-iui-message-onBoarded = Already onBoarded, no need for onBoarding. +nfv-package-iui-message-onBoarded = Onboarding operation successfully. nfv-package-iui-message-onBoard-error = Onboarding error. nfv-package-iui-message-delete-error = Package delete error. nfv-package-iui-message-select-vim-error = Can not select more than one VIM to be test environment. 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 1dce1392..efb19162 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 @@ -83,7 +83,7 @@ nfv-package-iui-message-delete-confirm=确定要删除当前包? nfv-package-iui-message-delete-success=包删除成功。 nfv-package-iui-message-upload-csar-exist=存在同名包,是否继续上传? nfv-package-iui-message-upload-csar-deletionpending=实例中引用了此包,是否重新上传? -nfv-package-iui-message-onBoarded = 已经上载,无需再次上载。 +nfv-package-iui-message-onBoarded = 上载操作成功。 nfv-package-iui-message-onBoard-error = 上载失败。 nfv-package-iui-message-delete-error = 包删除失败。 nfv-package-iui-message-select-vim-error = 最多只能选择一个VIM做为测试环境 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 ccd0f11b..d69be0a0 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 @@ -103,7 +103,7 @@ pmUtil.doOnBoard = function(url,param) { contentType : "application/json", dataType : "json", success : function(resp) { - if(resp.data.status == "failed") { + if(resp != "" && resp.data.status == "failed") { commonUtil.showMessage($.i18n.prop("nfv-package-iui-message-onBoard-error"), "failed"); } else { commonUtil.showMessage($.i18n.prop("nfv-package-iui-message-onBoarded"), "success"); @@ -125,7 +125,7 @@ pmUtil.doNFAROnboard = function(extData) { contentType : "application/json", dataType : "json", success : function(resp) { - if(resp.data.status == "failed") { + if(resp != "" && resp.data.status == "failed") { commonUtil.showMessage($.i18n.prop("nfv-package-iui-message-onBoard-error"), "failed"); } else { commonUtil.showMessage($.i18n.prop("nfv-package-iui-message-onBoarded"), "success"); @@ -144,7 +144,7 @@ pmUtil.doSSAROnboard = function(url) { url : url, contentType : "application/json", success : function(resp) { - if(resp.data.status == "failed") { + if(resp != "" && resp.data.status == "failed") { commonUtil.showMessage($.i18n.prop("nfv-package-iui-message-onBoard-error"), "failed"); } else { commonUtil.showMessage($.i18n.prop("nfv-package-iui-message-onBoarded"), "success"); -- cgit 1.2.3-korg