Revision 55e4b353 ui/templates/machines_icon.html

b/ui/templates/machines_icon.html
58 58
                        <span class="ip-version-label">v6</span> <span class="public ipv6-text"></span>
59 59
                    </h5>
60 60
                </span>
61
                <span class="build-progress"></span>
61 62
            </div>
62 63
            <div class="info">
63 64
                <div class="info-header">
......
723 724
                list_metadata_keys(server.id, server.metadata.values);
724 725
        }
725 726

  
726
        // if machine in destroy state keep it that way
727 727
        var server = get_machine(server.id);
728
        if (server.status == "DESTROY") {
729
            existing = $('#machinesview-icon.standard #' + server.id);
730
            if (existing.length) {
731
                $(existing).find('.status').text(TRANSITIONS['Destroying']);
732
                $(existing).find('.state').removeClass().addClass('state destroying-state');
733
                $(existing).find('.spinner').show();
734
                $(existing).find('.wave').hide();
735
            }
728
        existing = $('#machinesview-icon.standard #' + server.id);
729

  
730
        // if machine in destroy state keep it that way
731
        if (server.status == "DESTROY" && existing.length >0) {
732
            $(existing).find('.status').text(TRANSITIONS['Destroying']);
733
            $(existing).find('.state').removeClass().addClass('state destroying-state');
734
            $(existing).find('.spinner').show();
735
            $(existing).find('.wave').hide();
736
        }
737

  
738
        // update progress
739
        if (server.status == 'BUILD' && existing.length > 0) {
740
            // update bulding progress
741
            var progress_details = get_progress_details(server.id);
742
            existing.find("span.ip").hide();
743
            existing.find("span.build-progress").show().text(progress_details.msg);
744
        } else {
745
            // hide building progress
746
            existing.find("span.ip").show()
747
            existing.find("span.build-progress").hide();
736 748
        }
737 749
    });
738 750
    /*

Also available in: Unified diff