diff options
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates')
| -rw-r--r-- | bitbake/lib/toaster/toastergui/templates/builds.html (renamed from bitbake/lib/toaster/toastergui/templates/build.html) | 7 | ||||
| -rw-r--r-- | bitbake/lib/toaster/toastergui/templates/managed_builds.html | 167 | ||||
| -rw-r--r-- | bitbake/lib/toaster/toastergui/templates/managed_mrb_section.html | 193 | ||||
| -rw-r--r-- | bitbake/lib/toaster/toastergui/templates/mrb_section.html | 41 | ||||
| -rw-r--r-- | bitbake/lib/toaster/toastergui/templates/project.html | 40 | ||||
| -rw-r--r-- | bitbake/lib/toaster/toastergui/templates/projectbuilds.html | 1 | ||||
| -rw-r--r-- | bitbake/lib/toaster/toastergui/templates/projects.html | 22 |
7 files changed, 62 insertions, 409 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/build.html b/bitbake/lib/toaster/toastergui/templates/builds.html index f0b5ea529f..e9211affcd 100644 --- a/bitbake/lib/toaster/toastergui/templates/build.html +++ b/bitbake/lib/toaster/toastergui/templates/builds.html | |||
| @@ -14,13 +14,15 @@ | |||
| 14 | 14 | ||
| 15 | {% block pagecontent %} | 15 | {% block pagecontent %} |
| 16 | 16 | ||
| 17 | {% if last_date_from and last_date_to %} | ||
| 17 | <script> | 18 | <script> |
| 18 | // intiialize the date range controls | 19 | // initialize the date range controls |
| 19 | $(document).ready(function () { | 20 | $(document).ready(function () { |
| 20 | date_init('started_on','{{last_date_from}}','{{last_date_to}}','{{dateMin_started_on}}','{{dateMax_started_on}}','{{daterange_selected}}'); | 21 | date_init('started_on','{{last_date_from}}','{{last_date_to}}','{{dateMin_started_on}}','{{dateMax_started_on}}','{{daterange_selected}}'); |
| 21 | date_init('completed_on','{{last_date_from}}','{{last_date_to}}','{{dateMin_completed_on}}','{{dateMax_completed_on}}','{{daterange_selected}}'); | 22 | date_init('completed_on','{{last_date_from}}','{{last_date_to}}','{{dateMin_completed_on}}','{{dateMax_completed_on}}','{{daterange_selected}}'); |
| 22 | }); | 23 | }); |
| 23 | </script> | 24 | </script> |
| 25 | {%endif%} {# last_date_from and last_date_to #} | ||
| 24 | 26 | ||
| 25 | <div class="row-fluid"> | 27 | <div class="row-fluid"> |
| 26 | 28 | ||
| @@ -87,9 +89,8 @@ | |||
| 87 | <a href="{%url "builddashboard" build.id%}#images">{{fstypes|get_dict_value:build.id}}</a> | 89 | <a href="{%url "builddashboard" build.id%}#images">{{fstypes|get_dict_value:build.id}}</a> |
| 88 | {% endif %} | 90 | {% endif %} |
| 89 | </td> | 91 | </td> |
| 90 | {% if build.project %} | 92 | <td> |
| 91 | <a href="{% url 'project' build.project.id %}">{{build.project.name}}</a> | 93 | <a href="{% url 'project' build.project.id %}">{{build.project.name}}</a> |
| 92 | {% endif %} | ||
| 93 | </td> | 94 | </td> |
| 94 | </tr> | 95 | </tr> |
| 95 | 96 | ||
diff --git a/bitbake/lib/toaster/toastergui/templates/managed_builds.html b/bitbake/lib/toaster/toastergui/templates/managed_builds.html deleted file mode 100644 index 63ae5408f5..0000000000 --- a/bitbake/lib/toaster/toastergui/templates/managed_builds.html +++ /dev/null | |||
| @@ -1,167 +0,0 @@ | |||
| 1 | {% extends "base.html" %} | ||
| 2 | |||
| 3 | {% load static %} | ||
| 4 | {% load projecttags %} | ||
| 5 | {% load humanize %} | ||
| 6 | |||
| 7 | {% block extraheadcontent %} | ||
| 8 | <link rel="stylesheet" href="/static/css/jquery-ui.min.css" type='text/css'> | ||
| 9 | <link rel="stylesheet" href="/static/css/jquery-ui.structure.min.css" type='text/css'> | ||
| 10 | <link rel="stylesheet" href="/static/css/jquery-ui.theme.min.css" type='text/css'> | ||
| 11 | <script src="/static/js/jquery-ui.min.js"></script> | ||
| 12 | <script src="/static/js/filtersnippet.js"></script> | ||
| 13 | {% endblock %} | ||
| 14 | |||
| 15 | {% block pagecontent %} | ||
| 16 | |||
| 17 | <script> | ||
| 18 | // initialize the date range controls | ||
| 19 | $(document).ready(function () { | ||
| 20 | date_init('created','{{last_date_from}}','{{last_date_to}}','{{dateMin_created}}','{{dateMax_created}}','{{daterange_selected}}'); | ||
| 21 | date_init('updated','{{last_date_from}}','{{last_date_to}}','{{dateMin_updated}}','{{dateMax_updated}}','{{daterange_selected}}'); | ||
| 22 | }); | ||
| 23 | </script> | ||
| 24 | |||
| 25 | <div class="row-fluid"> | ||
| 26 | |||
| 27 | {% include "managed_mrb_section.html" %} | ||
| 28 | |||
| 29 | |||
| 30 | {% if 1 %} | ||
| 31 | <div class="page-header top-air"> | ||
| 32 | <h1> | ||
| 33 | {% if request.GET.filter and objects.paginator.count > 0 or request.GET.search and objects.paginator.count > 0 %} | ||
| 34 | {{objects.paginator.count}} build{{objects.paginator.count|pluralize}} found | ||
| 35 | {%elif request.GET.filter and objects.paginator.count == 0 or request.GET.search and objects.paginator.count == 0 %} | ||
| 36 | No builds found | ||
| 37 | {%else%} | ||
| 38 | All builds | ||
| 39 | {%endif%} | ||
| 40 | </h1> | ||
| 41 | </div> | ||
| 42 | |||
| 43 | {% if objects.paginator.count == 0 %} | ||
| 44 | <div class="row-fluid"> | ||
| 45 | {% if request.GET.filter or request.GET.search %} | ||
| 46 | <div class="alert"> | ||
| 47 | <form class="no-results input-append" id="searchform"> | ||
| 48 | <input id="search" name="search" class="input-xxlarge" type="text" value="{{request.GET.search}}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %} | ||
| 49 | <button class="btn" type="submit" value="Search">Search</button> | ||
| 50 | <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all builds</button> | ||
| 51 | </form> | ||
| 52 | </div> | ||
| 53 | {% else %} | ||
| 54 | <div class="alert alert-info"> | ||
| 55 | <p class="lead">Toaster has not recorded any builds yet. To run a build, <a href="{% url 'all-projects' %}">select the project</a> for which you want to build. | ||
| 56 | </div> | ||
| 57 | {% endif %} | ||
| 58 | </div> | ||
| 59 | |||
| 60 | |||
| 61 | {% else %} {# We have builds to display #} | ||
| 62 | {% include "basetable_top_buildprojects.html" %} | ||
| 63 | <!-- Table data rows; the order needs to match the order of "tablecols" definitions; and the <td class value needs to match the tablecols clclass value for show/hide buttons to work --> | ||
| 64 | {% for buildrequest in objects %}{% if buildrequest.build %} {% with build=buildrequest.build %} {# if we have a build, just display it #} | ||
| 65 | <tr class="data"> | ||
| 66 | <td class="outcome"><a href="{% url "builddashboard" build.id %}">{%if build.outcome == build.SUCCEEDED%}<i class="icon-ok-sign success"></i>{%elif build.outcome == build.FAILED%}<i class="icon-minus-sign error"></i>{%else%}{%endif%}</a> | ||
| 67 | {% if build.project %} | ||
| 68 | <a href="{% url 'build_artifact' build.id "cookerlog" build.id %}"> | ||
| 69 | <i class="icon-download-alt" title="" data-original-title="Download build log"></i> | ||
| 70 | </a> | ||
| 71 | {% endif %} | ||
| 72 | |||
| 73 | </td> | ||
| 74 | <td class="target">{% for t in build.target_set.all %} <a href="{% url "builddashboard" build.id %}"> {{t.target}} </a> <br />{% endfor %}</td> | ||
| 75 | <td class="machine"><a href="{% url "builddashboard" build.id %}">{{build.machine}}</a></td> | ||
| 76 | {% if MANAGED %} | ||
| 77 | <td class="project"> | ||
| 78 | {% if build.project %} | ||
| 79 | <a href="{% url 'project' build.project.id %}">{{build.project.name}}</a> | ||
| 80 | {% endif %} | ||
| 81 | </td> | ||
| 82 | {% endif %} | ||
| 83 | <td class="started_on"><a href="{% url "builddashboard" build.id %}">{{build.started_on|date:"d/m/y H:i"}}</a></td> | ||
| 84 | <td class="completed_on"><a href="{% url "builddashboard" build.id %}">{{build.completed_on|date:"d/m/y H:i"}}</a></td> | ||
| 85 | <td class="failed_tasks error"> | ||
| 86 | {% query build.task_build outcome=4 order__gt=0 as exectask%} | ||
| 87 | {% if exectask.count == 1 %} | ||
| 88 | <a href="{% url "task" build.id exectask.0.id %}">{{exectask.0.recipe.name}}.{{exectask.0.task_name}}</a> | ||
| 89 | {% if MANAGED and build.project %} | ||
| 90 | <a href="{% url 'build_artifact' build.id "tasklogfile" exectask.0.id %}"> | ||
| 91 | <i class="icon-download-alt" title="" data-original-title="Download task log file"></i> | ||
| 92 | </a> | ||
| 93 | {% endif %} | ||
| 94 | {% elif exectask.count > 1%} | ||
| 95 | <a href="{% url "tasks" build.id %}?filter=outcome%3A4">{{exectask.count}} task{{exectask.count|pluralize}}</a> | ||
| 96 | {%endif%} | ||
| 97 | </td> | ||
| 98 | <td class="errors_no"> | ||
| 99 | {% if build.errors_no %} | ||
| 100 | <a class="errors_no error" href="{% url "builddashboard" build.id %}#errors">{{build.errors_no}} error{{build.errors_no|pluralize}}</a> | ||
| 101 | {% if MANAGED and build.project and build.buildartifact_set.count %} | ||
| 102 | <a href="{% url 'build_artifact' build.id "cookerlog" build.id %}"> | ||
| 103 | <i class="icon-download-alt" title="" data-original-title="Download build log"></i> | ||
| 104 | </a> | ||
| 105 | {% endif %} | ||
| 106 | {%endif%} | ||
| 107 | </td> | ||
| 108 | <td class="warnings_no">{% if build.warnings_no %}<a class="warnings_no warning" href="{% url "builddashboard" build.id %}#warnings">{{build.warnings_no}} warning{{build.warnings_no|pluralize}}</a>{%endif%}</td> | ||
| 109 | <td class="time"><a href="{% url "buildtime" build.id %}">{{build.timespent|sectohms}}</a></td> | ||
| 110 | {% if not MANAGED or not build.project %} | ||
| 111 | <td class="log">{{build.cooker_log_path}}</td> | ||
| 112 | {% endif %} | ||
| 113 | <td class="output"> | ||
| 114 | {% if build.outcome == build.SUCCEEDED %} | ||
| 115 | <a href="{%url "builddashboard" build.id%}#images">{{fstypes|get_dict_value:build.id}}</a> | ||
| 116 | {% endif %} | ||
| 117 | </td> | ||
| 118 | </tr> | ||
| 119 | |||
| 120 | |||
| 121 | {%endwith%} | ||
| 122 | {% else %} {# we don't have a build for this build request, mask the data with build request data #} | ||
| 123 | |||
| 124 | |||
| 125 | |||
| 126 | <tr class="data"> | ||
| 127 | <td class="outcome">{% if buildrequest.state == buildrequest.REQ_FAILED %}<i class="icon-minus-sign error"></i>{%else%}FIXME_build_request_state{%endif%}</td> | ||
| 128 | <td class="target"> | ||
| 129 | <a href="{% url "buildrequestdetails" buildrequest.project.id buildrequest.id %}"><span data-toggle="tooltip" {%if buildrequest.brtarget_set.all.count > 1%}title="Targets: {%for target in buildrequest.brtarget_set.all%}{{target.target}} {%endfor%}"{%endif%}>{{buildrequest.brtarget_set.all.0.target}} {%if buildrequest.brtarget_set.all.count > 1%}(+ {{buildrequest.brtarget_set.all.count|add:"-1"}}){%endif%} </span></a> | ||
| 130 | </td> | ||
| 131 | <td class="machine"> | ||
| 132 | <a href="{% url "buildrequestdetails" buildrequest.project.id buildrequest.id %}">{{buildrequest.machine}}</a> | ||
| 133 | </td> | ||
| 134 | {% if MANAGED %} | ||
| 135 | <td class="project"> | ||
| 136 | <a href="{% url 'project' buildrequest.project.id %}">{{buildrequest.project.name}}</a> | ||
| 137 | </td> | ||
| 138 | {% endif %} | ||
| 139 | <td class="started_on"> | ||
| 140 | <a href="{% url "buildrequestdetails" buildrequest.project.id buildrequest.id %}">{{buildrequest.created|date:"d/m/y H:i"}}</a> | ||
| 141 | </td> | ||
| 142 | <td class="completed_on"> | ||
| 143 | <a href="{% url "buildrequestdetails" buildrequest.project.id buildrequest.id %}">{{buildrequest.updated|date:"d/m/y H:i"}}</a> | ||
| 144 | </td> | ||
| 145 | <td class="failed_tasks error"> | ||
| 146 | </td> | ||
| 147 | <td class="errors_no"> | ||
| 148 | <a class="errors_no error" href="{% url "buildrequestdetails" buildrequest.project.id buildrequest.id %}#errors">{{buildrequest.brerror_set.all.count}} error{{buildrequest.brerror_set.all.count|pluralize}}</a> | ||
| 149 | </td> | ||
| 150 | <td class="warnings_no"> | ||
| 151 | </td> | ||
| 152 | <td class="time"> | ||
| 153 | {{br.timespent.total_seconds|sectohms}} | ||
| 154 | </td> | ||
| 155 | <td class="output"> {# we have no output here #} | ||
| 156 | </td> | ||
| 157 | </tr> | ||
| 158 | {%endif%} | ||
| 159 | {% endfor %} | ||
| 160 | |||
| 161 | |||
| 162 | {% include "basetable_bottom.html" %} | ||
| 163 | {% endif %} {# objects.paginator.count #} | ||
| 164 | {% endif %} {# empty #} | ||
| 165 | </div><!-- end row-fluid--> | ||
| 166 | |||
| 167 | {% endblock %} | ||
diff --git a/bitbake/lib/toaster/toastergui/templates/managed_mrb_section.html b/bitbake/lib/toaster/toastergui/templates/managed_mrb_section.html deleted file mode 100644 index 47e64eaaab..0000000000 --- a/bitbake/lib/toaster/toastergui/templates/managed_mrb_section.html +++ /dev/null | |||
| @@ -1,193 +0,0 @@ | |||
| 1 | {% load static %} | ||
| 2 | {% load projecttags %} | ||
| 3 | {% load humanize %} | ||
| 4 | |||
| 5 | {%if mru|length > 0%} | ||
| 6 | {# Template provides the latest builds section requires mru in the context which can be added from _managed_get_latest_builds #} | ||
| 7 | <div class="page-header top-air"> | ||
| 8 | <h1> | ||
| 9 | Latest builds | ||
| 10 | </h1> | ||
| 11 | </div> | ||
| 12 | <div id="latest-builds"> | ||
| 13 | {% for buildrequest in mru %}{% with build=buildrequest.build %} | ||
| 14 | |||
| 15 | {% if build %} {# if we have a build, just display it #} | ||
| 16 | |||
| 17 | <div class="alert {%if build.outcome == build.SUCCEEDED%}alert-success{%elif build.outcome == build.FAILED%}alert-error{%else%}alert-info{%endif%} {% if MANAGED and build.project %}project-name{% endif %} "> | ||
| 18 | {% if MANAGED and build.project %} | ||
| 19 | <span class="label {%if build.outcome == build.SUCCEEDED%}label-success{%elif build.outcome == build.FAILED%}label-important{%else%}label-info{%endif%}"> | ||
| 20 | <a href="{% url 'project' build.project.id %}"> {{build.project.name}} </a> | ||
| 21 | </span> | ||
| 22 | {% endif %} | ||
| 23 | |||
| 24 | <div class="row-fluid"> | ||
| 25 | <div class="span3 lead"> | ||
| 26 | {%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %} | ||
| 27 | <a href="{%url 'builddashboard' build.pk%}" class="{%if build.outcome == build.SUCCEEDED %}success{%else%}error{%endif%}"> | ||
| 28 | {% endif %} | ||
| 29 | {% include "brtargets.html" %} | ||
| 30 | {%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %} | ||
| 31 | </a> | ||
| 32 | {% endif %} | ||
| 33 | </div> | ||
| 34 | {%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %} | ||
| 35 | <div class="span2 lead"> | ||
| 36 | {% if build.completed_on|format_build_date %} | ||
| 37 | {{ build.completed_on|date:'d/m/y H:i' }} | ||
| 38 | {% else %} | ||
| 39 | {{ build.completed_on|date:'H:i' }} | ||
| 40 | {% endif %} | ||
| 41 | </div> | ||
| 42 | <div class="span2 lead"> | ||
| 43 | {% if build.errors_no %} | ||
| 44 | <i class="icon-minus-sign red"></i> <a href="{%url 'builddashboard' build.pk%}#errors" class="error">{{build.errors_no}} error{{build.errors_no|pluralize}}</a> | ||
| 45 | {% endif %} | ||
| 46 | </div> | ||
| 47 | <div class="span2 lead"> | ||
| 48 | {% if build.warnings_no %} | ||
| 49 | <i class="icon-warning-sign yellow"></i> <a href="{%url 'builddashboard' build.pk%}#warnings" class="warning">{{build.warnings_no}} warning{{build.warnings_no|pluralize}}</a> | ||
| 50 | {% endif %} | ||
| 51 | </div> | ||
| 52 | <div class="lead "> | ||
| 53 | <span class="lead{%if not MANAGED or not build.project%} pull-right{%endif%}"> | ||
| 54 | Build time: <a href="{% url 'buildtime' build.pk %}">{{ build.timespent|sectohms }}</a> | ||
| 55 | </span> | ||
| 56 | {% if build.project %} | ||
| 57 | <button class="btn | ||
| 58 | {% if build.outcome == build.SUCCEEDED %} | ||
| 59 | btn-success | ||
| 60 | {% elif build.outcome == build.FAILED %} | ||
| 61 | btn-danger | ||
| 62 | {% else %} | ||
| 63 | btn-info | ||
| 64 | {%endif%} | ||
| 65 | pull-right" | ||
| 66 | {% include "runagain.html" %} | ||
| 67 | </button> | ||
| 68 | {% endif %} | ||
| 69 | </div> | ||
| 70 | {%endif%} | ||
| 71 | {%if build.outcome == build.IN_PROGRESS %} | ||
| 72 | <div class="span4 offset1"> | ||
| 73 | <div class="progress" style="margin-top:5px;" data-toggle="tooltip" title="{{build.completeper}}% of tasks complete"> | ||
| 74 | <div style="width: {{build.completeper}}%;" class="bar"></div> | ||
| 75 | </div> | ||
| 76 | </div> | ||
| 77 | <div class="lead pull-right">{{build.completeper}}% tasks completed</div> | ||
| 78 | {%endif%} | ||
| 79 | </div> | ||
| 80 | </div> | ||
| 81 | |||
| 82 | {% else %} {# we use the project's page recent build design #} | ||
| 83 | |||
| 84 | |||
| 85 | |||
| 86 | |||
| 87 | <div class="alert {% if buildrequest.state == buildrequest.REQ_FAILED %}alert-error{% else %}alert-info{% endif %} project-name"> | ||
| 88 | <span class="label {% if buildrequest.state == buildrequest.REQ_FAILED %}label-important{% else%}label-info{% endif %}"> | ||
| 89 | <a href="{% url 'project' buildrequest.project.id %}"> {{buildrequest.project.name}} </a> | ||
| 90 | </span> | ||
| 91 | <div class="row-fluid"> | ||
| 92 | |||
| 93 | {% if buildrequest.state == buildrequest.REQ_FAILED %} | ||
| 94 | <div class="span3 lead"> | ||
| 95 | <a href="{%url 'buildrequestdetails' buildrequest.project.id buildrequest.pk%}" class="error"> | ||
| 96 | {% include "brtargets.html" %} | ||
| 97 | </a> | ||
| 98 | </div> | ||
| 99 | <div class="span2 lead"> | ||
| 100 | {% if buildrequest.updated|format_build_date %} | ||
| 101 | {{ buildrequest.updated|date:'d/m/y H:i' }} | ||
| 102 | {% else %} | ||
| 103 | {{ buildrequest.updated|date:'H:i' }} | ||
| 104 | {% endif %} | ||
| 105 | </div> | ||
| 106 | <div class="span2 lead"> | ||
| 107 | {% if buildrequest.brerror_set.all.count %} | ||
| 108 | <i class="icon-minus-sign red"></i> <a href="{%url 'buildrequestdetails' buildrequest.project.id buildrequest.pk %}#errors" class="error">{{buildrequest.brerror_set.all.count}} error{{buildrequest.brerror_set.all.count|pluralize}}</a> | ||
| 109 | {% endif %} | ||
| 110 | </div> | ||
| 111 | <div class="span2 lead"> {# there are no warnings for buildrequests #} | ||
| 112 | </div> | ||
| 113 | <div class="lead "> | ||
| 114 | <span class="lead{%if not MANAGED or not buildrequest.project%} pull-right{%endif%}"> | ||
| 115 | Build time: {{ buildrequest.get_duration|sectohms }} | ||
| 116 | </span> | ||
| 117 | |||
| 118 | <button class="btn btn-danger pull-right" | ||
| 119 | {% include "runagain.html" %} | ||
| 120 | </button> | ||
| 121 | </div> | ||
| 122 | |||
| 123 | |||
| 124 | {% elif buildrequest.state == buildrequest.REQ_QUEUED %} | ||
| 125 | |||
| 126 | <div class="lead span5"> | ||
| 127 | {% include "brtargets.html" %} | ||
| 128 | </div> | ||
| 129 | <div class="span4 lead">Build queued | ||
| 130 | <i title="This build will start as soon as a build server is available" class="icon-question-sign get-help get-help-blue heading-help" data-toggle="tooltip"></i> | ||
| 131 | </div> | ||
| 132 | <button class="btn btn-info pull-right cancel-build-btn" data-build-id="{{buildrequest.id}}" data-request-url="{% url 'projectbuilds' buildrequest.project.id %}" >Cancel</button> | ||
| 133 | |||
| 134 | {% elif buildrequest.state == buildrequest.REQ_CREATED %} | ||
| 135 | |||
| 136 | <div class="lead span3"> | ||
| 137 | {% include "brtargets.html" %} | ||
| 138 | </div> | ||
| 139 | <div class="span6" > | ||
| 140 | <span class="lead">Creating build</span> | ||
| 141 | </div> | ||
| 142 | |||
| 143 | {% elif buildrequest.state == buildrequest.REQ_INPROGRESS %} | ||
| 144 | |||
| 145 | <div class="lead span5"> | ||
| 146 | {% include "brtargets.html" %} | ||
| 147 | </div> | ||
| 148 | <div class="span4 lead"> | ||
| 149 | Checking out layers | ||
| 150 | </div> | ||
| 151 | {% else %} | ||
| 152 | |||
| 153 | <div>FIXME!</div> | ||
| 154 | |||
| 155 | {% endif %} | ||
| 156 | <div class="lead pull-right"> | ||
| 157 | </div> | ||
| 158 | </div> | ||
| 159 | </div> | ||
| 160 | |||
| 161 | |||
| 162 | |||
| 163 | {% endif %} {# this ends the build request most recent build section #} | ||
| 164 | |||
| 165 | {%endwith%}{% endfor %} | ||
| 166 | </div> | ||
| 167 | |||
| 168 | <script> | ||
| 169 | |||
| 170 | function scheduleBuild(url, projectName, projectUrl, buildlist) { | ||
| 171 | console.log("scheduleBuild"); | ||
| 172 | libtoaster.startABuild(url, null, buildlist.join(" "), function(){ | ||
| 173 | window.location.reload(); | ||
| 174 | }, null); | ||
| 175 | } | ||
| 176 | |||
| 177 | $(document).ready(function(){ | ||
| 178 | |||
| 179 | $(".cancel-build-btn").click(function (){ | ||
| 180 | var url = $(this).data('request-url'); | ||
| 181 | var buildIds = $(this).data('build-id'); | ||
| 182 | var btn = $(this); | ||
| 183 | |||
| 184 | libtoaster.cancelABuild(url, buildIds, function(){ | ||
| 185 | btn.parents(".alert").fadeOut(); | ||
| 186 | }, null); | ||
| 187 | }); | ||
| 188 | }); | ||
| 189 | |||
| 190 | </script> | ||
| 191 | |||
| 192 | {%endif%} | ||
| 193 | |||
diff --git a/bitbake/lib/toaster/toastergui/templates/mrb_section.html b/bitbake/lib/toaster/toastergui/templates/mrb_section.html index c7bddf0372..7e84e4134d 100644 --- a/bitbake/lib/toaster/toastergui/templates/mrb_section.html +++ b/bitbake/lib/toaster/toastergui/templates/mrb_section.html | |||
| @@ -12,18 +12,24 @@ | |||
| 12 | </div> | 12 | </div> |
| 13 | <div id="latest-builds"> | 13 | <div id="latest-builds"> |
| 14 | {% for build in mru %} | 14 | {% for build in mru %} |
| 15 | <div class="alert {%if build.outcome == build.SUCCEEDED%}alert-success{%elif build.outcome == build.FAILED%}alert-error{%else%}alert-info{%endif%} {% if MANAGED and build.project %}project-name{% endif %} "> | 15 | <div class="alert {%if build.outcome == build.SUCCEEDED%}alert-success{%elif build.outcome == build.FAILED%}alert-error{%else%}alert-info{%endif%} project-name "> |
| 16 | {% if MANAGED and build.project %} | ||
| 17 | <span class="label {%if build.outcome == build.SUCCEEDED%}label-success{%elif build.outcome == build.FAILED%}label-danger{%else%}label-info{%endif%}"> {{build.project.name}} </span> | 16 | <span class="label {%if build.outcome == build.SUCCEEDED%}label-success{%elif build.outcome == build.FAILED%}label-danger{%else%}label-info{%endif%}"> {{build.project.name}} </span> |
| 18 | {% endif %} | ||
| 19 | 17 | ||
| 20 | <div class="row-fluid"> | 18 | <div class="row-fluid"> |
| 21 | <div class="span3 lead"> | 19 | <div class="span3 lead"> |
| 22 | {%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %} | 20 | {%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %} |
| 23 | <a href="{%url 'builddashboard' build.pk%}" class="{%if build.outcome == build.SUCCEEDED %}success{%else%}error{%endif%}"> | 21 | <a href="{%url 'builddashboard' build.pk%}" class="{%if build.outcome == build.SUCCEEDED %}success{%else%}error{%endif%}"> |
| 24 | {% endif %} | 22 | {% endif %} |
| 25 | <span data-toggle="tooltip" {%if build.target_set.all.count > 1%}title="Targets: {%for target in build.target_set.all%}{{target.target}} {%endfor%}"{%endif%}>{{build.target_set.all.0.target}} {%if build.target_set.all.count > 1%}(+ {{build.target_set.all.count|add:"-1"}}){%endif%} | 23 | {% if build.target_set.all.count > 0 %} |
| 26 | </span> | 24 | <span data-toggle="tooltip" |
| 25 | {%if build.target_set.all.count > 1%} | ||
| 26 | title="Targets: {%for target in build.target_set.all%}{{target.target}} {%endfor%}" | ||
| 27 | {%endif%} | ||
| 28 | > | ||
| 29 | |||
| 30 | {{build.target_set.all.0.target}} {%if build.target_set.all.count > 1%}(+ {{build.target_set.all.count|add:"-1"}}){%endif%} | ||
| 31 | </span> | ||
| 32 | {% endif %} | ||
| 27 | {%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %} | 33 | {%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %} |
| 28 | </a> | 34 | </a> |
| 29 | {% endif %} | 35 | {% endif %} |
| @@ -65,5 +71,30 @@ | |||
| 65 | 71 | ||
| 66 | {% endfor %} | 72 | {% endfor %} |
| 67 | </div> | 73 | </div> |
| 74 | |||
| 75 | <script> | ||
| 76 | |||
| 77 | function scheduleBuild(url, projectName, projectUrl, buildlist) { | ||
| 78 | console.log("scheduleBuild"); | ||
| 79 | libtoaster.startABuild(url, null, buildlist.join(" "), function(){ | ||
| 80 | window.location.reload(); | ||
| 81 | }, null); | ||
| 82 | } | ||
| 83 | |||
| 84 | $(document).ready(function(){ | ||
| 85 | |||
| 86 | $(".cancel-build-btn").click(function (){ | ||
| 87 | var url = $(this).data('request-url'); | ||
| 88 | var buildIds = $(this).data('build-id'); | ||
| 89 | var btn = $(this); | ||
| 90 | |||
| 91 | libtoaster.cancelABuild(url, buildIds, function(){ | ||
| 92 | btn.parents(".alert").fadeOut(); | ||
| 93 | }, null); | ||
| 94 | }); | ||
| 95 | }); | ||
| 96 | |||
| 97 | </script> | ||
| 98 | |||
| 68 | {%endif%} | 99 | {%endif%} |
| 69 | 100 | ||
diff --git a/bitbake/lib/toaster/toastergui/templates/project.html b/bitbake/lib/toaster/toastergui/templates/project.html index bca703a162..0f6a77b63c 100644 --- a/bitbake/lib/toaster/toastergui/templates/project.html +++ b/bitbake/lib/toaster/toastergui/templates/project.html | |||
| @@ -124,7 +124,7 @@ vim: expandtab tabstop=2 | |||
| 124 | <div class="well"> | 124 | <div class="well"> |
| 125 | <form class="build-form" data-ng-submit="buildNamedTarget()"> | 125 | <form class="build-form" data-ng-submit="buildNamedTarget()"> |
| 126 | <div class="input-append controls"> | 126 | <div class="input-append controls"> |
| 127 | <input type="text" class="huge input-xxlarge" placeholder="Type the recipe(s) you want to build" autocomplete="off" data-ng-model="targetName" data-typeahead="a.name for a in getRecipesAutocompleteSuggestions($viewValue)" data-typeahead-template-url="recipes_suggestion_details" data-ng-disabled="!layers.length"/> | 127 | <input type="text" class="huge input-xxlarge" placeholder="Type the recipe(s) you want to build" autocomplete="off" data-ng-model="targetName" data-typeahead="a.name for a in getRecipesAutocompleteSuggestions($viewValue)" data-typeahead-template-url="recipes_suggestion_details" data-ng-disabled="!project.release || !layers.length"/> |
| 128 | <button type="submit" class="btn btn-large btn-primary" data-ng-disabled="!targetName.length"> | 128 | <button type="submit" class="btn btn-large btn-primary" data-ng-disabled="!targetName.length"> |
| 129 | Build | 129 | Build |
| 130 | </button> | 130 | </button> |
| @@ -145,11 +145,11 @@ vim: expandtab tabstop=2 | |||
| 145 | 145 | ||
| 146 | <a id="buildslist"></a> | 146 | <a id="buildslist"></a> |
| 147 | <h2 class="air" data-ng-if="builds.length">Latest builds</h2> | 147 | <h2 class="air" data-ng-if="builds.length">Latest builds</h2> |
| 148 | <div class="animate-repeat alert" data-ng-repeat="b in builds track by b.id" data-ng-class="{'queued':'alert-info', 'deleted':'alert-info', 'in progress': 'alert-info', 'failed':'alert-error', 'completed':{'In Progress':'alert-info', 'Succeeded':'alert-success', 'Failed':'alert-error'}[b.build[0].status]}[b.status]"> | 148 | <div class="animate-repeat alert" data-ng-repeat="b in builds track by b.id" data-ng-class="{'In Progress':'alert-info', 'Succeeded':'alert-success', 'Failed':'alert-error'}[b.status]"> |
| 149 | <div class="row-fluid"> | 149 | <div class="row-fluid"> |
| 150 | <switch data-ng-switch="b.status"> | 150 | <switch data-ng-switch="b.status"> |
| 151 | 151 | ||
| 152 | <case data-ng-switch-when="failed"> | 152 | <case data-ng-switch-when="Failed"> |
| 153 | <div class="lead span3"> | 153 | <div class="lead span3"> |
| 154 | <a data-ng-class="{'succeeded': 'success', 'failed': 'error'}[b.status]" href="{[b.br_page_url]}"> | 154 | <a data-ng-class="{'succeeded': 'success', 'failed': 'error'}[b.status]" href="{[b.br_page_url]}"> |
| 155 | <span data-ng-repeat="t in b.targets" data-ng-include src="'target_display'"></span> | 155 | <span data-ng-repeat="t in b.targets" data-ng-include src="'target_display'"></span> |
| @@ -182,32 +182,8 @@ vim: expandtab tabstop=2 | |||
| 182 | </div> | 182 | </div> |
| 183 | </case> | 183 | </case> |
| 184 | 184 | ||
| 185 | <case data-ng-switch-when="queued"> | ||
| 186 | <div class="lead span5"> <span data-ng-repeat="t in b.targets" data-ng-include src="'target_display'"></span> </div> | ||
| 187 | <div class="span4 lead" >Build queued | ||
| 188 | <i title="This build will start as soon as a build server is available" class="icon-question-sign get-help get-help-blue heading-help" data-toggle="tooltip"></i> | ||
| 189 | </div> | ||
| 190 | <button class="btn pull-right btn-info" data-ng-click="buildCancel(b)">Cancel</button> | ||
| 191 | </case> | ||
| 192 | |||
| 193 | <case data-ng-switch-when="created"> | ||
| 194 | <div class="lead span5"> <span data-ng-repeat="t in b.targets" data-ng-include src="'target_display'"></span> </div> | ||
| 195 | <div class="span4"> | ||
| 196 | <span class="lead">Creating build</span> | ||
| 197 | </div> | ||
| 198 | <button class="btn pull-right btn-info" data-ng-click="buildCancel(b)">Cancel</button> | ||
| 199 | </case> | ||
| 200 | |||
| 201 | <case data-ng-switch-when="deleted"> | ||
| 202 | <div class="lead span5"> <span data-ng-repeat="t in b.targets" data-ng-include src="'target_display'"></span> </div> | ||
| 203 | <div class="span4" id="{[b.id]}-deleted" > | ||
| 204 | <span class="lead">Build cancelled</span> | ||
| 205 | </div> | ||
| 206 | <button class="btn pull-right btn-info" data-ng-click="buildDelete(b)">Close</button> | ||
| 207 | </case> | ||
| 208 | |||
| 209 | 185 | ||
| 210 | <case data-ng-switch-when="in progress"> | 186 | <case data-ng-switch-when="In Progress"> |
| 211 | <switch data-ng-switch="b.build.length"> | 187 | <switch data-ng-switch="b.build.length"> |
| 212 | <case data-ng-switch-when="0"> | 188 | <case data-ng-switch-when="0"> |
| 213 | <div class="lead span5"> <span data-ng-repeat="t in b.targets" data-ng-include src="'target_display'"></span> </div> | 189 | <div class="lead span5"> <span data-ng-repeat="t in b.targets" data-ng-include src="'target_display'"></span> </div> |
| @@ -227,7 +203,7 @@ vim: expandtab tabstop=2 | |||
| 227 | </case> | 203 | </case> |
| 228 | 204 | ||
| 229 | 205 | ||
| 230 | <case data-ng-switch-when="completed"> | 206 | <case data-ng-switch-when="Succeeded"> |
| 231 | <div class="lead span3"> | 207 | <div class="lead span3"> |
| 232 | <a data-ng-class="{'Succeeded': 'success', 'Failed': 'error'}[b.build[0].status]" href="{[b.build[0].build_page_url]}"> | 208 | <a data-ng-class="{'Succeeded': 'success', 'Failed': 'error'}[b.build[0].status]" href="{[b.build[0].build_page_url]}"> |
| 233 | <span data-ng-repeat="t in b.targets" data-ng-include src="'target_display'"></span> | 209 | <span data-ng-repeat="t in b.targets" data-ng-include src="'target_display'"></span> |
| @@ -293,7 +269,7 @@ vim: expandtab tabstop=2 | |||
| 293 | Layers <span class="muted counter">({[layers.length]})</span> | 269 | Layers <span class="muted counter">({[layers.length]})</span> |
| 294 | <i class="icon-question-sign get-help heading-help" title="Bitbake reads metadata files from modules called 'layers'. Layers allow you to isolate different types of customizations from each other. <a href='http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#understanding-and-creating-layers' target='_blank'>More on layers</a>"></i> | 270 | <i class="icon-question-sign get-help heading-help" title="Bitbake reads metadata files from modules called 'layers'. Layers allow you to isolate different types of customizations from each other. <a href='http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#understanding-and-creating-layers' target='_blank'>More on layers</a>"></i> |
| 295 | </h3> | 271 | </h3> |
| 296 | <div class="alert" data-ng-if="!layers.length"> | 272 | <div class="alert" data-ng-if="project.release && !layers.length"> |
| 297 | <b>You need to add some layers </b> | 273 | <b>You need to add some layers </b> |
| 298 | <p> | 274 | <p> |
| 299 | You can: | 275 | You can: |
| @@ -307,7 +283,7 @@ vim: expandtab tabstop=2 | |||
| 307 | </div> | 283 | </div> |
| 308 | <form data-ng-submit="layerAdd()"> | 284 | <form data-ng-submit="layerAdd()"> |
| 309 | <div class="input-append"> | 285 | <div class="input-append"> |
| 310 | <input type="text" class="input-xlarge" id="layer" autocomplete="off" placeholder="Type a layer name" data-minLength="1" data-ng-model="layerAddName" data-typeahead="e for e in getLayersAutocompleteSuggestions($viewValue)" data-typeahead-template-url="layers_suggestion_details" data-typeahead-on-select="onLayerSelect($item, $model, $label)" data-typeahead-editable="false" data-ng-class="{ 'has-error': layerAddName.$invalid }" /> | 286 | <input type="text" class="input-xlarge" id="layer" autocomplete="off" placeholder="Type a layer name" data-minLength="1" data-ng-model="layerAddName" data-typeahead="e for e in getLayersAutocompleteSuggestions($viewValue)" data-typeahead-template-url="layers_suggestion_details" data-typeahead-on-select="onLayerSelect($item, $model, $label)" data-typeahead-editable="false" data-ng-class="{ 'has-error': layerAddName.$invalid }" data-ng-disabled="!project.release" /> |
| 311 | <input type="submit" id="add-layer" class="btn" value="Add" data-ng-disabled="!layerAddName.length"/> | 287 | <input type="submit" id="add-layer" class="btn" value="Add" data-ng-disabled="!layerAddName.length"/> |
| 312 | </div> | 288 | </div> |
| 313 | {% csrf_token %} | 289 | {% csrf_token %} |
| @@ -334,7 +310,7 @@ vim: expandtab tabstop=2 | |||
| 334 | </h3> | 310 | </h3> |
| 335 | <form data-ng-submit="buildNamedTarget()"> | 311 | <form data-ng-submit="buildNamedTarget()"> |
| 336 | <div class="input-append"> | 312 | <div class="input-append"> |
| 337 | <input type="text" class="input-xlarge" placeholder="Type the recipe(s) you want to build" autocomplete="off" data-minLength="1" data-ng-model="targetName1" data-typeahead="a.name for a in getRecipesAutocompleteSuggestions($viewValue)" data-typeahead-template-url="recipes_suggestion_details" data-ng-disabled="!layers.length"> | 313 | <input type="text" class="input-xlarge" placeholder="Type the recipe(s) you want to build" autocomplete="off" data-minLength="1" data-ng-model="targetName1" data-typeahead="a.name for a in getRecipesAutocompleteSuggestions($viewValue)" data-typeahead-template-url="recipes_suggestion_details" data-ng-disabled="!project.release || !layers.length"> |
| 338 | <button type="submit" class="btn btn-primary" data-ng-disabled="!targetName1.length"> | 314 | <button type="submit" class="btn btn-primary" data-ng-disabled="!targetName1.length"> |
| 339 | Build </button> | 315 | Build </button> |
| 340 | </div> | 316 | </div> |
diff --git a/bitbake/lib/toaster/toastergui/templates/projectbuilds.html b/bitbake/lib/toaster/toastergui/templates/projectbuilds.html index 18b24955d0..896c3b5af7 100644 --- a/bitbake/lib/toaster/toastergui/templates/projectbuilds.html +++ b/bitbake/lib/toaster/toastergui/templates/projectbuilds.html | |||
| @@ -105,7 +105,6 @@ | |||
| 105 | </td> | 105 | </td> |
| 106 | </tr> | 106 | </tr> |
| 107 | 107 | ||
| 108 | |||
| 109 | {%endwith%} | 108 | {%endwith%} |
| 110 | {% else %} {# we don't have a build for this build request, mask the data with build request data #} | 109 | {% else %} {# we don't have a build for this build request, mask the data with build request data #} |
| 111 | 110 | ||
diff --git a/bitbake/lib/toaster/toastergui/templates/projects.html b/bitbake/lib/toaster/toastergui/templates/projects.html index 23340083ca..9c4346c45a 100644 --- a/bitbake/lib/toaster/toastergui/templates/projects.html +++ b/bitbake/lib/toaster/toastergui/templates/projects.html | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | {% block pagecontent %} | 7 | {% block pagecontent %} |
| 8 | 8 | ||
| 9 | 9 | ||
| 10 | {% include "managed_mrb_section.html" %} | 10 | {% include "mrb_section.html" %} |
| 11 | 11 | ||
| 12 | 12 | ||
| 13 | <div class="page-header top-air"> | 13 | <div class="page-header top-air"> |
| @@ -39,7 +39,13 @@ | |||
| 39 | <tr class="data"> | 39 | <tr class="data"> |
| 40 | <td><a href="{% url 'project' o.id %}">{{o.name}}</a></td> | 40 | <td><a href="{% url 'project' o.id %}">{{o.name}}</a></td> |
| 41 | <td class="updated"><a href="{% url 'project' o.id %}">{{o.updated|date:"d/m/y H:i"}}</a></td> | 41 | <td class="updated"><a href="{% url 'project' o.id %}">{{o.updated|date:"d/m/y H:i"}}</a></td> |
| 42 | <td><a href="{% url 'project' o.id %}#project-details">{{o.release.name}}</a></td> | 42 | <td> |
| 43 | {% if o.release %} | ||
| 44 | <a href="{% url 'project' o.id %}#project-details">{{o.release.name}}</a> | ||
| 45 | {% else %} | ||
| 46 | No release available | ||
| 47 | {% endif %} | ||
| 48 | </td> | ||
| 43 | <td><a href="{% url 'project' o.id %}#machine-distro">{{o.get_current_machine_name}}</a></td> | 49 | <td><a href="{% url 'project' o.id %}#machine-distro">{{o.get_current_machine_name}}</a></td> |
| 44 | {% if o.get_number_of_builds == 0 %} | 50 | {% if o.get_number_of_builds == 0 %} |
| 45 | <td class="muted">{{o.get_number_of_builds}}</td> | 51 | <td class="muted">{{o.get_number_of_builds}}</td> |
| @@ -52,13 +58,13 @@ | |||
| 52 | <td><a href="{% url 'projectbuilds' o.id %}">{{o.get_number_of_builds}}</a></td> | 58 | <td><a href="{% url 'projectbuilds' o.id %}">{{o.get_number_of_builds}}</a></td> |
| 53 | <td class="loutcome"><a href="{% url "builddashboard" o.get_last_build_id %}">{%if o.get_last_outcome == build_SUCCEEDED%}<i class="icon-ok-sign success"></i>{%elif o.get_last_outcome == build_FAILED%}<i class="icon-minus-sign error"></i>{%else%}{%endif%}</a></td> | 59 | <td class="loutcome"><a href="{% url "builddashboard" o.get_last_build_id %}">{%if o.get_last_outcome == build_SUCCEEDED%}<i class="icon-ok-sign success"></i>{%elif o.get_last_outcome == build_FAILED%}<i class="icon-minus-sign error"></i>{%else%}{%endif%}</a></td> |
| 54 | <td class="ltarget"><a href="{% url "builddashboard" o.get_last_build_id %}">{{o.get_last_target}} </a></td> | 60 | <td class="ltarget"><a href="{% url "builddashboard" o.get_last_build_id %}">{{o.get_last_target}} </a></td> |
| 55 | <td class="lerrors">{% if o.get_last_errors %}<a class="errors_no error" href="{% url "builddashboard" o.get_last_build_id %}#errors">{{o.get_last_errors}} error{{o.get_last_errors|pluralize}}</a>{%endif%}</td> | 61 | <td class="lerrors">{% if o.get_last_errors %}<a class="errors_no error" href="{% url "builddashboard" o.get_last_build_id %}#errors">{{o.get_last_errors}} error{{o.get_last_errors|pluralize}}</a>{%endif%}</td> |
| 56 | <td class="lwarnings">{% if o.get_last_warnings %}<a class="warnings_no warning" href="{% url "builddashboard" o.get_last_build_id %}#warnings">{{o.get_last_warnings}} warning{{o.get_last_warnings|pluralize}}</a>{%endif%}</td> | 62 | <td class="lwarnings">{% if o.get_last_warnings %}<a class="warnings_no warning" href="{% url "builddashboard" o.get_last_build_id %}#warnings">{{o.get_last_warnings}} warning{{o.get_last_warnings|pluralize}}</a>{%endif%}</td> |
| 57 | <td class="limagefiles"> | 63 | <td class="limagefiles"> |
| 58 | {% if o.get_last_outcome == build_SUCCEEDED %} | 64 | {% if o.get_last_outcome == build_SUCCEEDED %} |
| 59 | <a href="{%url "builddashboard" o.get_last_build_id %}#images">{{fstypes|get_dict_value:o.id}}</a> | 65 | <a href="{%url "builddashboard" o.get_last_build_id %}#images">{{fstypes|get_dict_value:o.id}}</a> |
| 60 | {% endif %} | 66 | {% endif %} |
| 61 | </td> | 67 | </td> |
| 62 | 68 | ||
| 63 | {% endif %} | 69 | {% endif %} |
| 64 | </tr> | 70 | </tr> |
