configvars.html 5.2 KB

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