summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/templates
diff options
context:
space:
mode:
authorDavid Reyna <David.Reyna@windriver.com>2014-02-28 05:55:46 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-09 12:24:01 -0700
commit4717749fd651e6983a31e3cefe3f210d2646ca87 (patch)
tree5ba0090617b97f5d49b5c78ee84563a0cab6b7f5 /bitbake/lib/toaster/toastergui/templates
parent31d4bf8484ee42690386c6b7a6bd6c7a2be54464 (diff)
downloadast2050-yocto-poky-4717749fd651e6983a31e3cefe3f210d2646ca87.zip
ast2050-yocto-poky-4717749fd651e6983a31e3cefe3f210d2646ca87.tar.gz
bitbake: toaster: implement the configuration pagedreyna/configure-detail-view
Update the configuration page with the file list pop-up, implement the file and description filters. [YOCTO #4259] (Bitbake rev: 54a767809960b66b2fe2d3bc46aa9c7e040c4ae3) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates')
-rw-r--r--bitbake/lib/toaster/toastergui/templates/base.html53
-rw-r--r--bitbake/lib/toaster/toastergui/templates/configuration.html32
-rw-r--r--bitbake/lib/toaster/toastergui/templates/configvars.html98
3 files changed, 160 insertions, 23 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/base.html b/bitbake/lib/toaster/toastergui/templates/base.html
index 8d4771c..96f093f 100644
--- a/bitbake/lib/toaster/toastergui/templates/base.html
+++ b/bitbake/lib/toaster/toastergui/templates/base.html
@@ -48,6 +48,59 @@ function reload_params(params) {
}
</script>
+
+<script>
+ $(document).ready(function() {
+ //show or hide selected columns on load
+ $("input:checkbox").each(function(){
+ var selectedType = $(this).val();
+ if($(this).is(":checked")){
+ $("."+selectedType).show();
+ }
+ else{
+ $("."+selectedType).hide();
+ }
+ });
+ //edit columns functionality (show / hide table columns)
+ $("input:checkbox").change();
+ $("input:checkbox").change(function(){
+ var selectedType = $(this).val();
+ if($(this).is(":checked")){
+ $("."+selectedType).show();
+ }
+ else{
+ $("."+selectedType).hide();
+ }
+ });
+ //turn edit columns dropdown into a multi-select menu
+ $('.dropdown-menu input, .dropdown-menu label').click(function(e) {
+ e.stopPropagation();
+ });
+ //show help information inside modal dialogs
+ $("#filter-variables i").tooltip({ html: true, delay: {show: 500} });
+ //show applied filter tooltip
+ $('.filtered').tooltip({container:'body', placement:'bottom', delay:{hide:1500}, html:true});
+ //hide the applied filter tooltip when you click the filter button
+ $('.btn-primary').on('click', function () {
+ $('.tooltip').hide();
+ });
+
+ $('.full-variable, .full-variable-hide').hide();
+ $('.full-variable-show').click(function(){
+ $('.full-variable').slideDown(function(){
+ $('.full-variable-hide').show();
+ });
+ $(this).hide();
+ });
+ $('.full-variable-hide').click(function(){
+ $(this).hide();
+ $('.full-variable').slideUp(function(){
+ $('.full-variable-show').show();
+ });
+ });
+ });
+</script>
+
</head>
<body style="height: 100%">
diff --git a/bitbake/lib/toaster/toastergui/templates/configuration.html b/bitbake/lib/toaster/toastergui/templates/configuration.html
index 467fbd0..ddfa5af 100644
--- a/bitbake/lib/toaster/toastergui/templates/configuration.html
+++ b/bitbake/lib/toaster/toastergui/templates/configuration.html
@@ -3,6 +3,8 @@
<li>Configuration</li>
{% endblock %}
+{% load projecttags %}
+
{% block buildinfomain %}
<!-- page title -->
<div class="row-fluid span10">
@@ -22,15 +24,19 @@
<div id="summary" class="tab-pane active">
<h3>Build configuration</h3>
<dl class="dl-horizontal">
- <dt>BitBake version</dt><dd>1.19.1</dd>
- <dt>Build system</dt><dd>x86_64-linux</dd>
- <dt>Host distribution</dt><dd>Ubuntu-12.04</dd>
- <dt>Target system</dt><dd>i586-poky-linux</dd>
- <dt><i class="icon-question-sign get-help" data-toggle="tooltip" title="Specifies the target device for which the image is built"></i> Machine</dt><dd>atom-pc</dd>
- <dt><i class="icon-question-sign get-help" data-toggle="tooltip" title="The short name of the distribution"></i> Distro</dt><dd>poky</dd>
- <dt>Distro version</dt><dd>1.4+snapshot-20130718</dd>
- <dt>Tune features</dt><dd>m32 i586</dd>
- <dt>Target(s)</dt><dd>core-image-sato</dd>
+ {%if BB_VERSION %}<dt>BitBake version</dt><dd>{{BB_VERSION}}</dd> {% endif %}
+ {%if BUILD_SYS %}<dt>Build system</dt><dd>{{BUILD_SYS}}</dd> {% endif %}
+ {%if NATIVELSBSTRING %}<dt>Host distribution</dt><dd>{{NATIVELSBSTRING}}</dd> {% endif %}
+ {%if TARGET_SYS %}<dt>Target system</dt><dd>{{TARGET_SYS}}</dd> {% endif %}
+ {%if MACHINE %}<dt>Machine</dt><dd>{{MACHINE}}</dd> {% endif %}
+ {%if DISTRO %}<dt>Distro</dt><dd>{{DISTRO}}</dd> {% endif %}
+ {%if DISTRO_VERSION %}<dt>Distro version</dt><dd>{{DISTRO_VERSION}}</dd> {% endif %}
+ {%if TUNE_FEATURES %}<dt>Tune features</dt><dd>{{TUNE_FEATURES}}</dd> {% endif %}
+ {%if TARGET_FPU %}<dt>Target FPU</dt><dd>{{TARGET_FPU}}</dd> {% endif %}
+ {%if targets.all %}<dt>Target(s)</dt>
+ <dd> <ul> {% for target in targets.all %}
+ <li>{{target.target}}{%if forloop.counter > 1 %}<br>{% endif %}</li>
+ {% endfor %} </ul> </dd> {% endif %}
</dl>
<h3>Layers</h3>
<div class="span9" style="margin-left:0px;">
@@ -45,7 +51,13 @@
</thead>
<tbody>{% for lv in build.layer_version_build.all %}
<tr>
- <td>{{lv.layer.name}}<a href="{{lv.layer.layer_index_url}}" target="_blank">&nbsp;<i class="icon-share get-info"></i></a></td><td>{{lv.branch}}</td><td class="layer_commit"><a data-content="{{lv.commit}}" title="" href="#" class="btn" data-original-title="">{{lv.commit|slice:":8"}}...</a></td><td>{{lv.layer.local_path}}</td>
+ <td>{{lv.layer.name}}</td>
+ <td>{{lv.branch}}</td>
+ <td> <a class="btn" data-content="<ul class='unstyled'>
+ <li>{{lv.commit}}</li> </ul>">
+ {{lv.commit|truncatechars:13}}
+ </a></td>
+ <td>{{lv.layer.local_path}}</td>
</tr>{% endfor %}
</tbody>
</table>
diff --git a/bitbake/lib/toaster/toastergui/templates/configvars.html b/bitbake/lib/toaster/toastergui/templates/configvars.html
index ae45119..cd41cca 100644
--- a/bitbake/lib/toaster/toastergui/templates/configvars.html
+++ b/bitbake/lib/toaster/toastergui/templates/configvars.html
@@ -3,38 +3,110 @@
<li>Configuration</li>
{% endblock %}
+{% load projecttags %}
+
{% block buildinfomain %}
<!-- page title -->
<div class="row-fluid span10">
<div class="page-header">
- <h1>Configuration</h1>
+ <h1>
+ {% if request.GET.filter or request.GET.search and objects.count > 0 %}
+ {{objects.paginator.count}} variable{{objects.paginator.count|pluralize}} found
+ {%elif objects.paginator.count == 0%}
+ No variables
+ {%else%}
+ Configuration
+ {%endif%}
+ </h1>
</div>
</div>
<!-- configuration table -->
<div class="row-fluid pull-right span10" id="navTab">
-<ul class="nav nav-pills">
+ <ul class="nav nav-pills">
<li class=""><a href="{% url 'configuration' build.id %}">Summary</a></li>
<li class="active"><a href="#" >BitBake variables</a></li>
-</ul>
-
+ </ul>
<!-- variables -->
<div id="variables" class="tab-pane">
-{% include "basetable_top.html" %}
+ {% include "basetable_top.html" %}
-{% for variable in objects %}
- <tr class="data">
- <td class="variable">{{variable.variable_name}}</td>
- <td class="variable_value">{{variable.variable_value}}</td>
- <td class="file">{% for vh in variable.vhistory_set.all %}{{vh.operation}} in {{vh.file_name}}:{{vh.line_number}}<br/>{%endfor%}</td>
- <td class="description">{% if variable.description %}{{variable.description}}{% endif %}</td>
+ {% for variable in objects %}
+ <tr class="data">
+ <td class="variable_name"><a data-toggle="modal" href="#variable-{{variable.pk}}">{{variable.variable_name}}</a></td>
+ <td class="variable_value"><a data-toggle="modal" href="#variable-{{variable.pk}}">{{variable.variable_value|truncatechars:153}}</a></td>
+ <td class="file"><a data-toggle="modal" href="#variable-{{variable.pk}}">
+ {% if variable.vhistory.all %} {% autoescape off %}
+ {{variable.vhistory.all | filter_setin_files:file_filter }}
+ {% endautoescape %} {% endif %}
+ </a></td>
+ <td class="description">
+ {% if variable.description %}
+ {{variable.description}}
+ <a href="http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-{{variable.variable_name|variable_parent_name}}" target="_blank">
+ <i class="icon-share get-info"></i></a>
+ {% endif %}
+ </td>
</tr>
{% endfor %}
{% include "basetable_bottom.html" %}
+</div> <!-- endvariables -->
- </div> <!-- endvariables -->
+<!-- file list popups -->
+{% for variable in objects %}
+ {% if variable.vhistory.count %}
+ <div id="variable-{{variable.pk}}" class="modal hide fade" tabindex="-1" role="dialog">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
+ <h3>History of {{variable.variable_name}}</h3>
+ </div>
+ <div class="modal-body">
+ {% if variable.variable_value %}
+ {% if variable.variable_value|length < 570 %}
+ <h4>{{variable.variable_name}} value is:</h4>
+ <p>
+ {{variable.variable_value}}
+ </p>
+ {% else %}
+ <h4>{{variable.variable_name}} value is:</h4>
+ <p>
+ <span>{{variable.variable_value|string_slice:':570'}}
+ <span class="full-variable"> {{variable.variable_value|string_slice:'570:'}}
+ </span>
+ <a class="btn btn-mini full-variable-show">...</a>
+ </span>
+ </p>
+ <a class="btn btn-mini full-variable-hide">Collapse variable value<i class="icon-caret-up"></i>
+ </a>
+ {% endif %}
+ {% else %}
+ <div class="alert alert-info">The value of <strong>{{variable.variable_name}}</strong> is an empty string</div>
+ {% endif %}
+ <h4>The value was set in the following configuration files:</h4>
+ <table class="table table-bordered table-hover">
+ <thead>
+ <tr>
+ <th>Order</th>
+ <th>Configuration file</th>
+ <th>Operation</th>
+ <th>Line number</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for vh in variable.vhistory.all %}
+ <tr>
+ <td>{{forloop.counter}}</td><td>{{vh.file_name}}</td><td>{{vh.operation}}</td><td>{{vh.line_number}}</td>
+ </tr>
+ {%endfor%}
+ </tbody>
+ </table>
+ </div>
+ </div>
+ {% endif %}
+{% endfor %}
+
+</div> <!-- buildinfomain -->
-</div>
{% endblock %}
OpenPOWER on IntegriCloud