~sylvain-pineau/launchpad-results/trend-reports-yui3

« back to all changes in this revision

Viewing changes to templates/teststats.html

  • Committer: Sylvain Pineau
  • Date: 2011-11-30 14:56:39 UTC
  • Revision ID: sylvain.pineau@canonical.com-20111130145639-ht359ted81ys180f
Only show the loading msg if there is some charts data to render

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
        centered: true,
46
46
        render : true,
47
47
    });
48
 
    Y.one("#panelContent").append('<h1 style="text-align: center; width: 300px; background-color: white; border: 2px solid #bfbfbf; border-radius: 4px; padding: 1em">Loading...</h1>');
49
 
    panel.show();
50
48
 
51
49
    {% for key, ts_data in stats_report.items %}
52
50
 
194
192
        draw: function() {
195
193
                Y.one("#chart{{ forloop.counter }}").append("<h3>{{ key }}</h3>");
196
194
                mychart{{ forloop.counter }}.render("#chart{{ forloop.counter }}");
 
195
                {% if forloop.first %}
 
196
                Y.one("#panelContent").append('<h1 style="text-align: center; width: 300px; background-color: white; border: 2px solid #bfbfbf; border-radius: 4px; padding: 1em">Loading...</h1>');
 
197
                panel.show();
 
198
                {% endif %}
197
199
                {% if forloop.last %}panel.hide();{% endif %}
198
200
        }
199
201
    };