From 340942ea264ca4911dbcff44478e80e889152649 Mon Sep 17 00:00:00 2001 From: Shu Muto Date: Fri, 24 Aug 2018 10:43:29 +0900 Subject: [PATCH] Fix JS error on routed-details-view when execute show-certificate This fixes error on routed-details view when execute Show Certificate action from details view. Change-Id: Ic27ee6d77c98d255a20c7f3a028246af4ce346f7 Closes-Bug: #1788737 --- .../show-certificate/show-certificate.service.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/magnum_ui/static/dashboard/container-infra/clusters/show-certificate/show-certificate.service.js b/magnum_ui/static/dashboard/container-infra/clusters/show-certificate/show-certificate.service.js index e84f9b92..f17e6e6c 100644 --- a/magnum_ui/static/dashboard/container-infra/clusters/show-certificate/show-certificate.service.js +++ b/magnum_ui/static/dashboard/container-infra/clusters/show-certificate/show-certificate.service.js @@ -28,12 +28,14 @@ showCertificateService.$inject = [ 'horizon.app.core.openstack-service-api.magnum', + 'horizon.dashboard.container-infra.clusters.resourceType', + 'horizon.framework.util.actions.action-result.service', 'horizon.framework.util.file.text-download', 'horizon.framework.util.q.extensions' ]; function showCertificateService( - magnum, textDownload, $qExtensions + magnum, resourceType, actionResult, textDownload, $qExtensions ) { var service = { @@ -53,6 +55,11 @@ // get certificate return magnum.showCertificate(selected.id).then(function(response) { textDownload.downloadTextFile(response.data.pem, selected.name + "_ca.pem"); + + response.data.id = response.data.uuid; + var result = actionResult.getActionResult() + .created(resourceType, response.data.id); + return result.result; }); }