1{% extends "basebuildpage.html" %}
2{% load projecttags %}
3
4{% block title %} BitBake variables - {{build.target_set.all|dictsort:"target"|join:", "}} {{build.machine}} - {{build.project.name}} - Toaster {% endblock %}
5{% block localbreadcrumb %}
6<li>Configuration</li>
7{% endblock %}
8
9{% block buildinfomain %}
10<!-- page title -->
11<div class="col-md-10">
12 <div class="page-header build-data">
13 <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>
23
24<!-- configuration table -->
25<div id="navTab">
26  <ul class="nav nav-tabs">
27    <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 %}
35  <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>
46      </div>
47      <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>
50  </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>
58        <td class="variable_value">{{variable.variable_value|truncatechars:153}}</td>
59        <td class="file">
60            {% if variable.vhistory.all %}
61                {% for path in variable.vhistory.all|filter_setin_files:file_filter %}
62                    {{path}}<br/>
63                {% endfor %}
64            {% endif %}
65        </td>
66        <td class="description">
67            {% if variable.description %}
68                {{variable.description}}
69                <a href="http://docs.yoctoproject.org/ref-manual/variables.html#term-{{variable.variable_name|variable_parent_name}}" target="_blank">
70                <span class="glyphicon glyphicon-new-window get-info"></span></a>
71            {% endif %}
72        </td>
73    </tr>
74{% endfor %}
75</tbody>
76</table>
77</div> <!-- table-responsive -->
78{% include "basetable_bottom.html" %}
79{% endif %}
80</div> <!-- endvariables -->
81
82<!-- file list popups -->
83{% for variable in objects %}
84{% 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>
133        </div>
134      </div>
135    </div><!-- /.modal-content -->
136  </div><!-- /.modal-dialog -->
137</div><!-- /.modal -->
138{% endif %}
139{% endfor %}
140
141</div> <!-- buildinfomain -->
142
143</div> <!-- end 10-column section -->
144
145{% endblock %}
146