Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | {% extends "basebuildpage.html" %} |
| 2 | {% load projecttags %} |
| 3 | |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 4 | {% block title %} BitBake variables - {{build.target_set.all|dictsort:"target"|join:", "}} {{build.machine}} - {{build.project.name}} - Toaster {% endblock %} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 5 | {% block localbreadcrumb %} |
| 6 | <li>Configuration</li> |
| 7 | {% endblock %} |
| 8 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 9 | {% block buildinfomain %} |
| 10 | <!-- page title --> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 11 | <div class="col-md-10"> |
| 12 | <div class="page-header build-data"> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 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> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 23 | |
| 24 | <!-- configuration table --> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 25 | <div id="navTab"> |
| 26 | <ul class="nav nav-tabs"> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 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 %} |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 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> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 46 | </div> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 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> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 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> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 58 | <td class="variable_value">{{variable.variable_value|truncatechars:153}}</td> |
| 59 | <td class="file"> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 60 | {% if variable.vhistory.all %} |
| 61 | {% for path in variable.vhistory.all|filter_setin_files:file_filter %} |
| 62 | {{path}}<br/> |
| 63 | {% endfor %} |
| 64 | {% endif %} |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 65 | </td> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 66 | <td class="description"> |
| 67 | {% if variable.description %} |
| 68 | {{variable.description}} |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 69 | <a href="https://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-{{variable.variable_name|variable_parent_name}}" target="_blank"> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 70 | <span class="glyphicon glyphicon-new-window get-info"></span></a> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 71 | {% endif %} |
| 72 | </td> |
| 73 | </tr> |
| 74 | {% endfor %} |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 75 | </tbody> |
| 76 | </table> |
| 77 | </div> <!-- table-responsive --> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 78 | {% include "basetable_bottom.html" %} |
| 79 | {% endif %} |
| 80 | </div> <!-- endvariables --> |
| 81 | |
| 82 | <!-- file list popups --> |
| 83 | {% for variable in objects %} |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 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> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 133 | </div> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 134 | </div> |
| 135 | </div><!-- /.modal-content --> |
| 136 | </div><!-- /.modal-dialog --> |
| 137 | </div><!-- /.modal --> |
| 138 | {% endif %} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 139 | {% endfor %} |
| 140 | |
| 141 | </div> <!-- buildinfomain --> |
| 142 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 143 | </div> <!-- end 10-column section --> |
| 144 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 145 | {% endblock %} |