diff options
-rw-r--r-- | bitbake/lib/toaster/toastergui/templates/mrb_section.html | 247 |
1 files changed, 123 insertions, 124 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/mrb_section.html b/bitbake/lib/toaster/toastergui/templates/mrb_section.html index 4b4e3e691b..b164269a13 100644 --- a/bitbake/lib/toaster/toastergui/templates/mrb_section.html +++ b/bitbake/lib/toaster/toastergui/templates/mrb_section.html | |||
@@ -3,6 +3,7 @@ | |||
3 | {% load project_url_tag %} | 3 | {% load project_url_tag %} |
4 | {% load humanize %} | 4 | {% load humanize %} |
5 | <script src="{% static 'js/mrbsection.js' %}"></script> | 5 | <script src="{% static 'js/mrbsection.js' %}"></script> |
6 | |||
6 | <script> | 7 | <script> |
7 | $(document).ready(function () { | 8 | $(document).ready(function () { |
8 | var ctx = { | 9 | var ctx = { |
@@ -18,165 +19,163 @@ | |||
18 | }); | 19 | }); |
19 | </script> | 20 | </script> |
20 | 21 | ||
21 | {%if mru %} | 22 | {% if mru %} |
22 | 23 | ||
23 | {%if mrb_type == 'project' %} | 24 | {% if mrb_type == 'project' %} |
24 | <h2> | 25 | <h2> |
25 | Latest project builds | 26 | Latest project builds |
26 | 27 | ||
27 | {% if project.is_default %} | 28 | {% if project.is_default %} |
28 | <span class="glyphicon glyphicon-question-sign get-help heading-help" title="" data-original-title="Builds in this project cannot be started from Toaster: they are started from the command line"></span> | 29 | <span class="glyphicon glyphicon-question-sign get-help heading-help" data-original-title="Builds in this project cannot be started from Toaster: they are started from the command line"></span> |
29 | {% endif %} | 30 | {% endif %} |
30 | </h2> | 31 | </h2> |
31 | {% else %} | 32 | {% else %} |
32 | <div class="page-header"> | 33 | <div class="page-header"> |
33 | <h1> | 34 | <h1>Latest builds</h1> |
34 | Latest builds | ||
35 | </h1> | ||
36 | </div> | 35 | </div> |
37 | {% endif %} | 36 | {% endif %} |
37 | |||
38 | <div id="latest-builds"> | 38 | <div id="latest-builds"> |
39 | {% for build in mru %} | 39 | {% for build in mru %} |
40 | <div data-latest-build-result="{{ build.id }}" class="alert build-result {%if build.outcome == build.SUCCEEDED%}alert-success{%elif build.outcome == build.FAILED%}alert-danger{%else%}alert-info{%endif%}"> | 40 | <div data-latest-build-result="{{build.id}}" class="alert build-result {% if build.outcome == build.SUCCEEDED %}alert-success{% elif build.outcome == build.FAILED %}alert-danger{% else %}alert-info{% endif %}"> |
41 | {% if mrb_type != 'project' %} | 41 | {% if mrb_type != 'project' %} |
42 | <div class="row project-name"> | 42 | <div class="row project-name"> |
43 | <div class="col-md-12"> | 43 | <div class="col-md-12"> |
44 | <small> | 44 | <small> |
45 | <a class="alert-link text-uppercase" href={% project_url build.project %}>{{build.project.name}}</a> | 45 | <a class="alert-link text-uppercase" href={% project_url build.project %}>{{build.project.name}}</a> |
46 | </small> | 46 | </small> |
47 | </div> | ||
47 | </div> | 48 | </div> |
48 | </div> | ||
49 | {% endif %} | 49 | {% endif %} |
50 | |||
50 | <div class="row"> | 51 | <div class="row"> |
51 | <div class="col-md-3"> | 52 | <div class="col-md-3"> |
52 | {%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %} | 53 | {% if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %} |
53 | <a href="{%url 'builddashboard' build.pk%}" class="alert-link"> | 54 | <a href="{% url 'builddashboard' build.pk %}" class="alert-link"> |
54 | {% endif %} | 55 | {% endif %} |
56 | |||
55 | {% if build.target_set.all.count > 0 %} | 57 | {% if build.target_set.all.count > 0 %} |
56 | <span data-toggle="tooltip" | 58 | <span data-toggle="tooltip" |
57 | {% if build.target_set.all.count > 1 %} | 59 | {% if build.target_set.all.count > 1 %} |
58 | {{build.get_sorted_target_list.0.target}} | 60 | {{build.get_sorted_target_list.0.target}} |
59 | title="Recipes: | 61 | title="Recipes: |
60 | {% for target in build.get_sorted_target_list %} | 62 | {% for target in build.get_sorted_target_list %} |
61 | {% if target.task %} | 63 | {% if target.task %} |
62 | {{target.target}}:{{target.task}} | 64 | {{target.target}}:{{target.task}} |
63 | {% else %} | 65 | {% else %} |
64 | {{target.target}} | 66 | {{target.target}} |
65 | {% endif %} | 67 | {% endif %} |
66 | {% endfor %}" | 68 | {% endfor %}" |
67 | {% endif %} | 69 | {% endif %} |
68 | > | 70 | > |
69 | {% if build.target_set.all.0.task %} | 71 | {% if build.target_set.all.0.task %} |
70 | {{build.get_sorted_target_list.0.target}}:{{build.target_set.all.0.task}} | 72 | {{build.get_sorted_target_list.0.target}}:{{build.target_set.all.0.task}} |
71 | {% else %} | 73 | {% else %} |
72 | {{build.get_sorted_target_list.0.target}} | 74 | {{build.get_sorted_target_list.0.target}} |
73 | {% endif %} | 75 | {% endif %} |
76 | |||
74 | {% if build.target_set.all.count > 1 %} | 77 | {% if build.target_set.all.count > 1 %} |
75 | (+{{build.target_set.all.count|add:"-1"}}) | 78 | (+{{build.target_set.all.count|add:"-1"}}) |
76 | {% endif %} | 79 | {% endif %} |
77 | </span> | 80 | </span> |
78 | {% endif %} | 81 | {% endif %} |
79 | {%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %} | 82 | {% if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %} |
80 | </a> | 83 | </a> |
81 | {% endif %} | 84 | {% endif %} |
82 | </div> | 85 | </div> |
83 | {% if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %} | 86 | |
87 | {% if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %} | ||
84 | <div class="col-md-2"> | 88 | <div class="col-md-2"> |
85 | {% if build.completed_on|format_build_date %} | 89 | {% if build.completed_on|format_build_date %} |
86 | {{ build.completed_on|date:'d/m/y H:i' }} | 90 | {{build.completed_on|date:'d/m/y H:i'}} |
87 | {% else %} | 91 | {% else %} |
88 | {{ build.completed_on|date:'H:i' }} | 92 | {{ build.completed_on|date:'H:i' }} |
89 | {% endif %} | 93 | {% endif %} |
90 | </div> | 94 | </div> |
91 | {% endif %} | 95 | {% endif %} |
92 | {%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %} | 96 | |
97 | {% if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %} | ||
93 | <div class="col-md-2"> | 98 | <div class="col-md-2"> |
94 | {% if build.errors.count %} | 99 | {% if build.errors.count %} |
95 | <span class="glyphicon glyphicon-minus-sign"></span> | 100 | <span class="glyphicon glyphicon-minus-sign"></span> |
96 | <a href="{%url 'builddashboard' build.pk%}#errors" class="alert-link">{{build.errors.count}} error{{build.errors.count|pluralize}}</a> | 101 | <a href="{%url 'builddashboard' build.pk%}#errors" class="alert-link"> |
97 | {% endif %} | 102 | {{build.errors.count}} error{{build.errors.count|pluralize}} |
103 | </a> | ||
104 | {% endif %} | ||
98 | </div> | 105 | </div> |
106 | |||
99 | <div class="col-md-2"> | 107 | <div class="col-md-2"> |
100 | {% if build.warnings.count %} | 108 | {% if build.warnings.count %} |
101 | <span class="glyphicon glyphicon-warning-sign build-warnings"></span> | 109 | <span class="glyphicon glyphicon-warning-sign build-warnings"></span> |
102 | <a href="{%url 'builddashboard' build.pk%}#warnings" class="alert-link build-warnings">{{build.warnings.count}} warning{{build.warnings.count|pluralize}}</a> | 110 | <a href="{%url 'builddashboard' build.pk%}#warnings" class="alert-link build-warnings"> |
103 | {% endif %} | 111 | {{build.warnings.count}} warning{{build.warnings.count|pluralize}} |
112 | </a> | ||
113 | {% endif %} | ||
104 | </div> | 114 | </div> |
115 | |||
105 | <div class="col-md-3"> | 116 | <div class="col-md-3"> |
106 | Build time: <a class="alert-link" href="{% url 'buildtime' build.pk %}">{{ build.timespent_seconds|sectohms }} | 117 | Build time: <a class="alert-link" href="{% url 'buildtime' build.pk %}">{{ build.timespent_seconds|sectohms }} |
107 | </a> | 118 | </a> |
119 | |||
108 | {% if build.project.is_default %} | 120 | {% if build.project.is_default %} |
109 | <span class="pull-right glyphicon glyphicon-question-sign get-help | 121 | <span class="pull-right glyphicon glyphicon-question-sign get-help {% if build.outcome == build.SUCCEEDED %}get-help-green{% elif build.outcome == build.FAILED %}get-help-red{% else %}get-help-blue{% endif %}" |
110 | {% if build.outcome == build.SUCCEEDED %} | 122 | title="Builds in this project cannot be started from Toaster: they are started from the command line"> |
111 | get-help-green | 123 | </span> |
112 | {% elif build.outcome == build.FAILED %} | ||
113 | get-help-red | ||
114 | {% else %} | ||
115 | get-help-blue | ||
116 | {% endif %} | ||
117 | " title="Builds in this project cannot be started from Toaster: they are started from the command line"> | ||
118 | </span> | ||
119 | {% else %} | 124 | {% else %} |
120 | <a href="#" class="run-again-btn alert-link | 125 | <a href="#" class="run-again-btn alert-link {% if build.outcome == build.SUCCEEDED %}success{% elif build.outcome == build.FAILED %}danger{% else %}info{% endif %} pull-right" |
121 | {% if build.outcome == build.SUCCEEDED %} | 126 | data-request-url="{% url 'xhr_buildrequest' build.project.pk %}" |
122 | success | 127 | data-target='{{build.target_set.all|get_tasks|json}}'> |
123 | {% elif build.outcome == build.FAILED %} | 128 | <span class="glyphicon glyphicon-repeat"></span> |
124 | danger | 129 | Rebuild |
125 | {% else %} | 130 | </a> |
126 | info | ||
127 | {%endif%} | ||
128 | pull-right" | ||
129 | data-request-url="{% url 'xhr_buildrequest' build.project.pk %}" | ||
130 | data-target='{{build.target_set.all|get_tasks|json}}'> | ||
131 | <span class="glyphicon glyphicon-repeat"></span> | ||
132 | Rebuild | ||
133 | </a> | ||
134 | {% endif %} | 131 | {% endif %} |
135 | </div> | 132 | </div> |
136 | {%endif%} | 133 | {% endif %} |
137 | 134 | ||
138 | {%if build.outcome == build.IN_PROGRESS %} | 135 | {% if build.outcome == build.IN_PROGRESS %} |
139 | <div class="col-md-4" style="display:none" id="cancelling-msg-{{build.buildrequest.pk}}"> | 136 | <div class="col-md-4" style="display:none" id="cancelling-msg-{{build.buildrequest.pk}}"> |
140 | Cancelling the build ... | 137 | Cancelling the build ... |
141 | </div> | 138 | </div> |
142 | <div class="col-md-4 col-md-offset-1 progress-info"> | ||
143 | <div class="progress" id="build-pc-done-title-{{build.pk}}"> | ||
144 | <div id="build-pc-done-bar-{{build.pk}}" style="width: {{build.completeper}}%;" class="progress-bar"></div> | ||
145 | </div> | ||
146 | </div> | ||
147 | <div class="col-md-4 progress-info"><span id="build-pc-done-{{build.pk}}">{{build.completeper}}</span>% of tasks complete | ||
148 | {# No build cancel for command line builds project #} | ||
149 | {% if build.project.is_default %} | ||
150 | <span class="glyphicon glyphicon-question-sign get-help get-help-blue pull-right" title="Builds in this project cannot be cancelled from Toaster: they can only be cancelled from the command line"></span> | ||
151 | {% else %} | ||
152 | <a href="#" class="cancel-build-btn pull-right alert-link" | ||
153 | data-buildrequest-id={{build.buildrequest.pk}} | ||
154 | data-request-url="{% url 'xhr_buildrequest' build.project.pk %}" > | ||
155 | <span class="glyphicon glyphicon-remove-circle"></span> | ||
156 | Cancel | ||
157 | </a> | ||
158 | </div> | ||
159 | {% endif %} | ||
160 | 139 | ||
161 | {%endif%} {# end if in progress #} | 140 | <div class="col-md-4 col-md-offset-1 progress-info"> |
141 | <div class="progress" id="build-pc-done-title-{{build.pk}}"> | ||
142 | <div id="build-pc-done-bar-{{build.pk}}" style="width: {{build.completeper}}%;" class="progress-bar"> | ||
143 | </div> | ||
144 | </div> | ||
145 | </div> | ||
162 | 146 | ||
163 | {% if build.outcome == build.CANCELLED %} | 147 | <div class="col-md-4 progress-info"> |
164 | <div class="col-md-6"> | 148 | <span id="build-pc-done-{{build.pk}}">{{build.completeper}}</span>% of tasks complete |
165 | Build cancelled | 149 | {# No build cancel for command line builds project #} |
166 | </div> | 150 | {% if build.project.is_default %} |
167 | <div class="col-md-3"> | 151 | <span class="glyphicon glyphicon-question-sign get-help get-help-blue pull-right" title="Builds in this project cannot be cancelled from Toaster: they can only be cancelled from the command line"></span> |
168 | <a href="#" class="info pull-right run-again-btn alert-link" | 152 | {% else %} |
169 | data-request-url="{% url 'xhr_buildrequest' build.project.pk %}" | 153 | <a href="#" class="cancel-build-btn pull-right alert-link" |
170 | data-target='{{build.target_set.all|get_tasks|json}}'> | 154 | data-buildrequest-id={{build.buildrequest.pk}} |
171 | <span class="glyphicon glyphicon-repeat"></span> | 155 | data-request-url="{% url 'xhr_buildrequest' build.project.pk %}"> |
172 | Rebuild | 156 | <span class="glyphicon glyphicon-remove-circle"></span> |
173 | </a> | 157 | Cancel |
174 | </div> | 158 | </a> |
175 | {% endif %} | 159 | {% endif %} |
176 | </div> | 160 | </div> |
177 | </div> | 161 | {% endif %} {# end if in progress #} |
178 | {% endfor %} | ||
179 | </div> | ||
180 | 162 | ||
181 | {%endif%} | 163 | {% if build.outcome == build.CANCELLED %} |
164 | <div class="col-md-6"> | ||
165 | Build cancelled | ||
166 | </div> | ||
182 | 167 | ||
168 | <div class="col-md-3"> | ||
169 | <a href="#" class="info pull-right run-again-btn alert-link" | ||
170 | data-request-url="{% url 'xhr_buildrequest' build.project.pk %}" | ||
171 | data-target='{{build.target_set.all|get_tasks|json}}'> | ||
172 | <span class="glyphicon glyphicon-repeat"></span> | ||
173 | Rebuild | ||
174 | </a> | ||
175 | </div> | ||
176 | {% endif %} | ||
177 | </div> | ||
178 | </div> | ||
179 | {% endfor %} | ||
180 | </div> | ||
181 | {% endif %} \ No newline at end of file | ||