commit 56b36ca7d2aab3e7d89b5e0b528195dd26cd6829
Author: Jan Pašek <janpasek97@gmail.com>
Date:   Mon Apr 19 11:18:06 2021 +0200

    Re #8583 - Display issued certificates

diff --git a/static/certificate.html b/static/certificate.html
index 0d80dba..30614b3 100644
--- a/static/certificate.html
+++ b/static/certificate.html
@@ -182,13 +182,13 @@
                                 </tr>
                             </thead>
                             <tbody>
-                                <tr>
-                                    <td>&ltsome_certificate_name&gt</td>
-                                    <td>&lttype&gt</td>
+                                <tr class="text-center font-italic">
+                                    <td v-if="issuedCertificates.length == 0" colspan="2">No issued certificates</td>
                                 </tr>
-                                <tr>
-                                    <td>&ltsome_certificate_long_name&gt</td>
-                                    <td>&ltCA&gt</td>
+                                <tr is="issued-by-list-item"
+                                    v-for="certificate in issuedCertificates"
+                                    v-bind:certificate="certificate"
+                                    v-bind:key="certificate.id">
                                 </tr>
                             </tbody>
                         </table>
diff --git a/static/js/certificate.js b/static/js/certificate.js
index 346a6e4..5c0b896 100644
--- a/static/js/certificate.js
+++ b/static/js/certificate.js
@@ -9,6 +9,7 @@
             error: false,
             id: null,
             revocationReason: "unspecified",
+            issuedCertificates: [],
             certificate: {
                 subject: {
                     C: "",
@@ -120,6 +121,7 @@
                     if (response.data["success"]) {
                         // display certificate
                         certificateDetailsApp.certificate = response.data["data"];
+                        loadIssuedCertificates();
                         certificateDetailsApp.loading = false;
                         certificateDetailsApp.error = false;
                     }
@@ -147,3 +149,25 @@
         certificateDetailsApp.loading = false;
         certificateDetailsApp.error = true;
     }
+
+    function loadIssuedCertificates() {
+            axios.get(API_URL+"certificates", {
+            params: {
+                filtering: {
+                    issuedby: parseInt(certificateDetailsApp.id)
+                }
+            }
+        })
+        .then(function (response) {
+            if (response.data["success"]) {
+                response.data["data"].forEach(item => {if(item.id != certificateDetailsApp.id) certificateDetailsApp.issuedCertificates.push(item)})
+            }
+            else
+            {
+                certificateDetailsApp.issuedCertificates = [];
+            }
+        })
+        .catch(function (error) {
+            console.log(error);
+        });
+    }
\ No newline at end of file
diff --git a/static/js/components.js b/static/js/components.js
index 8f9906e..a2faa5e 100644
--- a/static/js/components.js
+++ b/static/js/components.js
@@ -38,4 +38,23 @@ Vue.component("ca-select-item", {
     // Certificate authority to be represented by the option
     props: ["ca"],
     template: "<option v-bind:value='ca.id'>{{ ca.CN }}</option>"
+});
+
+// Component representing a certificate issued by displayed CA
+Vue.component("issued-by-list-item", {
+    props: ["certificate"],
+    template:   "<tr class='align-middle text-center'>"+
+                    "<td class='align-middle'><a :href='certificateURL' class='font-weight-bold'>{{ certificate.CN }}</a></td>"+
+                    "<td class='align-middle'>" +
+                    "   <div v-if='certificate.usage.CA'>CA</div>" +
+                    "   <div v-if='certificate.usage.authentication'>authentication</div>" +
+                    "   <div v-if='certificate.usage.digitalSignature'>digital signature</div>" +
+                    "   <div v-if='certificate.usage.SSL'>SSL/TLS</div>" +
+                    "</td>"+
+                "</tr>",
+    computed: {
+        certificateURL: function () {
+            return "/static/certificate.html?id=" + this.certificate.id;
+        }
+    }
 });
\ No newline at end of file
