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 = [
|
showCertificateService.$inject = [
|
||||||
'horizon.app.core.openstack-service-api.magnum',
|
'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.file.text-download',
|
||||||
'horizon.framework.util.q.extensions'
|
'horizon.framework.util.q.extensions'
|
||||||
];
|
];
|
||||||
|
|
||||||
function showCertificateService(
|
function showCertificateService(
|
||||||
magnum, textDownload, $qExtensions
|
magnum, resourceType, actionResult, textDownload, $qExtensions
|
||||||
) {
|
) {
|
||||||
|
|
||||||
var service = {
|
var service = {
|
||||||
@ -53,6 +55,11 @@
|
|||||||
// get certificate
|
// get certificate
|
||||||
return magnum.showCertificate(selected.id).then(function(response) {
|
return magnum.showCertificate(selected.id).then(function(response) {
|
||||||
textDownload.downloadTextFile(response.data.pem, selected.name + "_ca.pem");
|
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