blob: e40c225a3a79ee0da4f58430a23ef129b24ae159 [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
9{% block nav-configuration %}
10 <li class="active"><a href="{% url 'configuration' build.pk %}">Configuration</a></li>
11{% endblock %}
12
13{% block buildinfomain %}
14<!-- page title -->
15<div class="row-fluid span10">
16 <div class="page-header">
17 <h1>
18 {% if request.GET.filter and objects.paginator.count > 0 or request.GET.search and objects.paginator.count > 0 %}
19 {{objects.paginator.count}} variable{{objects.paginator.count|pluralize}} found
20 {%elif request.GET.filter and objects.paginator.count == 0 or request.GET.search and objects.paginator.count == 0 %}
21 No variables found
22 {%else%}
23 Configuration
24 {%endif%}
25 </h1>
26 </div>
27</div>
28
29<!-- configuration table -->
30<div class="row-fluid pull-right span10" id="navTab">
31 <ul class="nav nav-pills">
32 <li class=""><a href="{% url 'configuration' build.id %}">Summary</a></li>
33 <li class="active"><a href="#" >BitBake variables</a></li>
34 </ul>
35
36 <!-- variables -->
37 <div id="variables" class="tab-pane">
38
39 {% if objects.paginator.count == 0 %}
40 <div class="row-fluid">
41 <div class="alert">
42 <form class="no-results input-append" id="searchform">
43 <input id="search" name="search" class="input-xxlarge" type="text" value="{% if request.GET.search %}{{request.GET.search}}{% endif %}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %}
44 <button class="btn" type="submit" value="Search">Search</button>
45 <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all variables</button>
46 </form>
47 </div>
48 </div>
49
50 {% else %}
51 {% include "basetable_top.html" %}
52
53 {% for variable in objects %}
54 <tr class="data">
55 <td class="variable_name"><a data-toggle="modal" href="#variable-{{variable.pk}}">{{variable.variable_name}}</a></td>
56 <td class="variable_value"><a data-toggle="modal" href="#variable-{{variable.pk}}">{{variable.variable_value|truncatechars:153}}</a></td>
57 <td class="file"><a data-toggle="modal" href="#variable-{{variable.pk}}">
58 {% if variable.vhistory.all %}
59 {% for path in variable.vhistory.all|filter_setin_files:file_filter %}
60 {{path}}<br/>
61 {% endfor %}
62 {% endif %}
63 </a></td>
64 <td class="description">
65 {% if variable.description %}
66 {{variable.description}}
67 <a href="http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-{{variable.variable_name|variable_parent_name}}" target="_blank">
68 <i class="icon-share get-info"></i></a>
69 {% endif %}
70 </td>
71 </tr>
72{% endfor %}
73
74{% include "basetable_bottom.html" %}
75{% endif %}
76</div> <!-- endvariables -->
77
78<!-- file list popups -->
79{% for variable in objects %}
80 {% if variable.vhistory.count %}
81 <div id="variable-{{variable.pk}}" class="modal hide fade" tabindex="-1" role="dialog">
82 <div class="modal-header">
83 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
84 <h3>History of {{variable.variable_name}}</h3>
85 </div>
86 <div class="modal-body">
87 {% if variable.variable_value %}
88 {% if variable.variable_value|length < 570 %}
89 <h4>{{variable.variable_name}} value is:</h4>
90 <p>
91 {{variable.variable_value}}
92 </p>
93 {% else %}
94 <h4>{{variable.variable_name}} value is:</h4>
95 <p>
96 <span>{{variable.variable_value|string_slice:':570'}}
97 <span class="full"> {{variable.variable_value|string_slice:'570:'}}
98 </span>
99 <a class="btn btn-mini full-show">...</a>
100 </span>
101 </p>
102 <a class="btn btn-mini full-hide">Collapse variable value <i class="icon-caret-up"></i>
103 </a>
104 {% endif %}
105 {% else %}
106 <div class="alert alert-info">The value of <strong>{{variable.variable_name}}</strong> is an empty string</div>
107 {% endif %}
108 <h4>The value was set in the following configuration files:</h4>
109 <table class="table table-bordered table-hover">
110 <thead>
111 <tr>
112 <th>Order</th>
113 <th>Configuration file</th>
114 <th>Operation</th>
115 <th>Line number</th>
116 </tr>
117 </thead>
118 <tbody>
119 {% for vh in variable.vhistory.all %}
120 <tr>
121 <td>{{forloop.counter}}</td><td>{{vh.file_name}}</td><td>{{vh.operation}}</td><td>{{vh.line_number}}</td>
122 </tr>
123 {%endfor%}
124 </tbody>
125 </table>
126 </div>
127 </div>
128 {% endif %}
129{% endfor %}
130
131</div> <!-- buildinfomain -->
132
133{% endblock %}