Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 6c9cb54a

Přidáno uživatelem Jan Pašek před asi 4 roky(ů)

Re #8475 - Added code comments

Zobrazit rozdíly:

static/js/components.js
1

  
2
// Component representing an instance in certificate listing
1 3
Vue.component("certificate-item",{
4
    // certificate = certificate to be displayed by the list item
2 5
    props: ["certificate"],
3 6
    template: "<tr>"+
4 7
                "<td class='align-middle'>{{ certificate.CN }}</td>"+
......
15 18
                "<td class='align-middle'><button v-on:click='onCertificateRootDownload()'>Download chain root</button></td>"+
16 19
            "</tr>",
17 20
    methods: {
21
        // Get the certificate PEM data from the server and downloads it to users computer
18 22
        onCertificateDownload: function () {
19 23
            var id = this.certificate.id;
20 24
            axios.get(API_URL + "certificates/" + id)
......
29 33
                    console.log(error);
30 34
                });
31 35
        },
36
        // Get the certificate's chain of trust in PEM format from the server and downloads it to users computer
32 37
        onCertificateChainDownload: function () {
33 38
            var id = this.certificate.id;
34 39
            axios.get(API_URL + "certificates/" + id + "/chain")
......
43 48
                    console.log(error);
44 49
                });
45 50
        },
51
        // Get the certificate's root CA as PEM data from the server and downloads it to users computer
46 52
        onCertificateRootDownload: function () {
47 53
            var id = this.certificate.id;
48 54
            axios.get(API_URL + "certificates/" + id + "/root")
......
60 66
    }
61 67
});
62 68

  
69
// Component representing an item in select of available CAs
63 70
Vue.component("ca-select-item", {
71
    // Certificate authority to be represented by the option
64 72
    props: ["ca"],
65 73
    template: "<option v-bind:value='ca.id'>{{ ca.CN }}</option>"
66 74
});

Také k dispozici: Unified diff