|
| 1 | +<!-- |
| 2 | + Interface for Openstack CI metrics tool. |
| 3 | + Copyright 2014 Gabriel Loewen |
| 4 | + Microsoft Openstack CI Lab team |
| 5 | +--> |
| 6 | + |
| 7 | +<!doctype html> |
| 8 | +<html> |
| 9 | +<head> |
| 10 | +{% load staticfiles %} |
| 11 | +<script src="/static/jquery-1.9.1.js" type="text/javascript"></script> |
| 12 | +<script src="/static/jquery-ui.js" type="text/javascript"></script> |
| 13 | +<script src="/static/jquery-migrate-1.2.1.js" type="text/javascript"></script> |
| 14 | +<script src="/static/jquery.printElement.js" type="text/javascript"></script> |
| 15 | +<script src="/static/flot/jquery.flot.js" type="text/javascript"></script> |
| 16 | +<script src="/static/flot/jquery.flot.resize.js" type="text/javascript"></script> |
| 17 | +<script src="/static/flot/jquery.flot.time.js" type="text/javascript"></script> |
| 18 | +<script src="/static/flot/jquery.flot.canvas.js" type="text/javascript"></script> |
| 19 | +<script src="/static/flot/jquery.flot.pie.js" type="text/javascript"></script> |
| 20 | +<script src="/static/flot/jquery.flot.symbol.js" type="text/javascript"></script> |
| 21 | +<script src="/static/flot/jquery.flot.legendoncanvas.js" type="text/javascript"></script> |
| 22 | +<script src="/static/flot/jquery.flot.crosshair.js" type="text/javascript"></script> |
| 23 | +<script src="/static/base64.js" type="text/javascript"></script> |
| 24 | +<script src="/static/canvas2image.js" type="text/javascript"></script> |
| 25 | +<script src="/static/flot/jquery.flot.saveAsImage.js" type="text/javascript"></script> |
| 26 | + |
| 27 | +<!-- Get variables from Django, and pass them into corresponding Javascript arrays --> |
| 28 | +<script type="text/javascript"> |
| 29 | + {% if granular == True %} |
| 30 | + var showTime = true; |
| 31 | + {% else %} |
| 32 | + var showTime = false; |
| 33 | + {% endif %} |
| 34 | + |
| 35 | + {% for key, value in upstreamResults.items %} |
| 36 | + var upstream{{ key|cut:"openstack/"|lower }}Success = {{ value.0|safe }}; |
| 37 | + var upstream{{ key|cut:"openstack/"|lower }}Fail = {{ value.1|safe }}; |
| 38 | + var upstream{{ key|cut:"openstack/"|lower }}Miss = {{ value.2|safe }}; |
| 39 | + {% endfor %} |
| 40 | + |
| 41 | + {% for key, value in mainResults.items %} |
| 42 | + var {{ key|cut:"openstack/"|lower }}Success = {{ value.0|safe }}; |
| 43 | + var {{ key|cut:"openstack/"|lower }}Fail = {{ value.1|safe }}; |
| 44 | + var {{ key|cut:"openstack/"|lower }}Miss = {{ value.2|safe }}; |
| 45 | + {% endfor %} |
| 46 | + |
| 47 | + {% for p in projects.items %} |
| 48 | + console.log({{ p|safe }}); |
| 49 | + {% endfor %} |
| 50 | + |
| 51 | + var projects = {{ projects|safe }}; |
| 52 | + |
| 53 | +function printDiv() |
| 54 | +{ |
| 55 | + var divToPrint=$("#main"); |
| 56 | + newWin= window.open(""); |
| 57 | + newWin.document.write(divToPrint.outerHTML); |
| 58 | + newWin.print(); |
| 59 | + newWin.close(); |
| 60 | +} |
| 61 | + |
| 62 | +</script> |
| 63 | +<script type="text/javascript" src="/static/aggregator.js"></script> |
| 64 | +<link href="/static/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"> |
| 65 | +<link href="/static/aggregator.css" rel="stylesheet" type="text/css"> |
| 66 | +<title>CI Lab Metrics Results</title> |
| 67 | +</head> |
| 68 | +<body> |
| 69 | +<div id="content"> |
| 70 | + <div id="sidebar"> |
| 71 | + <h3 style="text-align: center;">{{ name }} Results</h3><br /> |
| 72 | + <table style="width: 100%;"> |
| 73 | + <tr> |
| 74 | + <td></td> |
| 75 | + <td><strong>Tests</strong></td> |
| 76 | + <td><strong>Patchsets</strong></td> |
| 77 | + </tr> |
| 78 | + <tr> |
| 79 | + <td><strong>Total</strong></td> |
| 80 | + <td id="total"></td> |
| 81 | + <td id="totalps"></td> |
| 82 | + </tr> |
| 83 | + <tr> |
| 84 | + <td><strong>Success</strong></td> |
| 85 | + <td id="success"></td> |
| 86 | + <td id="successps"></td> |
| 87 | + </tr> |
| 88 | + <tr> |
| 89 | + <td><strong>Failed</strong></td> |
| 90 | + <td id="failed"></td> |
| 91 | + <td id="failedps"></td> |
| 92 | + </tr> |
| 93 | + <tr> |
| 94 | + <td><strong>Missed</strong></td> |
| 95 | + <td id="missed"></td> |
| 96 | + <td id="missedps"></td> |
| 97 | + </tr> |
| 98 | + </table><br /> |
| 99 | + <div id="projectStats"></div> |
| 100 | + <div id="links"> |
| 101 | + <ul> |
| 102 | + <li><a id="print" href="javascript:void(0)">Print</a></li> |
| 103 | + <li><a href="/">Go Back</a></li> |
| 104 | + <li><a href="/accounts/logout">Logout</a></li> |
| 105 | + </ul> |
| 106 | + </div> |
| 107 | + </div> |
| 108 | + |
| 109 | + <div id="main"><br /> |
| 110 | + <form action="#" method="post"> {% csrf_token %} |
| 111 | + Start: <input type="text" class="datepicker" name="start" value="{{ start }}"/> |
| 112 | + End: <input type="text" class="datepicker" name="end" value="{{ end }}"/> |
| 113 | + <input type="submit" name="submit" value="Submit"> |
| 114 | + <input type="checkbox" name="timeGranular" id="timeGranular" {% if granular %}checked{% endif %} /> |
| 115 | + <label for="timeGranular">High Granularity</label> |
| 116 | + </form> |
| 117 | + </div> |
| 118 | +</div> |
| 119 | +<div id="tooltip"></div> |
| 120 | +</body> |
| 121 | +</html> |
0 commit comments