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
This commit is contained in:
parent
51d641525b
commit
340942ea26
@ -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;
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user