toaster: Tweaks to recipe file downloads
PATCH 1/1 toaster: Tweaks to recipe file downloads
* In the custom images table, show the recipe file and download icon only when the recipe file exists and can be downloaded.
* Also in the custom images table, make sure the download icon tooltip shows on hover.
* In the custom image details page, show the correct icon (download) next to the recipe file in the right hand column.
* In the custom image details page, show the recipe file and download icon in the right hand column only when the recipe file exists and can be downloaded
* Also in the custom image details page, simplify the help text we show when the 'download' button is disabled: it gave so much information about what's actually happening under the hood that it was a bit hard to follow.
--- bitbake/lib/toaster/toastergui/tables.py | 7 ++----- bitbake/lib/toaster/toastergui/templates/customrecipe.html | 8 ++++---- 2 files changed, 6 insertions(+), 9 deletions(-)
bitbake/lib/toaster/toastergui/tables.py +2 -5
@@ -507,12 +507,9 @@ class CustomImagesTable(ToasterTable): static_data_template=name_link_template) recipe_file_template = ''' - <code>{{data.name}}_{{data.version}}.bb</code> {% if data.get_base_recipe_file %} - <a href="{% url 'customrecipedownload' extra.pid data.pk %}"> - <i class="icon-download-alt" data-original-title="Download recipe - file"></i> - </a> + <code>{{data.name}}_{{data.version}}.bb</code> + <a href="{% url 'customrecipedownload' extra.pid data.pk %}" class="icon-download-alt get-help" title="Download recipe file"></a> {% endif %}''' self.add_column(title="Recipe file",
bitbake/lib/toaster/toastergui/templates/customrecipe.html +4 -4
@@ -107,7 +107,7 @@ 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> + data-original-title="The recipe file doesn't exist yet, so you cannot download it. You need to build your custom image first"></i> {% endif %} </a> </div>
@@ -182,13 +182,13 @@ </dd> {% endwith %} {% endif %} + {% if base_recipe_file %} <dt>Recipe file</dt> <dd> <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> - {% endif %} + <a href="{% url 'customrecipedownload' project.pk recipe.pk %}"><i class="icon-download-alt" title="Download recipe file"></i></a> </dd> + {% endif %} <dt>Layer</dt> <dd><a href="{% url 'layerdetails' project.id recipe.layer_version.pk %}">{{recipe.layer_version.layer.name}}</a></dd> {% if recipe.summary %}
Signature · 1 line
1.9.1
Sent to bitbake-devel and added to toaster-next.
Thanks.
Elliot
Quoted 92 lines · Belen Barros Pena
* In the custom images table, show the recipe file and download icon only when the recipe file exists and can be downloaded.
* Also in the custom images table, make sure the download icon tooltip shows on hover.
* In the custom image details page, show the correct icon (download) next to the recipe file in the right hand column.
* In the custom image details page, show the recipe file and download icon in the right hand column only when the recipe file exists and can be downloaded
* Also in the custom image details page, simplify the help text we show when the 'download' button is disabled: it gave so much information about what's actually happening under the hood that it was a bit hard to follow.
Signed-off-by Belen Barros Pena <[email protected]>--- bitbake/lib/toaster/toastergui/tables.py | 7 ++----- bitbake/lib/toaster/toastergui/templates/customrecipe.html | 8 ++++---- 2 files changed, 6 insertions(+), 9 deletions(-)bitbake/lib/toaster/toastergui/tables.py +2
-5@@ -507,12 +507,9 @@ class CustomImagesTable(ToasterTable): static_data_template=name_link_template) recipe_file_template = ''' - <code>{{data.name}}_{{data.version}}.bb</code> {% if data.get_base_recipe_file %} - <a href="{% url 'customrecipedownload' extra.pid data.pk %}"> - <i class="icon-download-alt" data-original-title="Download recipe - file"></i> - </a> + <code>{{data.name}}_{{data.version}}.bb</code> + <a href="{% url 'customrecipedownload' extra.pid data.pk %}"class="icon-download-alt get-help" title="Download recipe file"></a>
{% endif %}''' self.add_column(title="Recipe file",bitbake/lib/toaster/toastergui/templates/customrecipe.html +0
-1@@ -107,7 +107,7 @@ Download recipe file {% if not base_recipe_file %} <i class="icon-question-sign get-help" - data-original-title="The {{recipe.name}} recipe cannot yet bedownloaded as the Based on recipe '{{recipe.base_recipe.name}}' has not yet been fetched"></i>
+ data-original-title="The recipe file doesn't exist yet, so you
cannot download it. You need to build your custom image first"></i>{% endif %} </a> </div>bitbake/lib/toaster/toastergui/templates/customrecipe.html +1
-2@@ -182,13 +182,13 @@ </dd> {% endwith %} {% endif %} + {% if base_recipe_file %} <dt>Recipe file</dt> <dd> <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>
bitbake/lib/toaster/toastergui/templates/customrecipe.html +1
-1- {% endif %} + <a href="{% url 'customrecipedownload' project.pk recipe.pk%}"><i class="icon-download-alt" title="Download recipe file"></i></a>
</dd>+ {% endif %}
<dt>Layer</dt>
<dd><a href="{% url 'layerdetails' project.id
recipe.layer_version.pk %}">{{recipe.layer_version.layer.name}}</a></dd>{% if recipe.summary %}--
1.9.1--
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster
Signature · 3 lines
Elliot Smith Software Engineer Intel Open Source Technology Centre