2014-08-29 15:42:00 +00:00
{% extends "baseprojectpage.html" %}
{% load projecttags %}
{% load humanize %}
2015-01-14 12:46:52 +00:00
{% load static %}
2014-08-29 15:42:00 +00:00
{% block localbreadcrumb %}
2015-02-06 17:55:46 +00:00
< li > < a href = "{% url 'layers' %}" > All compatible layers< / a > < / li >
2015-01-14 12:46:52 +00:00
< li >
{{layerversion.layer.name}} ({{layerversion.commit|truncatechars:13}})
< / li >
2014-08-29 15:42:00 +00:00
{% endblock %}
{% block projectinfomain %}
2015-01-14 12:46:52 +00:00
< script src = "{% static 'js/layerdetails.js' %}" > < / script >
< script >
$(document).ready(function (){
var ctx = {
projectBuildUrl : "{% url 'xhr_build' %}",
layerDetailsUrl : "{% url 'layerdetails' %}",
projectPageUrl : "{% url 'project' project.id %}",
xhrEditProjectUrl : "{% url 'xhr_projectedit' project.id %}",
xhrDataTypeaheadUrl : "{% url 'xhr_datatypeahead' %}",
xhrUpdateLayerUrl : "{% url 'xhr_updatelayer' %}",
projectId : {{project.id}},
2015-01-26 15:11:54 +00:00
projectName : "{{project.name}}",
2015-01-14 12:46:52 +00:00
numTargets : {{total_targets}},
numMachines: {{machines|length}},
layerVersion : {
name : "{{layerversion.layer.name}}",
id : {{layerversion.id}},
commit: "{{layerversion.commit}}",
inCurrentPrj : {{layer_in_project}},
url : "{% url 'layerdetails' layerversion.id %}",
sourceId: {{layerversion.layer_source_id}},
}
};
try {
layerDetailsPageInit(ctx);
} catch (e) {
document.write("Sorry, An error has occurred loading this page");
console.warn(e);
}
});
< / script >
{# If this is not an imported layer then hide the edit ui #}
{% if layerversion.layer_source_id != 3 %}
< style >
.icon-pencil {
display:none;
}
.delete-current-value{
display: none;
}
li .icon-trash {
display:none;
}
.add-deps {
display:none;
}
< / style >
{% endif %}
{% include "layers_dep_modal.html" %}
2015-01-26 12:17:18 +00:00
< div class = "row-fluid span11" >
2015-01-14 12:46:52 +00:00
< div class = "page-header" >
< h1 > {{layerversion.layer.name}} < small class = "commit" data-toggle = "tooltip" title = "{{layerversion.commit}}" > ({{layerversion.commit|truncatechars:13}})< / small > < / h1 >
< / div >
< / div >
2015-01-26 12:17:18 +00:00
< div class = "row-fluid span7 tabbable" >
2015-01-14 12:46:52 +00:00
< div class = "alert alert-info lead" id = "alert-area" style = "display:none" >
2015-02-03 16:08:47 +00:00
< button type = "button" class = "close" id = "dismiss-alert" > × < / button >
2015-01-14 12:46:52 +00:00
< span id = "alert-msg" > < / span >
< / div >
< ul class = "nav nav-pills" >
< li class = "active" >
< a data-toggle = "tab" href = "#information" id = "details-tab" > Layer details< / a >
< / li >
< li >
< a data-toggle = "tab" href = "#targets" id = "targets-tab" > Targets ({{total_targets}})< / a >
< / li >
< li >
< a data-toggle = "tab" href = "#machines" id = "machines-tab" > Machines ({{total_machines}})< / a >
< / li >
< / ul >
< div class = "tab-content" >
< span class = "button-place" >
{% if layer_in_project == 0 %}
< button id = "add-remove-layer-btn" data-directive = "add" class = "btn btn-large btn-block" >
< span class = "icon-plus" > < / span >
Add the {{layerversion.layer.name}} layer to your project
< / button >
{% else %}
< button id = "add-remove-layer-btn" data-directive = "remove" class = "btn btn-block btn-large btn-danger" >
< span class = "icon-trash" > < / span >
Delete the {{layerversion.layer.name}} layer from your project
< / button >
{% endif %}
< / span >
<!-- layer details pane -->
< div name = "information" id = "information" class = "tab-pane active" >
< dl class = "dl-horizontal" >
< dt class = "" >
< i class = "icon-question-sign get-help" title = "Fetch/clone URL of the repository" > < / i >
Repository URL
< / dt >
< dd >
< span class = "current-value" > {{layerversion.layer.vcs_url}}< / span >
{% if layerversion.get_vcs_link_url %}
2015-02-02 15:01:31 +00:00
< a href = "{{layerversion.get_vcs_link_url}}/" class = "icon-share get-info" target = "_blank" > < / a >
2015-01-14 12:46:52 +00:00
{% endif %}
< form id = "change-repo-form" class = "control-group" style = "display:none" >
< div class = "input-append" >
< input type = "text" class = "input-xlarge" value = "{{layerversion.layer.vcs_url}}" >
< button data-layer-prop = "vcs_url" class = "btn change-btn" type = "button" > Save< / button >
< a href = "#" style = "display:none" class = "btn btn-link cancel" > Cancel< / a >
< / div >
< / form >
< i class = "icon-pencil" > < / i >
< / dd >
< dt >
< i class = "icon-question-sign get-help" title = "Subdirectory within the repository where the layer is located, if not in the root (usually only used if the repository contains more than one layer)" > < / i >
Repository subdirectory
< / dt >
< dd >
< span class = "muted" style = "display:none" > Not set< / span >
< span class = "current-value" > {{layerversion.dirpath}}< / span >
{% if layerversion.get_vcs_dirpath_link_url %}
2015-02-02 15:01:31 +00:00
< a href = "{{layerversion.get_vcs_dirpath_link_url}}" class = "icon-share get-info" target = "_blank" > < / a >
2015-01-14 12:46:52 +00:00
{% endif %}
< form id = "change-subdir-form" style = "display:none;" >
< div class = "input-append" >
< input type = "text" value = "{{layerversion.dirpath}}" >
< button data-layer-prop = "dirpath" class = "btn change-btn" type = "button" > Save< / button >
< a href = "#" style = "display:none" class = "btn btn-link cancel" > Cancel< / a >
< / div >
< / form >
< i id = "change-subdir" class = "icon-pencil" > < / i >
< span class = "icon-trash delete-current-value" data-toggle = "tooltip" title = "Delete" > < / span >
< / dd >
2015-02-04 13:10:07 +00:00
< dt >
< i class = "icon-question-sign get-help" title = "The Git branch, tag or commit" > < / i >
Revision
< / dt >
2015-01-14 12:46:52 +00:00
< dd >
< span class = "current-value" > {{layerversion.commit}}< / span >
< form style = "display:none;" >
< div class = "input-append" >
< input type = "text" value = "{{layerversion.commit}}" >
< button data-layer-prop = "commit" class = "btn change-btn" type = "button" > Save< / button >
< a href = "#" style = "display:none" class = "btn btn-link cancel" > Cancel< / a >
< / div >
< / form >
< i class = "icon-pencil" > < / i >
< / dd >
2015-01-14 12:46:53 +00:00
< dt >
2015-01-14 12:46:52 +00:00
< i class = "icon-question-sign get-help" title = "Other layers this layer depends upon" > < / i >
Layer dependencies
< / dt >
< dd >
< ul class = "unstyled" id = "layer-deps-list" >
{% for ld in layerversion.dependencies.all %}
< span class = "current-value" >
< li data-layer-id = "{{ld.depends_on.id}}" >
<!-- TODO use ld.depends_on.get_vcs_reference instead of commit -->
< a data-toggle = "tooltip" title = "{{ld.depends_on.layer.vcs_url}} | {{ld.depends_on.commit}}" href = "{% url 'layerdetails' ld.depends_on.id %}" > {{ld.depends_on.layer.name}}< / a >
< span class = "icon-trash " data-toggle = "tooltip" title = "Delete" > < / span >
< / li >
< / span >
{% endfor %}
< / ul >
< div class = "input-append add-deps" >
< input type = "text" autocomplete = "off" data-minLength = "1" data-autocomplete = "off" placeholder = "Type a layer name" id = "layer-dep-input" >
< a class = "btn" type = "button" id = "add-layer-dependency-btn" disabled >
Add layer
< / a >
< / div >
< span class = "help-block add-deps" > You can only add layers Toaster knows about< / span >
< / dd >
< / dl >
< / div >
<!-- targets tab -->
< div name = "targets" id = "targets" class = "tab-pane" >
{% if total_targets == 0 %}
< div class = "alert alert-info" >
2015-01-26 13:42:44 +00:00
There is no target information for the < strong > {{layerversion.layer.name}} < / strong > layer.
2015-01-14 12:46:52 +00:00
< / div >
{% else %}
< div class = "row-fluid" >
{% if targets.paginator.count == 0 %}
< div class = "alert" >
< h3 > No targets found< / h3 >
{% endif %}
{# only show the search form if we have more than 10 results #}
{% if targets.paginator.count > 10 or request.GET.targets_search %}
{% if targets.paginator.count == 0 %}
< form class = "input-append" >
{% else %}
< form class = "navbar-search input-append pull-left" >
{% endif %}
< input type = "text" id = "target-search" name = "targets_search" placeholder = "Search targets" class = "input-xlarge" value = "{{request.GET.targets_search}}" >
{% if request.GET.targets_search %}
2015-01-26 15:37:30 +00:00
< a class = "add-on btn target-search-clear" >
2015-01-14 12:46:52 +00:00
< i class = "icon-remove" > < / i >
< / a >
{% endif %}
< button type = "submit" class = "btn" > Search< / button >
2015-01-26 15:37:30 +00:00
{% if targets.paginator.count == 0 %}
< button type = "submit" class = "btn btn-link target-search-clear" > Show all targets< / a >
{% endif %}
2015-01-14 12:46:52 +00:00
< / form >
{% endif %}
{% if targets.paginator.count == 0 %}
<!-- end alert -->
< / div >
<!-- end row - fluid -->
< / div >
{% else %}
2015-01-26 16:02:24 +00:00
{% if total_targets > 10 %}
2015-01-14 12:46:52 +00:00
< div class = "pull-right" >
< span class = "help-inline" style = "padding-top:5px;" > Show rows:< / span >
< select style = "margin-top:5px;margin-bottom:0px;" class = "pagesize" >
{% with "10 25 50 100 150" as list%}
{% for i in list.split %}
{% if request.session.limit == i %}
< option value = "{{i}}" selected > {{i}}< / option >
{% else %}
< option value = "{{i}}" > {{i}}< / option >
{% endif %}
{% endfor %}
{% endwith %}
< / select >
< / div >
2015-01-26 16:02:24 +00:00
{% endif %}
2015-01-14 12:46:52 +00:00
< / div >
< table class = "table table-bordered table-hover" >
< thead >
< tr >
< th >
< i class = "icon-question-sign get-help" title = "Information about a single piece of software, including where to download the source, configuration options, how to compile the source files and how to package the compiled output" > < / i >
Target
{% if request.GET.targets_search %}
< span class = "badge badge-info" > {{targets.paginator.count}}< / span >
{% endif %}
< / th >
< th >
< i class = "icon-question-sign get-help" title = "The recipe version and revision" > < / i >
Target version
< / th >
< th class = "span4" > Description< / th >
2015-01-26 15:48:45 +00:00
< th class = "span2" > Build target< / th >
2015-01-14 12:46:52 +00:00
< / tr >
< / thead >
< tbody >
{% for target in targets %}
< tr >
< td >
{{target.name}}
{% if target.up_id %}
2015-01-26 16:37:05 +00:00
< a href = "{{target.get_layersource_view_url}}" class = "icon-share get-info" target = "_blank" > < / a >
2015-01-14 12:46:52 +00:00
{% endif %}
< / td >
< td > {{target.version}}< / td >
< td > {{target.summary}}< / td >
2015-01-26 16:08:35 +00:00
< td > < button class = "btn btn-block build-target-btn" data-target-name = "{{target.name}}" { % if layer_in_project = = 0 % } disabled = "disabled" { % endif % } > Build target< / button > < / td >
2015-01-14 12:46:52 +00:00
< / tr >
{% endfor %}
< / tbody >
< / table >
2015-01-26 16:02:24 +00:00
{% if total_targets > 10 %}
2015-01-14 12:46:52 +00:00
<!-- Show pagination controls -->
< div class = "pagination" >
< ul >
{%if targets.has_previous %}
< li > < a href = "?tpage={{targets.previous_page_number}}{{request.GET.limit}}#targets" > « < / a > < / li >
{%else%}
< li class = "disabled" > < a href = "#" > « < / a > < / li >
{%endif%}
{% for i in targets.paginator.page_range %}
< li { % if i = = targets . number % } class = "active" { % endif % } > < a href = "?tpage={{i}}#targets" > {{i}}< / a > < / li >
{% endfor %}
{%if targets.has_next%}
< li > < a href = "?tpage={{targets.next_page_number}}#targets" > » < / a > < / li >
{%else%}
< li class = "disabled" > < a href = "#" > » < / a > < / li >
{%endif%}
< / ul >
< div class = "pull-right" >
2015-01-26 17:29:02 +00:00
< span class = "help-inline" style = "padding-bottom:10px;" > Show rows:< / span >
< select class = "pagesize" >
2015-01-14 12:46:52 +00:00
{% with "10 25 50 100 150" as list%}
{% for i in list.split %}
{% if request.session.limit == i %}
< option value = "{{i}}" selected > {{i}}< / option >
{% else %}
< option value = "{{i}}" > {{i}}< / option >
{% endif %}
{% endfor %}
{% endwith %}
< / select >
< / div >
< / div >
{% endif %}
{% endif %}
2015-01-26 16:02:24 +00:00
{% endif %}
2015-01-14 12:46:52 +00:00
< / div >
< div name = "machines" id = "machines" class = "tab-pane" >
{% if total_machines == 0 %}
< div class = "alert alert-info" >
2015-01-26 13:42:44 +00:00
There is no machine information for the < strong > {{layerversion.layer.name}}< / strong > layer.
2015-01-14 12:46:52 +00:00
< / div >
{% else %}
< div class = "row-fluid" >
{% if machines.paginator.count == 0 %}
< div class = "alert" >
< h3 > No machines found< / h3 >
{% endif %}
{# only show the search form if we have more than 10 results #}
{% if machines.paginator.count > 10 or request.GET.machines_search %}
{% if machines.paginator.count == 0 %}
< form class = "input-append" >
{% else %}
< form class = "navbar-search input-append pull-left" >
{% endif %}
< input type = "text" id = "machine-search" name = "machines_search" placeholder = "Search machines" class = "input-xlarge" value = "{{request.GET.machines_search}}" >
{% if request.GET.machines_search %}
2015-01-26 15:37:30 +00:00
< a class = "add-on btn machine-search-clear" >
2015-01-14 12:46:52 +00:00
< i class = "icon-remove" > < / i >
< / a >
{% endif %}
< button type = "submit" class = "btn" > Search< / button >
2015-01-26 15:37:30 +00:00
{% if machines.paginator.count == 0 %}
< button type = "submit" class = "btn btn-link machine-search-clear" > Show all machines< / a >
{% endif %}
2015-01-14 12:46:52 +00:00
< / form >
{% endif %}
{% if machines.paginator.count == 0 %}
<!-- end alert -->
< / div >
<!-- end row - fluid -->
< / div >
2015-01-26 16:02:24 +00:00
2015-01-14 12:46:52 +00:00
{% else %}
2015-01-26 16:02:24 +00:00
{% if total_machines > 10 %}
2015-01-14 12:46:52 +00:00
< div class = "pull-right" >
< span class = "help-inline" style = "padding-top:5px;" > Show rows:< / span >
< select style = "margin-top:5px;margin-bottom:0px;" class = "pagesize" >
{% with "10 25 50 100 150" as list%}
{% for i in list.split %}
{% if request.session.limit == i %}
< option value = "{{i}}" selected > {{i}}< / option >
{% else %}
< option value = "{{i}}" > {{i}}< / option >
{% endif %}
{% endfor %}
{% endwith %}
< / select >
< / div >
2015-01-26 16:02:24 +00:00
{% endif %}
2015-01-14 12:46:52 +00:00
< / div >
< table class = "table table-bordered table-hover" >
< thead >
< tr >
< th >
< i class = "icon-question-sign get-help" title = "The machine is the hardware for which you are building" > < / i >
Machine
{% if request.GET.machines_search %}
< span class = "badge badge-info" > {{machines.paginator.count}}< / span >
{% endif %}
< / th >
< th > Description< / th >
2015-01-26 15:48:45 +00:00
< th class = "span2" > Select machine< / th >
2015-01-14 12:46:52 +00:00
< / tr >
< / thead >
< tbody >
{% for machine in machines %}
< tr >
< td > {{machine.name}}< / td >
< td > {{machine.description}}< / td >
< td > < button class = "btn btn-block select-machine-btn" data-machine-name = "{{machine.name}}" { % if layer_in_project = = 0 % } disabled = "disabled" { % endif % } } > Select machine< / button > < / td >
< / tr >
{% endfor %}
< / tbody >
< / table >
2015-01-26 16:02:24 +00:00
{% if total_machines > 10 %}
2015-01-14 12:46:52 +00:00
<!-- Show pagination controls -->
< div class = "pagination" >
< ul >
{%if machines.has_previous %}
< li > < a href = "?mpage={{machines.previous_page_number}}{{request.GET.limit}}#machines" > « < / a > < / li >
{%else%}
< li class = "disabled" > < a href = "#" > « < / a > < / li >
{%endif%}
{% for i in machines.paginator.page_range %}
< li { % if i = = machines . number % } class = "active" { % endif % } > < a href = "?mpage={{i}}#machines" > {{i}}< / a > < / li >
{% endfor %}
{%if machines.has_next%}
< li > < a href = "?mpage={{machines.next_page_number}}#machines" > » < / a > < / li >
{%else%}
< li class = "disabled" > < a href = "#" > » < / a > < / li >
{%endif%}
< / ul >
< div class = "pull-right" >
2015-01-26 17:29:02 +00:00
< span class = "help-inline" style = "padding-bottom:10px;" > Show rows:< / span >
< select class = "pagesize" >
2015-01-14 12:46:52 +00:00
{% with "10 25 50 100 150" as list%}
{% for i in list.split %}
{% if request.session.limit == i %}
< option value = "{{i}}" selected > {{i}}< / option >
{% else %}
< option value = "{{i}}" > {{i}}< / option >
{% endif %}
{% endfor %}
{% endwith %}
< / select >
< / div >
< / div >
{% endif %}
{% endif %}
2015-01-26 16:02:24 +00:00
{% endif %}
2015-01-14 12:46:52 +00:00
< / div >
< / div >
< / div >
2015-01-26 12:17:18 +00:00
< div class = "row-fluid span4 well" >
2015-01-14 12:46:52 +00:00
< h2 > About {{layerversion.layer.name}}< / h2 >
2015-01-14 17:27:00 +00:00
< dl class = "item-info" >
2015-01-14 12:46:52 +00:00
< dt >
Summary
< i class = "icon-question-sign get-help" title = "One-line description of the layer" > < / i >
< / dt >
< dd >
< span class = "muted" style = "display:none" > Not set< / span >
< span class = "current-value" > {{layerversion.layer.summary}}< / span >
< form style = "display:none; margin-bottom:20px" >
< textarea class = "span12" rows = "2" > {% if layerversion.layer.summary %}{{layerversion.layer.summary}}{% endif %}< / textarea >
< button class = "btn change-btn" data-layer-prop = "summary" type = "button" > Save< / button >
< a href = "#" class = "btn btn-link cancel" > Cancel< / a >
< / form >
< i class = "icon-pencil" > < / i >
< span class = "icon-trash delete-current-value" data-toggle = "tooltip" title = "Delete" > < / span >
< / dd >
< dt >
Description
< / dt >
< dd >
< span class = "muted" style = "display:none" > Not set< / span >
< span class = "current-value" > {{layerversion.layer.description}}< / span >
< form style = "display:none; margin-bottom:20px" >
< textarea class = "span12" rows = "6" > {% if layerversion.layer.description %}{{layerversion.layer.description}}{% endif %}< / textarea >
< button class = "btn change-btn" data-layer-prop = "description" type = "button" > Save< / button >
< a href = "#" class = "btn btn-link cancel" > Cancel< / a >
< / form >
< i class = "icon-pencil" > < / i >
< span class = "icon-trash delete-current-value" data-toggle = "tooltip" title = "Delete" > < / span >
< / dd >
< / dd >
{% if layerversion.layer.up_id %}
< dt > Layer index< / dt >
< dd >
< a href = "http://layers.openembedded.org/layerindex/branch/{{layerversion.up_branch.name}}/layer/{{layerversion.layer.name}}" / > layer index link< / a >
< / dd >
{% endif %}
2014-08-29 15:42:00 +00:00
2015-01-14 12:46:52 +00:00
< / dl >
< / div >
2014-08-29 15:42:00 +00:00
{% endblock %}