mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 13:29:49 +00:00
bitbake: toaster: customrecipe Only show download icon or button if it's possible
If the based on recipe has not yet been checked out/cloned we cannot generate the custom image recipe file that uses it. So disable/remove the option to download it. [YOCTO #9425] (Bitbake rev: f08651a954358e9c6ce4d69de285e4cd9e1408ae) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
d3b5b0b4bb
commit
fce42a28cc
@@ -508,10 +508,12 @@ class CustomImagesTable(ToasterTable):
|
|||||||
|
|
||||||
recipe_file_template = '''
|
recipe_file_template = '''
|
||||||
<code>{{data.name}}_{{data.version}}.bb</code>
|
<code>{{data.name}}_{{data.version}}.bb</code>
|
||||||
|
{% if data.get_base_recipe_file %}
|
||||||
<a href="{% url 'customrecipedownload' extra.pid data.pk %}">
|
<a href="{% url 'customrecipedownload' extra.pid data.pk %}">
|
||||||
<i class="icon-download-alt" data-original-title="Download recipe
|
<i class="icon-download-alt" data-original-title="Download recipe
|
||||||
file"></i>
|
file"></i>
|
||||||
</a>'''
|
</a>
|
||||||
|
{% endif %}'''
|
||||||
|
|
||||||
self.add_column(title="Recipe file",
|
self.add_column(title="Recipe file",
|
||||||
static_data_name='recipe_file_download',
|
static_data_name='recipe_file_download',
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
{% load static %}
|
{% load static %}
|
||||||
{% block pagecontent %}
|
{% block pagecontent %}
|
||||||
|
|
||||||
|
{% with recipe.get_base_recipe_file as base_recipe_file %}
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<ul class="breadcrumb">
|
<ul class="breadcrumb">
|
||||||
<li>
|
<li>
|
||||||
@@ -99,8 +100,15 @@
|
|||||||
<a class="btn btn-large span6 build-custom-image" href="#" style="width: 50%">
|
<a class="btn btn-large span6 build-custom-image" href="#" style="width: 50%">
|
||||||
Build {{recipe.name}}
|
Build {{recipe.name}}
|
||||||
</a>
|
</a>
|
||||||
<a href="{% url 'customrecipedownload' project.id recipe.id %}" class="btn btn-large span6" style="width: 50%">
|
<a href="{% url 'customrecipedownload' project.id recipe.id %}" class="btn btn-large span6" style="width: 50%"
|
||||||
|
{% if not base_recipe_file %}
|
||||||
|
disabled="disabled"
|
||||||
|
{% endif %}>
|
||||||
Download recipe file
|
Download recipe file
|
||||||
|
{% if not base_recipe_file %}
|
||||||
|
<i class="icon-question-sign get-help"
|
||||||
|
data-original-title="The {{recipe.name}} recipe cannot yet be downloaded as the Based on recipe '{{recipe.base_recipe.name}}' has not yet been fetched"></i>
|
||||||
|
{% endif %}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="no-results-special-{{table_name}}" class="air" style="display:none;">
|
<div id="no-results-special-{{table_name}}" class="air" style="display:none;">
|
||||||
@@ -177,7 +185,9 @@
|
|||||||
<dt>Recipe file</dt>
|
<dt>Recipe file</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<code>{{recipe.name}}_{{recipe.version}}.bb</code>
|
<code>{{recipe.name}}_{{recipe.version}}.bb</code>
|
||||||
|
{% if base_recipe_path %}
|
||||||
<a href="{% url 'customrecipedownload' project.pk recipe.pk %}"><i class="icon-share" title="" data-original-title="View recipe file"></i></a>
|
<a href="{% url 'customrecipedownload' project.pk recipe.pk %}"><i class="icon-share" title="" data-original-title="View recipe file"></i></a>
|
||||||
|
{% endif %}
|
||||||
</dd>
|
</dd>
|
||||||
<dt>Layer</dt>
|
<dt>Layer</dt>
|
||||||
<dd><a href="{% url 'layerdetails' project.id recipe.layer_version.pk %}">{{recipe.layer_version.layer.name}}</a></dd>
|
<dd><a href="{% url 'layerdetails' project.id recipe.layer_version.pk %}">{{recipe.layer_version.layer.name}}</a></dd>
|
||||||
@@ -220,4 +230,5 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{% endwith %}{# end base_recipe_file #}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
Reference in New Issue
Block a user