blob: 33fef9316d70f2b69b7cbdc154a8ec211ef057af [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001{% extends "basebuildpage.html" %}
2{% load projecttags %}
3
Patrick Williamsf1e5d692016-03-30 15:21:19 -05004{% block title %} BitBake variables - {{build.target_set.all|dictsort:"target"|join:", "}} {{build.machine}} - {{build.project.name}} - Toaster {% endblock %}
Patrick Williamsc124f4f2015-09-15 14:41:29 -05005{% block localbreadcrumb %}
6<li>Configuration</li>
7{% endblock %}
8
Patrick Williamsc124f4f2015-09-15 14:41:29 -05009{% block buildinfomain %}
10<!-- page title -->
Patrick Williamsc0f7c042017-02-23 20:41:17 -060011<div class="col-md-10">
12 <div class="page-header build-data">
Patrick Williamsc124f4f2015-09-15 14:41:29 -050013 <h1>
14 {% if request.GET.filter and objects.paginator.count > 0 or request.GET.search and objects.paginator.count > 0 %}
15 {{objects.paginator.count}} variable{{objects.paginator.count|pluralize}} found
16 {%elif request.GET.filter and objects.paginator.count == 0 or request.GET.search and objects.paginator.count == 0 %}
17 No variables found
18 {%else%}
19 Configuration
20 {%endif%}
21 </h1>
22 </div>
Patrick Williamsc124f4f2015-09-15 14:41:29 -050023
24<!-- configuration table -->
Patrick Williamsc0f7c042017-02-23 20:41:17 -060025<div id="navTab">
26 <ul class="nav nav-tabs">
Patrick Williamsc124f4f2015-09-15 14:41:29 -050027 <li class=""><a href="{% url 'configuration' build.id %}">Summary</a></li>
28 <li class="active"><a href="#" >BitBake variables</a></li>
29 </ul>
30
31 <!-- variables -->
32 <div id="variables" class="tab-pane">
33
34 {% if objects.paginator.count == 0 %}
Patrick Williamsc0f7c042017-02-23 20:41:17 -060035 <div class="alert alert-warning">
36 <form class="no-results form-inline" id="searchform">
37 <div class="form-group">
38 <div class="btn-group">
39 <input class="form-control" id="search" name="search" type="text" value="{% if request.GET.search %}{{request.GET.search}}{% endif %}"/>
40 {% if request.GET.search %}
41 <a href="javascript:$('#search').val('');searchform.submit()" tabindex="-1">
42 <span class="remove-search-btn-variables glyphicon glyphicon-remove-circle"></span>
43 </a>
44 {% endif %}
45 </div>
Patrick Williamsc124f4f2015-09-15 14:41:29 -050046 </div>
Patrick Williamsc0f7c042017-02-23 20:41:17 -060047 <button class="btn btn-default" type="submit" value="Search">Search</button>
48 <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all variables</button>
49 </form>
Patrick Williamsc124f4f2015-09-15 14:41:29 -050050 </div>
51
52 {% else %}
53 {% include "basetable_top.html" %}
54
55 {% for variable in objects %}
56 <tr class="data">
57 <td class="variable_name"><a data-toggle="modal" href="#variable-{{variable.pk}}">{{variable.variable_name}}</a></td>
Patrick Williamsc0f7c042017-02-23 20:41:17 -060058 <td class="variable_value">{{variable.variable_value|truncatechars:153}}</td>
59 <td class="file">
Patrick Williamsc124f4f2015-09-15 14:41:29 -050060 {% if variable.vhistory.all %}
61 {% for path in variable.vhistory.all|filter_setin_files:file_filter %}
62 {{path}}<br/>
63 {% endfor %}
64 {% endif %}
Patrick Williamsc0f7c042017-02-23 20:41:17 -060065 </td>
Patrick Williamsc124f4f2015-09-15 14:41:29 -050066 <td class="description">
67 {% if variable.description %}
68 {{variable.description}}
Andrew Geissler4c19ea12020-10-27 13:52:24 -050069 <a href="https://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-{{variable.variable_name|variable_parent_name}}" target="_blank">
Patrick Williamsc0f7c042017-02-23 20:41:17 -060070 <span class="glyphicon glyphicon-new-window get-info"></span></a>
Patrick Williamsc124f4f2015-09-15 14:41:29 -050071 {% endif %}
72 </td>
73 </tr>
74{% endfor %}
Patrick Williamsc0f7c042017-02-23 20:41:17 -060075</tbody>
76</table>
77</div> <!-- table-responsive -->
Patrick Williamsc124f4f2015-09-15 14:41:29 -050078{% include "basetable_bottom.html" %}
79{% endif %}
80</div> <!-- endvariables -->
81
82<!-- file list popups -->
83{% for variable in objects %}
Patrick Williamsc0f7c042017-02-23 20:41:17 -060084{% if variable.vhistory.count %}
85<div id="variable-{{variable.pk}}" class="modal fade" tabindex="-1" role="dialog">
86 <div class="modal-dialog">
87 <div class="modal-content">
88 <div class="modal-header">
89 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
90 <h3>History of {{variable.variable_name}}</h3>
91 </div>
92 <div class="modal-body">
93 {% if variable.variable_value %}
94 {% if variable.variable_value|length < 570 %}
95 <h4>{{variable.variable_name}} value is:</h4>
96 <p>
97 {{variable.variable_value}}
98 </p>
99 {% else %}
100 <h4>{{variable.variable_name}} value is:</h4>
101 <p>
102 <span>{{variable.variable_value|string_slice:':570'}}
103 <span class="full"> {{variable.variable_value|string_slice:'570:'}}
104 </span>
105 <a href="#" class="full-show">...</a>
106 </span>
107 </p>
108 <a href="#" class="full-hide">Collapse variable value <i class="icon-caret-up"></i>
109 </a>
110 {% endif %}
111 {% else %}
112 <div class="alert alert-info">The value of <strong>{{variable.variable_name}}</strong> is an empty string</div>
113 {% endif %}
114 <h4>The value was set in the following configuration files:</h4>
115 <div class="table-responsive">
116 <table class="table table-bordered table-hover">
117 <thead>
118 <tr>
119 <th>Order</th>
120 <th>Configuration file</th>
121 <th>Operation</th>
122 <th>Line</th>
123 </tr>
124 </thead>
125 <tbody>
126 {% for vh in variable.vhistory.all %}
127 <tr>
128 <td>{{forloop.counter}}</td><td class="file">{{vh.file_name}}</td><td>{{vh.operation}}</td><td>{{vh.line_number}}</td>
129 </tr>
130 {%endfor%}
131 </tbody>
132 </table>
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500133 </div>
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600134 </div>
135 </div><!-- /.modal-content -->
136 </div><!-- /.modal-dialog -->
137</div><!-- /.modal -->
138{% endif %}
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500139{% endfor %}
140
141</div> <!-- buildinfomain -->
142
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600143</div> <!-- end 10-column section -->
144
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500145{% endblock %}