Revize 02954c9d
Přidáno uživatelem Jan Pašek před asi 4 roky(ů)
src/services/certificate_service.py | ||
---|---|---|
273 | 273 |
self.set_certificate_revocation_status(cert.certificate_id, STATUS_REVOKED) |
274 | 274 |
except CertificateAlreadyRevokedException: |
275 | 275 |
# TODO log as an info/debug, not warning or above <-- perfectly legal |
276 |
continue
|
|
276 |
pass
|
|
277 | 277 |
|
278 | 278 |
self.certificate_repository.delete(cert.certificate_id) |
279 | 279 |
# TODO log if not successfully deleted |
static/certificate.html | ||
---|---|---|
230 | 230 |
</div> |
231 | 231 |
</div> |
232 | 232 |
</div> |
233 |
<div id="deleteModal" class="modal" tabindex="-1" role="dialog">
|
|
233 |
<div id="deleteModal" class="modal" tabindex="-1" role="dialog"> |
|
234 | 234 |
<div class="modal-dialog" role="document"> |
235 | 235 |
<div class="modal-content"> |
236 | 236 |
<div class="modal-header"> |
static/js/certificate.js | ||
---|---|---|
88 | 88 |
}); |
89 | 89 |
}, |
90 | 90 |
onDelete: function () { |
91 |
|
|
91 |
document.body.scrollTop = 0; |
|
92 |
document.documentElement.scrollTop = 0; |
|
93 |
axios.delete(API_URL + "certificates/" + this.id) |
|
94 |
.then(function (response) { |
|
95 |
if(response.data["success"]){ |
|
96 |
window.location.href = "/static/index.html?success=Certificate+successfully+deleted"; |
|
97 |
} |
|
98 |
else { |
|
99 |
certificateDetailsApp.errorMessage = "Certificate cannot be deleted - "+response.data["data"]+"!"; |
|
100 |
} |
|
101 |
}) |
|
102 |
.catch(function (error) { |
|
103 |
certificateDetailsApp.errorMessage = "An error occurred while deleting certificate"; |
|
104 |
}); |
|
92 | 105 |
} |
93 | 106 |
} |
94 | 107 |
}); |
Také k dispozici: Unified diff
Re #8583 - Deleting certificates