Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 5885e489

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

Re #8583 - Loading screen and error reaction in certificate.html

Zobrazit rozdíly:

static/js/index.js
1
    Vue.use(VueLoading);
2
    Vue.component('loading', VueLoading)
1 3

  
2 4
    // certificate listing app VUE instance
3 5
    var certificateListingApp = new Vue({
4 6
        el: "#certificateListingPage",
5 7
        data: {
8
            loading: true,
6 9
            // list of all certificates to be displayed in the list
7 10
            certificates: [],
8 11
            successMessage: ''
......
30 33
    // download a list of all available certificates and display them in the table
31 34
    axios.get(API_URL + "certificates")
32 35
        .then(function (response) {
33
            if (response.data["success"])
36
            if (response.data["success"]) {
34 37
                response.data["data"].forEach(item => certificateListingApp.certificates.push(item))
38
            }
39
            certificateListingApp.loading = false;
35 40
        })
36 41
        .catch(function (error) {
37 42
            console.log(error);
43
            certificateListingApp.loading = false;
38 44
        });

Také k dispozici: Unified diff