diff options
author | Elliot Smith <elliot.smith@intel.com> | 2015-10-02 08:14:42 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-10-16 14:59:59 +0100 |
commit | da4c6144f1125ac94f1ba515f97a433a983b7662 (patch) | |
tree | 09f40037ea1bf5eca452d648aeeb8fa070540a9a /bitbake/lib/toaster/toastergui/templates | |
parent | ef6fc2bc1a4eeafdf5eda112ffb72bfed24b85d5 (diff) | |
download | poky-da4c6144f1125ac94f1ba515f97a433a983b7662.tar.gz |
bitbake: toaster: Make the builds view the project page for "command line builds"
Command line builds don't have configuration or layers which can
be manipulated in Toaster, so these pages shouldn't be visible.
However, the configuration page is the default page for the
project view (/project/X/), which isn't correct for the
command line builds project.
Modify all project page links across the application so that
the command line builds project (aka the "default" project)
always displays the builds tab.
Add a project_url tag for templates which contains the logic
determining where the URL for a project links to, based on
whether it is the default project or not.
[YOCTO #8231]
(Bitbake rev: 3ea10f4c16a557e94781251f6776b13acb8e9eba)
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates')
4 files changed, 13 insertions, 8 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/base.html b/bitbake/lib/toaster/toastergui/templates/base.html index 640bc47bcc..3f277909d7 100644 --- a/bitbake/lib/toaster/toastergui/templates/base.html +++ b/bitbake/lib/toaster/toastergui/templates/base.html | |||
@@ -1,6 +1,7 @@ | |||
1 | <!DOCTYPE html> | 1 | <!DOCTYPE html> |
2 | {% load static %} | 2 | {% load static %} |
3 | {% load projecttags %} | 3 | {% load projecttags %} |
4 | {% load project_url_tag %} | ||
4 | <html lang="en"> | 5 | <html lang="en"> |
5 | <head> | 6 | <head> |
6 | <title>{% if objectname %} {{objectname|title}} - {% endif %}Toaster</title> | 7 | <title>{% if objectname %} {{objectname|title}} - {% endif %}Toaster</title> |
@@ -35,7 +36,7 @@ | |||
35 | projectsTypeAheadUrl: {% url 'xhr_projectstypeahead' as prjurl%}{{prjurl|json}}, | 36 | projectsTypeAheadUrl: {% url 'xhr_projectstypeahead' as prjurl%}{{prjurl|json}}, |
36 | {% if project.id %} | 37 | {% if project.id %} |
37 | projectId : {{project.id}}, | 38 | projectId : {{project.id}}, |
38 | projectPageUrl : {% url 'project' project.id as purl%}{{purl|json}}, | 39 | projectPageUrl : {% url 'project' project.id as purl %}{{purl|json}}, |
39 | projectName : {{project.name|json}}, | 40 | projectName : {{project.name|json}}, |
40 | recipesTypeAheadUrl: {% url 'xhr_recipestypeahead' project.id as paturl%}{{paturl|json}}, | 41 | recipesTypeAheadUrl: {% url 'xhr_recipestypeahead' project.id as paturl%}{{paturl|json}}, |
41 | layersTypeAheadUrl: {% url 'xhr_layerstypeahead' project.id as paturl%}{{paturl|json}}, | 42 | layersTypeAheadUrl: {% url 'xhr_layerstypeahead' project.id as paturl%}{{paturl|json}}, |
@@ -133,7 +134,7 @@ | |||
133 | <h6>Project:</h6> | 134 | <h6>Project:</h6> |
134 | <span id="project"> | 135 | <span id="project"> |
135 | {% if project.id %} | 136 | {% if project.id %} |
136 | <a class="lead" href="{% url 'project' project.id %}">{{project.name}}</a> | 137 | <a class="lead" href="{% project_url project %}">{{project.name}}</a> |
137 | {% else %} | 138 | {% else %} |
138 | <a class="lead" href="#"></a> | 139 | <a class="lead" href="#"></a> |
139 | {% endif %} | 140 | {% endif %} |
diff --git a/bitbake/lib/toaster/toastergui/templates/builds.html b/bitbake/lib/toaster/toastergui/templates/builds.html index 2b35b010ed..6fbaf98ae0 100644 --- a/bitbake/lib/toaster/toastergui/templates/builds.html +++ b/bitbake/lib/toaster/toastergui/templates/builds.html | |||
@@ -2,6 +2,7 @@ | |||
2 | 2 | ||
3 | {% load static %} | 3 | {% load static %} |
4 | {% load projecttags %} | 4 | {% load projecttags %} |
5 | {% load project_url_tag %} | ||
5 | {% load humanize %} | 6 | {% load humanize %} |
6 | 7 | ||
7 | {% block extraheadcontent %} | 8 | {% block extraheadcontent %} |
@@ -104,7 +105,7 @@ | |||
104 | {% endif %} | 105 | {% endif %} |
105 | </td> | 106 | </td> |
106 | <td> | 107 | <td> |
107 | <a href="{% url 'project' build.project.id %}">{{build.project.name}}</a> | 108 | <a href="{% project_url build.project %}">{{build.project.name}}</a> |
108 | </td> | 109 | </td> |
109 | </tr> | 110 | </tr> |
110 | 111 | ||
diff --git a/bitbake/lib/toaster/toastergui/templates/mrb_section.html b/bitbake/lib/toaster/toastergui/templates/mrb_section.html index 5e96b39121..b29f650f5d 100644 --- a/bitbake/lib/toaster/toastergui/templates/mrb_section.html +++ b/bitbake/lib/toaster/toastergui/templates/mrb_section.html | |||
@@ -1,8 +1,8 @@ | |||
1 | {% load static %} | 1 | {% load static %} |
2 | {% load projecttags %} | 2 | {% load projecttags %} |
3 | {% load project_url_tag %} | ||
3 | {% load humanize %} | 4 | {% load humanize %} |
4 | 5 | ||
5 | |||
6 | {%if mru and mru.count > 0%} | 6 | {%if mru and mru.count > 0%} |
7 | 7 | ||
8 | {%if mrb_type == 'project' %} | 8 | {%if mrb_type == 'project' %} |
@@ -22,7 +22,7 @@ | |||
22 | {% if mrb_type != 'project' %} | 22 | {% if mrb_type != 'project' %} |
23 | project-name"> | 23 | project-name"> |
24 | <span class="label {%if build.outcome == build.SUCCEEDED%}label-success{%elif build.outcome == build.FAILED%}label-important{%else%}label-info{%endif%}"> | 24 | <span class="label {%if build.outcome == build.SUCCEEDED%}label-success{%elif build.outcome == build.FAILED%}label-important{%else%}label-info{%endif%}"> |
25 | <a href={% url 'project' build.project.pk %}> | 25 | <a href={% project_url build.project %}> |
26 | {{build.project.name}} | 26 | {{build.project.name}} |
27 | </a> | 27 | </a> |
28 | </span> | 28 | </span> |
@@ -106,7 +106,7 @@ | |||
106 | pull-right" | 106 | pull-right" |
107 | onclick='scheduleBuild({% url 'projectbuilds' build.project.id as bpi %}{{bpi|json}}, | 107 | onclick='scheduleBuild({% url 'projectbuilds' build.project.id as bpi %}{{bpi|json}}, |
108 | {{build.project.name|json}}, | 108 | {{build.project.name|json}}, |
109 | {% url 'project' build.project.id as bpurl %}{{bpurl|json}}, | 109 | {% url 'project' build.project.id as purl %}{{purl|json}}, |
110 | {{build.target_set.all|get_tasks|json}})'> | 110 | {{build.target_set.all|get_tasks|json}})'> |
111 | 111 | ||
112 | Run again | 112 | Run again |
diff --git a/bitbake/lib/toaster/toastergui/templates/projects.html b/bitbake/lib/toaster/toastergui/templates/projects.html index a7192c2d72..7c612e8c43 100644 --- a/bitbake/lib/toaster/toastergui/templates/projects.html +++ b/bitbake/lib/toaster/toastergui/templates/projects.html | |||
@@ -2,6 +2,7 @@ | |||
2 | 2 | ||
3 | {% load static %} | 3 | {% load static %} |
4 | {% load projecttags %} | 4 | {% load projecttags %} |
5 | {% load project_url_tag %} | ||
5 | {% load humanize %} | 6 | {% load humanize %} |
6 | 7 | ||
7 | {% block pagecontent %} | 8 | {% block pagecontent %} |
@@ -37,8 +38,10 @@ | |||
37 | {% include "basetable_top.html" %} | 38 | {% include "basetable_top.html" %} |
38 | {% for o in objects %} | 39 | {% for o in objects %} |
39 | <tr class="data" data-project="{{ o.id }}"> | 40 | <tr class="data" data-project="{{ o.id }}"> |
40 | <td><a href="{% url 'project' o.id %}">{{o.name}}</a></td> | 41 | <td data-project-field="name"> |
41 | <td class="updated"><a href="{% url 'project' o.id %}">{{o.updated|date:"d/m/y H:i"}}</a></td> | 42 | <a href="{% project_url o %}">{{o.name}}</a> |
43 | </td> | ||
44 | <td class="updated"><a href="{% project_url o %}">{{o.updated|date:"d/m/y H:i"}}</a></td> | ||
42 | <td data-project-field="release"> | 45 | <td data-project-field="release"> |
43 | {% if o.release %} | 46 | {% if o.release %} |
44 | <a href="{% url 'project' o.id %}#project-details">{{o.release.name}}</a> | 47 | <a href="{% url 'project' o.id %}#project-details">{{o.release.name}}</a> |