bitbake: toaster: link to configuration in all breadcrumbs
The existing breadcrumb does not always provide a link to the project configuration page. When you are in the build history pages, you must go back to the builds information first, and from there access the project configuration. That feels very long. Change the breadcrumb so that the project name item always provides a link to the project configuration. (Bitbake rev: 9910f3f292d35fc91215d550c5f123dcf18ab35d) Signed-off-by: Belen Barros Pena <belen.barros.pena@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:
parent
df2808f5f6
commit
e1fc3190b7
|
@ -10,7 +10,6 @@
|
||||||
|
|
||||||
/* Style the breadcrumb */
|
/* Style the breadcrumb */
|
||||||
.breadcrumb { display: inline-block; background-color: transparent; }
|
.breadcrumb { display: inline-block; background-color: transparent; }
|
||||||
.breadcrumb li:first-child { padding-right: 10px; }
|
|
||||||
|
|
||||||
/* Styles for the help information */
|
/* Styles for the help information */
|
||||||
.get-help { color: #CCCCCC; }
|
.get-help { color: #CCCCCC; }
|
||||||
|
|
|
@ -32,21 +32,6 @@ function layerDetailsPageInit (ctx) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
$(".breadcrumb li:first a").click(function(e){
|
|
||||||
e.preventDefault();
|
|
||||||
/* By default this link goes to the project configuration page. However
|
|
||||||
* if we have some builds we go there instead of the default href
|
|
||||||
*/
|
|
||||||
libtoaster.getProjectInfo(libtoaster.ctx.projectPageUrl, function(prjInfo){
|
|
||||||
if (prjInfo.builds && prjInfo.builds.length > 0) {
|
|
||||||
window.location.replace(libtoaster.ctx.projectBuildsUrl);
|
|
||||||
} else {
|
|
||||||
window.location.replace(libtoaster.ctx.projectPageUrl);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
function addRemoveDep(depLayerId, add, doneCb) {
|
function addRemoveDep(depLayerId, add, doneCb) {
|
||||||
var data = { layer_version_id : ctx.layerVersion.id };
|
var data = { layer_version_id : ctx.layerVersion.id };
|
||||||
if (add)
|
if (add)
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<!-- Breadcrumbs -->
|
<!-- Breadcrumbs -->
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<ul class="breadcrumb" id="breadcrumb">
|
<ul class="breadcrumb" id="breadcrumb">
|
||||||
<li class="muted">{{build.project.name}}:</li>
|
<li><a href="{% url 'project' build.project.id %}">{{build.project.name}}</a></li>
|
||||||
<li><a href="{% url 'projectbuilds' build.project.id %}">Builds</a></li>
|
<li><a href="{% url 'projectbuilds' build.project.id %}">Builds</a></li>
|
||||||
<li><a href="{%url 'builddashboard' build.pk%}">{{build.get_sorted_target_list.0.target}} {%if build.target_set.all.count > 1%}(+{{build.target_set.all.count|add:"-1"}}){%endif%} {{build.machine}} ({{build.completed_on|date:"d/m/y H:i"}})</a></li>
|
<li><a href="{%url 'builddashboard' build.pk%}">{{build.get_sorted_target_list.0.target}} {%if build.target_set.all.count > 1%}(+{{build.target_set.all.count|add:"-1"}}){%endif%} {{build.machine}} ({{build.completed_on|date:"d/m/y H:i"}})</a></li>
|
||||||
{% block localbreadcrumb %}{% endblock %}
|
{% block localbreadcrumb %}{% endblock %}
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
$( function () {
|
$( function () {
|
||||||
$('#breadcrumb > li').append('<span class="divider">→</span>');
|
$('#breadcrumb > li').append('<span class="divider">→</span>');
|
||||||
$('#breadcrumb > li:last').addClass("active");
|
$('#breadcrumb > li:last').addClass("active");
|
||||||
$('#breadcrumb > li:last > span, #breadcrumb > li:first > span').remove();
|
$('#breadcrumb > li:last > span').remove();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</div> <!--section-->
|
</div> <!--section-->
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<!-- Breadcrumbs -->
|
<!-- Breadcrumbs -->
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<ul class="breadcrumb" id="breadcrumb">
|
<ul class="breadcrumb" id="breadcrumb">
|
||||||
<li class="muted">{{build.project.name}}:</li>
|
<li><a href="{% url 'project' build.project.id %}">{{build.project.name}}</a></li>
|
||||||
<li><a href="{% url 'projectbuilds' build.project.id %}">Builds</a></li>
|
<li><a href="{% url 'projectbuilds' build.project.id %}">Builds</a></li>
|
||||||
<li>
|
<li>
|
||||||
{% block parentbreadcrumb %}
|
{% block parentbreadcrumb %}
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
$( function () {
|
$( function () {
|
||||||
$('#breadcrumb > li').append('<span class="divider">→</span>');
|
$('#breadcrumb > li').append('<span class="divider">→</span>');
|
||||||
$('#breadcrumb > li:last').addClass("active");
|
$('#breadcrumb > li:last').addClass("active");
|
||||||
$('#breadcrumb > li:last > span, #breadcrumb > li:first > span').remove();
|
$('#breadcrumb > li:last > span').remove();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -8,9 +8,8 @@
|
||||||
|
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<ul class="breadcrumb">
|
<ul class="breadcrumb">
|
||||||
<li class="muted">{{project.name}}:</li>
|
|
||||||
<li>
|
<li>
|
||||||
<a href="{% url 'project' project.id %}">Configuration</a>
|
<a href="{% url 'project' project.id %}">{{project.name}}</a>
|
||||||
<span class="divider">→</span>
|
<span class="divider">→</span>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="{% url 'projectlayers' project.id %}">Compatible layers</a>
|
<li><a href="{% url 'projectlayers' project.id %}">Compatible layers</a>
|
||||||
|
@ -46,7 +45,6 @@
|
||||||
|
|
||||||
$(document).ready(function (){
|
$(document).ready(function (){
|
||||||
var ctx = {
|
var ctx = {
|
||||||
projectBuildsUrl : "{% url 'projectbuilds' project.id %}",
|
|
||||||
xhrUpdateLayerUrl : "{% url 'xhr_updatelayer' %}",
|
xhrUpdateLayerUrl : "{% url 'xhr_updatelayer' %}",
|
||||||
layerVersion : {
|
layerVersion : {
|
||||||
name : "{{layerversion.layer.name}}",
|
name : "{{layerversion.layer.name}}",
|
||||||
|
|
|
@ -6,11 +6,8 @@
|
||||||
|
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<ul class="breadcrumb">
|
<ul class="breadcrumb">
|
||||||
<li class="muted">
|
|
||||||
{{project.name}}
|
|
||||||
</li>
|
|
||||||
<li>
|
<li>
|
||||||
<a href="{% url 'project' project.id %}">Configuration</a>
|
<a href="{% url 'project' project.id %}">{{project.name}}</a>
|
||||||
<span class="divider">→</span>
|
<span class="divider">→</span>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
|
Loading…
Reference in New Issue