{% extends "layout.html" %} {% macro help_link(url) %} ? {% endmacro %} {% macro help_text(text) %} ? {% endmacro %} {% macro phase_popup_link(phase, build, kind) %} {{ caller() }} {% endmacro %} {% macro close_popup_link(kind) %} {{ caller() }} {% endmacro %} {% macro phase_popup_cell(phase, phase_info, build) %} {% if not build %} {% set kind = "unknown" %} {% elif build.end_time == None %} {% set kind = "running" %} {% elif build.result == 0 %} {% set kind = "success" %} {% elif build == phase_info.failing %} {% set kind = "failure" %} {% else %} {% set kind = "warnings" %} {% endif %} {% if build %} {% call phase_popup_link(phase, build, kind) %} r{{ build.source_stamp }} {% endcall %} {% else %}   {% endif %} {% endmacro %} {% macro timing_popup_link(phase) -%} {{ caller() }} {%- endmacro %} {# Include jQuery and View2D graph widget for use by the timing popups. #} {% block head %} {% endblock %} {% block javascript %} function show_content_in_popup(kind, content) { var popup_holder = document.getElementById(kind + "_popup_holder"); var popup = document.getElementById(kind + "_popup"); popup.innerHTML = content; popup_holder.style.display = "block"; } // Handler for popup close onclick events. function close_popup(kind) { var popup_holder = document.getElementById(kind + "_popup_holder"); var popup = document.getElementById(kind + "_popup"); popup_holder.style.display = "none"; } // Handler for help onclick events. function show_help_popup(text, event) { // Update the popup location. update_popup_location("help", event); // Update the help txt. show_content_in_popup("help", text); } // Handler for phase onclick events. function show_popup(kind, url, event) { // Update the popup location. update_popup_location(kind, event); // Get the popup elements. var popup = document.getElementById(kind + "_popup"); var popup_frame = document.getElementById(kind + "_popup_frame"); // Load the popup into the hidden frame. popup_frame.src = url; } // Helper for moving popups around. function update_popup_location(kind, event) { var popup_holder = document.getElementById(kind + "_popup_holder"); var popup = document.getElementById(kind + "_popup"); // Find the current curson position. var cx = (window.event ? window.event.clientX : event.pageX); var cy = (window.event ? window.event.clientY : event.pageY); // Offset the popup to not hide the local content. cx = cx + document.body.scrollLeft + 15; cy = cy + document.body.scrollTop + 10; // Move the div (hidden) under the cursor. popup_holder.style.left = parseInt(cx) + 'px'; popup_holder.style.top = parseInt(cy) + 'px'; // Close all current the popups. document.getElementById("help_popup_holder").style.display = "none"; document.getElementById("phase_popup_holder").style.display = "none"; document.getElementById("timing_popup_holder").style.display = "none"; } // Handler for timing onclick events. function show_timing_popup(url, event) { // Update the popup location. update_popup_location("timing", event); // Get the popup elements. var popup_holder = document.getElementById("timing_popup_holder"); var popup_legend = document.getElementById("timing_popup_legend"); // Get the timing data from the server. $.getJSON(url, {}, function(data) { var builds = data.data; // Create the timing graph if necessary. var graph = window.timing_graph_object; if (graph) { graph.clearPlots(); } else { graph = window.timing_graph_object = new Graph2D("timing_graph"); graph.clearColor = [1, 1, 1]; graph.xAxis.format = graph.xAxis.formats.normal; } // Add the plots and build the legend. var legend = ""; legend += ""; for (var i = 0, e = builds.length; i != e; ++i) { var item = builds[i]; var name = item[0]; var points = item[1]; var color = item[2]; var hex_color = item[3]; graph.addPlot(points, new Graph2D_LinePlotStyle(1, color)); legend += ""; legend += ""; } legend += "
Legend
 " + name + "
"; popup_legend.innerHTML = legend; graph.draw(); // Show the timing popup. popup_holder.style.display = "block"; }); } // Handler for page load events inside the hidden iframe we use to load popups. function popup_frame_loaded(kind, event) { var popup_frame = document.getElementById(kind + "_popup_frame"); // Get the frame contents and put it in the popup div. var content = popup_frame.contentWindow.document.body.innerHTML; show_content_in_popup(kind, content); } // On load, set the iframe's onload handler. window.onload = function() { document.getElementById("help_popup_frame").onload = function(event) { popup_frame_loaded("help", event); }; document.getElementById("phase_popup_frame").onload = function(event) { popup_frame_loaded("phase", event); } } {% endblock %} {% block title %}dashboard{% endblock %} {% block body %} {# Get the current summary... #} {% set summary = config.summary.get_current_status() %}

Welcome to the LLVM Lab Dashboard!

{% set final_phase = summary[ci_config.validation_builder] %} {% if final_phase and final_phase.passing %} The most recent released revision{{ help_text("A released revision is one which has passed all of the phases.") }} is r{{ final_phase.passing.source_stamp }} validated at: {{ final_phase.passing.end_time|asusertime }}. {% else %} No release is currently available! {% endif %}

{% set is_failing = false %} {% for phase in ci_config.phases %} {% set phase_info = summary[phase.phase_builder] %} {% if (phase_info and phase_info.completed and not is_failing and phase_info.completed.result != 0) %} {% set is_failing = true %} WARNING! LLVM is currently failing the {{ phase.name }} checks. The failures started in r{{ phase_info.failing.source_stamp }} at {{ phase_info.failing.end_time|asusertime }}. {% endif %} {% endfor %}

Current Status ({% call timing_popup_link(None) %}T{% endcall %})

{# The traffic light... #} {% for phase in ci_config.phases %} {% set phase_info = summary[phase.phase_builder] %} {% endfor %} {% set is_failing = false %} {% for phase in ci_config.phases %} {% set phase_info = summary[phase.phase_builder] %} {# First, check if we have no status (no completed builds, or prior phase is failing). #} {% if not phase_info or not phase_info.completed or is_failing %} {{ phase_popup_cell(phase, phase_info, None) }} {% else %} {{ phase_popup_cell(phase, phase_info, phase_info.completed) }} {% endif %} {% endfor %}
{{ phase.name }}{{ help_link(url_for('phase_description', index=loop.index0)) }}
(Phase {{ phase.number }})

Recent Activity

{# The results table... #} {% for phase in ci_config.phases %} {% endfor %} {% for phase in ci_config.phases %} {% set phase_info = summary[phase.phase_builder] %} {% if phase_info.current %} {{ phase_popup_cell(phase, phase_info, phase_info.current[0]) }} {% else %} {% endif %} {% endfor %} {% for phase in ci_config.phases %} {% set phase_info = summary[phase.phase_builder] %} {% if phase_info.completed %} {{ phase_popup_cell(phase, phase_info, phase_info.completed) }} {% else %} {% endif %} {% endfor %} {% for phase in ci_config.phases %} {% set phase_info = summary[phase.phase_builder] %} {% if phase_info.failing and (not phase_info.passing or phase_info.failing.number > phase_info.passing.number) %} {{ phase_popup_cell(phase, phase_info, phase_info.failing) }} {% else %} {% endif %} {% endfor %} {% for phase in ci_config.phases %} {% set phase_info = summary[phase.phase_builder] %} {% if phase_info.passing %} {{ phase_popup_cell(phase, phase_info, phase_info.passing) }} {% else %} {% endif %} {% endfor %}
Result TypePhase {{ phase.number }} ({% call timing_popup_link(phase) %}T{% endcall %})
Current(idle)
Last Completed(unknown)
First Failing
Last Working(unknown)
{# The div we use to include help popups. #} {# The iframe we use to load the help source. This is never actually displayed, just used to load the HTML we insert into the popup div. #} {# The div we use to include phase popups. #} {# The iframe we use to load the phase popup source. This is never actually displayed, just used to load the HTML we insert into the popup div. #} {# The div we use to include timing popups. #} {% endblock %}