Skip to content

Commit

Permalink
toaster: templates Add meaningful title tags
Browse files Browse the repository at this point in the history
Our title tags are all over the place, and have no relation to the page
content. This commit adds a meaningful title tag to each Toaster page.

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
  • Loading branch information
Belen Barros Pena authored and rpurdie committed Oct 29, 2015
1 parent 349119f commit 1ab8827
Show file tree
Hide file tree
Showing 28 changed files with 55 additions and 19 deletions.
4 changes: 3 additions & 1 deletion lib/toaster/toastergui/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
{% load project_url_tag %}
<html lang="en">
<head>
<title>{% if objectname %} {{objectname|title}} - {% endif %}Toaster</title>
<title>
{% block title %} Toaster {% endblock %}
</title>
<link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}" type="text/css"/>
<link rel="stylesheet" href="{% static 'css/bootstrap-responsive.min.css' %}" type='text/css'/>
<link rel="stylesheet" href="{% static 'css/font-awesome.min.css' %}" type='text/css'/>
Expand Down
3 changes: 3 additions & 0 deletions lib/toaster/toastergui/templates/baseprojectpage.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{% extends "base.html" %}
{% load projecttags %}
{% load humanize %}

{% block title %} {{title}} - {{project.name}} - Toaster {% endblock %}

{% block pagecontent %}

{% include "projecttopbar.html" %}
Expand Down
1 change: 1 addition & 0 deletions lib/toaster/toastergui/templates/bpackage.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

{% load projecttags %}

{% block title %} Packages built - {{build.target_set.all|dictsort:"target"|join:", "}} {{build.machine}} - {{build.project.name}} - Toaster {% endblock %}
{% block localbreadcrumb %}
<li>Packages</li>
{% endblock %}
Expand Down
1 change: 1 addition & 0 deletions lib/toaster/toastergui/templates/builddashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{% load humanize %}
{% load projecttags %}

{% block title %} {{build.target_set.all|dictsort:"target"|join:", "}} {{build.machine}} - {{build.project.name}} - Toaster {% endblock %}
{% block parentbreadcrumb %}
{% if build.get_sorted_target_list.count > 0 %}
{{build.get_sorted_target_list.0.target}}
Expand Down
1 change: 1 addition & 0 deletions lib/toaster/toastergui/templates/builds.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
{% load project_url_tag %}
{% load humanize %}

{% block title %} All builds - Toaster {% endblock %}
{% block extraheadcontent %}
<link rel="stylesheet" href="/static/css/jquery-ui.min.css" type='text/css'>
<link rel="stylesheet" href="/static/css/jquery-ui.structure.min.css" type='text/css'>
Expand Down
1 change: 1 addition & 0 deletions lib/toaster/toastergui/templates/configuration.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{% extends "basebuildpage.html" %}
{% load projecttags %}

{% block title %} Configuration summary - {{build.target_set.all|dictsort:"target"|join:", "}} {{build.machine}} - {{build.project.name}} - Toaster {% endblock %}
{% block localbreadcrumb %}
<li>Configuration</li>
{% endblock %}
Expand Down
1 change: 1 addition & 0 deletions lib/toaster/toastergui/templates/configvars.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{% extends "basebuildpage.html" %}
{% load projecttags %}

{% block title %} BitBake variables - {{build.target_set.all|dictsort:"target"|join:", "}} {{build.machine}} - {{build.project.name}} - Toaster {% endblock %}
{% block localbreadcrumb %}
<li>Configuration</li>
{% endblock %}
Expand Down
1 change: 1 addition & 0 deletions lib/toaster/toastergui/templates/dirinfo.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% extends "basebuildpage.html" %}
{% block title %} Directory structure - {{ target.target }} {{ build.machine }} - {{ build.project.name }} - Toaster {% endblock %}
{% block extraheadcontent %}
{% load static %}
<link rel="stylesheet" href="{% static 'css/jquery.treetable.css' %}" type="text/css">
Expand Down
1 change: 1 addition & 0 deletions lib/toaster/toastergui/templates/importlayer.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{% load projecttags %}
{% load humanize %}
{% load static %}
{% block title %} Import layer - {{project.name}} - Toaster {% endblock %}
{% block pagecontent %}

{% include "projecttopbar.html" %}
Expand Down
1 change: 1 addition & 0 deletions lib/toaster/toastergui/templates/landing.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
{% load projecttags %}
{% load humanize %}

{% block title %} Welcome to Toaster {% endblock %}
{% block pagecontent %}

{% if BUILD_MODE %}
Expand Down
2 changes: 2 additions & 0 deletions lib/toaster/toastergui/templates/landing_not_managed.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
{% load projecttags %}
{% load humanize %}

{% block title %} Welcome to Toaster {% endblock %}

{% block pagecontent %}

<div class="container-fluid">
Expand Down
1 change: 1 addition & 0 deletions lib/toaster/toastergui/templates/layerdetails.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{% load humanize %}
{% load static %}

{% block title %} {{layerversion.layer.name}} - {{project.name}} - Toaster {% endblock %}
{% block pagecontent %}

<div class="section">
Expand Down
3 changes: 3 additions & 0 deletions lib/toaster/toastergui/templates/newproject.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{% extends "base.html" %}
{% load projecttags %}
{% load humanize %}

{% block title %} Create a new project - Toaster {% endblock %}

{% block pagecontent %}
<div class="row-fluid">
<div class="page-header">
Expand Down
11 changes: 9 additions & 2 deletions lib/toaster/toastergui/templates/package_detail_base.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
{% extends "basebuilddetailpage.html" %}
{% load projecttags %}

{% block title %}
{% if target %}
{{package.fullpackagespec}} - {{ target.target }} {{ build.machine }} - {{ build.project.name }} - Toaster
{% else %}
{{package.fullpackagespec}} - {{ build.target_set.all|dictsort:"target"|join:", " }} {{ build.machine }} - {{ build.project.name }} - Toaster
{% endif %}
{% endblock %}
{% block extraheadcontent %}
<!-- functions to format package 'installed_package' alias -->
<script>
Expand Down Expand Up @@ -38,9 +45,9 @@
{% block pagedetailinfomain %}
<div class="row span11">
<div class="page-header">
{% block title %}
{% block mainheading %}
<h1>{{package.fullpackagespec}}</h1>
{% endblock title %}
{% endblock %}
</div> <!-- page-header -->
</div> <!-- row span11 page-header -->

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{% extends "package_detail_base.html" %}
{% load projecttags %}

{% block title %}
{% block mainheading %}
<h1>
{{package.fullpackagespec}}
<script> fmtAliasHelp("{{package.name}}", "{{package.alias}}", false) </script>
<small>({{target.target}})</small>
</h1>
{% endblock title %}
{% endblock %}

{% block tabcontent %}
{% with packageFileCount=package.buildfilelist_package.count %}
Expand Down
4 changes: 2 additions & 2 deletions lib/toaster/toastergui/templates/package_included_detail.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{% extends "package_detail_base.html" %}
{% load projecttags %}

{% block title %}
{% block mainheading %}
<h1>
{{package.fullpackagespec}}
<script>
fmtAliasHelp("{{package.name}}", "{{package.alias}}", false)
</script>
<small>({{target.target}})</small>
</h1>
{% endblock title %}
{% endblock %}

{% block tabcontent %}
{% with packageFileCount=package.buildfilelist_package.count %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{% extends "package_detail_base.html" %}
{% load projecttags %}

{% block title %}
{% block mainheading %}
<h1>
{{package.fullpackagespec}}
<script> fmtAliasHelp("{{package.name}}", "{{package.alias}}", false) </script>
<small>({{target.target}})</small>
</h1>
{% endblock title %}
{% endblock %}

{% block tabcontent %}
{% with packageFileCount=package.buildfilelist_package.count %}
Expand Down
1 change: 1 addition & 0 deletions lib/toaster/toastergui/templates/project.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
{% load humanize %}
{% load static %}

{% block title %} Configuration - {{project.name}} - Toaster {% endblock %}
{% block projectinfomain %}

<script src="{% static 'js/layerDepsModal.js' %}"></script>
Expand Down
2 changes: 1 addition & 1 deletion lib/toaster/toastergui/templates/projectbuilds.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% load projecttags %}
{% load humanize %}


{% block title %} Builds - {{project.name}} - Toaster {% endblock %}
{% block extraheadcontent %}
<link rel="stylesheet" href="/static/css/jquery-ui.min.css" type='text/css'>
<link rel="stylesheet" href="/static/css/jquery-ui.structure.min.css" type='text/css'>
Expand Down
2 changes: 1 addition & 1 deletion lib/toaster/toastergui/templates/projectconf.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% load projecttags %}
{% load humanize %}


{% block title %} BitBake variables - {{project.name}} - Toaster {% endblock %}
{% block projectinfomain %}

<h2>Bitbake variables</h2>
Expand Down
2 changes: 2 additions & 0 deletions lib/toaster/toastergui/templates/projects.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
{% load project_url_tag %}
{% load humanize %}

{% block title %} All projects - Toaster {% endblock %}

{% block pagecontent %}


Expand Down
1 change: 1 addition & 0 deletions lib/toaster/toastergui/templates/recipe.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

{% load projecttags %}

{% block title %} {{object.name}}_{{object.version}} - {{build.target_set.all|dictsort:"target"|join:", "}} {{build.machine}} - {{build.project.name}} - Toaster {% endblock %}
{% block localbreadcrumb %}
<li><a href="{% url 'recipes' build.pk %}">Recipes</a></li>
<li>{{object.name}}_{{object.version}} </li>
Expand Down
1 change: 1 addition & 0 deletions lib/toaster/toastergui/templates/recipes.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

{% load projecttags %}

{% block title %} Recipes - {{build.target_set.all|dictsort:"target"|join:", "}} {{build.machine}} - {{build.project.name}} - Toaster {% endblock %}
{% block localbreadcrumb %}
<li>Recipes</li>
{% endblock %}
Expand Down
1 change: 1 addition & 0 deletions lib/toaster/toastergui/templates/target.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% extends "basebuildpage.html" %}
{% block title %} Packages included - {{ target.target }} {{ target.build.machine }} - {{ target.build.project.name }} - Toaster {% endblock %}
{% block localbreadcrumb %}
<li>{{target.target}}</li>
{% endblock localbreadcrumb%}
Expand Down
1 change: 1 addition & 0 deletions lib/toaster/toastergui/templates/task.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{% load projecttags %}
{% load humanize %}

{% block title %} {{task.recipe.name}}_{{task.recipe.version}} {{task.task_name}} - {{build.target_set.all|dictsort:"target"|join:", "}} {{build.machine}} - {{build.project.name}} - Toaster {% endblock %}
{% block localbreadcrumb %}
<li><a href="{% url 'tasks' build.pk %}">Tasks</a></li>
<li>{{task.recipe.name}}_{{task.recipe.version}} {{task.task_name}}</li>
Expand Down
15 changes: 8 additions & 7 deletions lib/toaster/toastergui/templates/tasks.html
Original file line number Diff line number Diff line change
@@ -1,33 +1,34 @@
{% extends "basebuildpage.html" %}
{% load projecttags %}

{% block title %} {{mainheading}} - {{build.target_set.all|dictsort:"target"|join:", "}} {{build.machine}} - {{build.project.name}} - Toaster{% endblock %}
{% block localbreadcrumb %}
<li>{{title}}</li>
<li>{{mainheading}}</li>
{% endblock %}

{% block nav-tasks %}
{% if 'Tasks' == title %}
{% if 'Tasks' == mainheading %}
<li class="active"><a href="{% url 'tasks' build.pk %}">Tasks</a></li>
{% else %}
<li><a href="{% url 'tasks' build.pk %}">Tasks</a></li>
{% endif %}
{% endblock %}
{% block nav-buildtime %}
{% if 'Time' == title %}
{% if 'Time' == mainheading %}
<li class="active"><a href="{% url 'buildtime' build.pk %}">Time</a></li>
{% else %}
<li><a href="{% url 'buildtime' build.pk %}">Time</a></li>
{% endif %}
{% endblock %}
{% block nav-cpuusage %}
{% if 'CPU usage' == title %}
{% if 'CPU usage' == mainheading %}
<li class="active"><a href="{% url 'cpuusage' build.pk %}">CPU usage</a></li>
{% else %}
<li><a href="{% url 'cpuusage' build.pk %}">CPU usage</a></li>
{% endif %}
{% endblock %}
{% block nav-diskio %}
{% if 'Disk I/O' == title %}
{% if 'Disk I/O' == mainheading %}
<li class="active"><a href="{% url 'diskio' build.pk %}">Disk I/O</a></li>
{% else %}
<li><a href="{% url 'diskio' build.pk %}">Disk I/O</a></li>
Expand All @@ -39,7 +40,7 @@
{% if not request.GET.filter and not request.GET.search and not objects.paginator.count %}
<!-- Empty - no data in database -->
<div class="page-header">
<h1>{{title}}</h1>
<h1>{{mainheading}}</h1>
</div>
<div class="alert alert-info lead">
No data was recorded for this build.
Expand All @@ -54,7 +55,7 @@ <h1>
{%elif request.GET.filter and objects.paginator.count == 0 or request.GET.search and objects.paginator.count == 0 %}
No tasks found
{%else%}
{{title}}
{{mainheading}}
{%endif%}
</h1>
</div>
Expand Down
2 changes: 2 additions & 0 deletions lib/toaster/toastergui/templates/unavailable_artifact.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
{% load humanize %}
{% load static %}

{% block title %} Build artifact no longer exists - Toaster {% endblock %}

{% block pagecontent %}

<div class="row-fluid air">
Expand Down
2 changes: 1 addition & 1 deletion lib/toaster/toastergui/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1236,7 +1236,7 @@ def tasks_common(request, build_id, variant, task_anchor):
context = { 'objectname': variant,
'object_search_display': object_search_display,
'filter_search_display': filter_search_display,
'title': title_variant,
'mainheading': title_variant,
'build': build,
'objects': task_objects,
'default_orderby' : orderby,
Expand Down

0 comments on commit 1ab8827

Please sign in to comment.