blob: 82be3703b6ee88e146671fe0ed1fd9e1941297fd [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001{% extends "base.html" %}
2{% load projecttags %}
3{% load humanize %}
4{% load static %}
5
Patrick Williamsf1e5d692016-03-30 15:21:19 -05006{% block title %} {{layerversion.layer.name}} - {{project.name}} - Toaster {% endblock %}
Patrick Williamsc124f4f2015-09-15 14:41:29 -05007{% block pagecontent %}
8
9<div class="section">
10 <ul class="breadcrumb">
Patrick Williamsc124f4f2015-09-15 14:41:29 -050011 <li>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050012 <a href="{% url 'project' project.id %}">{{project.name}}</a>
Patrick Williamsc124f4f2015-09-15 14:41:29 -050013 <span class="divider">&rarr;</span>
14 </li>
15 <li><a href="{% url 'projectlayers' project.id %}">Compatible layers</a>
16 <span class="divider">&rarr;</span>
17 </li>
18 <li class="active">
19 {{layerversion.layer.name}} ({{layerversion.get_vcs_reference|truncatechars:13}})
20 </li>
21 </ul>
22</div>
23
24{# If this is not an imported layer then hide the edit ui #}
25{% if not layerversion.layer_source_id or layerversion.layer_source.sourcetype != layerversion.layer_source.TYPE_IMPORTED %}
26<style scoped>
27 .icon-pencil {
28 display:none;
29 }
30.delete-current-value{
31 display: none;
32}
33 li .icon-trash {
34 display:none;
35 }
36 .add-deps {
37 display:none;
38 }
39</style>
40{% endif %}
41
42
43<script src="{% static 'js/layerdetails.js' %}"></script>
44<script>
45
46 $(document).ready(function (){
47 var ctx = {
Patrick Williamsc124f4f2015-09-15 14:41:29 -050048 xhrUpdateLayerUrl : "{% url 'xhr_updatelayer' %}",
49 layerVersion : {
50 name : "{{layerversion.layer.name}}",
51 id : {{layerversion.id}},
52 commit: "{{layerversion.get_vcs_reference}}",
53 {%if layerversion.id in projectlayers %}
54 inCurrentPrj : true,
55 {% else %}
56 inCurrentPrj : false,
57 {% endif %}
58 layerdetailurl : "{% url 'layerdetails' project.id layerversion.id %}",
59 sourceId: {{layerversion.layer_source_id|json}},
60 }
61 };
62
63 try {
64 layerDetailsPageInit(ctx);
65 } catch (e) {
66 document.write("Sorry, An error has occurred loading this page");
67 console.warn(e);
68 }
69 });
70</script>
71
72<div class="row-fluid span11">
73 <div class="page-header">
74 <h1>{{layerversion.layer.name}} <small class="commit"
75 {% if layerversion.get_vcs_reference|length > 13 %}
76 data-toggle="tooltip" title="{{layerversion.get_vcs_reference}}"
77 {% endif %}>
78 ({{layerversion.get_vcs_reference|truncatechars:13}})</small></h1>
79 </div>
80</div>
81
82<!-- container for tabs -->
83<div class="row-fluid span7 tabbable">
84 <div class="alert alert-info lead" id="alert-area" style="display:none">
85 <button type="button" class="close" id="dismiss-alert">&times;</button>
86 <span id="alert-msg"></span>
87 </div>
88 <ul class="nav nav-pills">
89 <li class="active">
90 <a data-toggle="tab" href="#information" id="details-tab">Layer details</a>
91 </li>
92 <li>
93 <a data-toggle="tab" href="#recipes" class="muted" id="targets-tab">Recipes (<span class="table-count-recipestable"></span>)</a>
94 </li>
95 <li>
96 <a data-toggle="tab" href="#machines" class="muted" id="machines-tab">Machines (<span class="table-count-machinestable"></span>)</a>
97 </li>
98 </ul>
99 <div class="tab-content">
100 <span class="button-place">
101 {% if layerversion.id not in projectlayers %}
102 <button id="add-remove-layer-btn" data-directive="add" class="btn btn-large btn-block">
103 <span class="icon-plus"></span>
104 Add the {{layerversion.layer.name}} layer to your project
105 </button>
106 {% else %}
107 <button id="add-remove-layer-btn" data-directive="remove" class="btn btn-block btn-large btn-danger">
108 <span class="icon-trash"></span>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500109 Remove the {{layerversion.layer.name}} layer from your project
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500110 </button>
111 {% endif %}
112 </span>
113
114 <!-- layer details pane -->
115 <div id="information" class="tab-pane active">
116 <dl class="dl-horizontal">
117 <dt class="">
118 <i class="icon-question-sign get-help" title="Fetch/clone URL of the repository"></i>
119 Repository URL
120 </dt>
121 <dd>
122 <span class="current-value">{{layerversion.layer.vcs_url}}</span>
123 {% if layerversion.get_vcs_link_url %}
124 <a href="{{layerversion.get_vcs_link_url}}/" class="icon-share get-info" target="_blank"></a>
125 {% endif %}
126 <form id="change-repo-form" class="control-group" style="display:none">
127 <div class="input-append">
128 <input type="text" class="input-xlarge" value="{{layerversion.layer.vcs_url}}">
129 <button data-layer-prop="vcs_url" class="btn change-btn" type="button">Save</button>
130 <a href="#" style="display:none" class="btn btn-link cancel">Cancel</a>
131 </div>
132 </form>
133 <i class="icon-pencil" ></i>
134 </dd>
135 <dt>
136 <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>
137 Repository subdirectory
138 </dt>
139 <dd>
140 <span class="muted" style="display:none">Not set</span>
141 <span class="current-value">{{layerversion.dirpath}}</span>
142 {% if layerversion.get_vcs_dirpath_link_url %}
143 <a href="{{layerversion.get_vcs_dirpath_link_url}}" class="icon-share get-info" target="_blank"></a>
144 {% endif %}
145 <form id="change-subdir-form" style="display:none;">
146 <div class="input-append">
147 <input type="text" value="{{layerversion.dirpath}}">
148 <button data-layer-prop="dirpath" class="btn change-btn" type="button">Save</button>
149 <a href="#" style="display:none" class="btn btn-link cancel">Cancel</a>
150 </div>
151 </form>
152 <i id="change-subdir" class="icon-pencil"></i>
153 <span class="icon-trash delete-current-value" data-toggle="tooltip" title="Delete"></span>
154 </dd>
155 <dt>
156 <i class="icon-question-sign get-help" title="The Git branch, tag or commit"></i>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500157 Git revision
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500158 </dt>
159 <dd>
160 <span class="current-value">{{layerversion.get_vcs_reference}}</span>
161 <form style="display:none;">
162 <div class="input-append">
163 <input type="text" value="{{layerversion.get_vcs_reference}}">
164 <button data-layer-prop="commit" class="btn change-btn" type="button">Save</button>
165 <a href="#" style="display:none" class="btn btn-link cancel">Cancel</a>
166 </div>
167 </form>
168 <i class="icon-pencil"></i>
169 </dd>
170 <dt>
171 <i class="icon-question-sign get-help" title="Other layers this layer depends upon"></i>
172 Layer dependencies
173 </dt>
174 <dd>
175 <ul class="unstyled current-value" id="layer-deps-list">
176 {% for ld in layerversion.dependencies.all %}
177 <li data-layer-id="{{ld.depends_on.id}}">
178 <a data-toggle="tooltip" title="{{ld.depends_on.layer.vcs_url}} | {{ld.depends_on.get_vcs_reference}}" href="{% url 'layerdetails' project.id ld.depends_on.id %}">{{ld.depends_on.layer.name}}</a>
179 <span class="icon-trash " data-toggle="tooltip" title="Delete"></span>
180 </li>
181 {% endfor %}
182 </ul>
183 <div class="input-append add-deps">
184 <input type="text" autocomplete="off" data-minLength="1" data-autocomplete="off" placeholder="Type a layer name" id="layer-dep-input">
185 <a class="btn" id="add-layer-dependency-btn" >
186 Add layer
187 </a>
188 </div>
189 <span class="help-block add-deps">You can only add layers Toaster knows about</span>
190 </dd>
191 </dl>
192 </div>
193 <!-- end layerdetails tab -->
194 <!-- targets tab -->
195 <div id="recipes" class="tab-pane">
196 <!-- Recipe table -->
197 <div id="no-recipes-yet" class="alert alert-info" style="display:none">
198 <p>Toaster does not have recipe information for the <strong> {{layerversion.layer.name}} </strong> layer.</p>
199 <p>Toaster learns about layers when you build them. If this layer provides any recipes, they will be listed here after you build the <strong> {{layerversion.layer.name}} </strong> layer.</p>
200 </div>
201
202
203
204 {% url 'layerrecipestable' project.id layerversion.id as xhr_table_url %}
205 {% with "recipestable" as table_name %}
206 {% with "Recipes" as title %}
207 {% include 'toastertable-simple.html' %}
208 {% endwith %}
209 {% endwith %}
210 </div>
211
212 <div id="machines" class="tab-pane">
213
214 <div id="no-machines-yet" class="alert alert-info" style="display:none">
215 <p>Toaster does not have machine information for the <strong> {{layerversion.layer.name}} </strong> layer.</p>
216 <p>Toaster learns about layers when you build them. If this layer provides any machines, they will be listed here after you build the <strong> {{layerversion.layer.name}} </strong> layer.</p>
217 </div>
218
219
220 <!-- Machines table -->
221 {% url 'layermachinestable' project.id layerversion.id as xhr_table_url %}
222 {% with "machinestable" as table_name %}
223 {% with "Machines" as title %}
224 {% include 'toastertable-simple.html' %}
225 {% endwith %}
226 {% endwith %}
227 </div>
228 </div> <!-- end tab content -->
229 </div> <!-- end tabable -->
230
231 <div class="row-fluid span4 well"> <!-- info side panel -->
232 <h2>About {{layerversion.layer.name}}</h2>
233 <dl class="item-info">
234
235 <dt>
236 Summary
237 <i class="icon-question-sign get-help" title="One-line description of the layer"></i>
238 </dt>
239 <dd>
240 <span class="muted" style="display:none">Not set</span>
241 <span class="current-value">{{layerversion.layer.summary|default_if_none:''}}</span>
242 <form style="display:none; margin-bottom:20px">
243 <textarea class="span12" rows="2">{% if layerversion.layer.summary %}{{layerversion.layer.summary}}{% endif %}</textarea>
244 <button class="btn change-btn" data-layer-prop="summary" type="button">Save</button>
245 <a href="#" class="btn btn-link cancel">Cancel</a>
246 </form>
247 <i class="icon-pencil"></i>
248 <span class="icon-trash delete-current-value" data-toggle="tooltip" title="Delete"></span>
249 </dd>
250 <dt>
251 Description
252 </dt>
253 <dd>
254 <span class="muted" style="display:none">Not set</span>
255 <span class="current-value">{{layerversion.layer.description|default_if_none:''}}</span>
256 <form style="display:none; margin-bottom:20px">
257 <textarea class="span12" rows="6">{% if layerversion.layer.description %}{{layerversion.layer.description}}{% endif %}</textarea>
258 <button class="btn change-btn" data-layer-prop="description" type="button" >Save</button>
259 <a href="#" class="btn btn-link cancel">Cancel</a>
260 </form>
261 <i class="icon-pencil"></i>
262 <span class="icon-trash delete-current-value" data-toggle="tooltip" title="Delete"></span>
263 </dd>
264 {% if layerversion.layer.up_id %}
265 <dt>Layer index</dt>
266 <dd>
267 <a href="http://layers.openembedded.org/layerindex/branch/{{layerversion.up_branch.name}}/layer/{{layerversion.layer.name}}">layer index link</a>
268
269 </dd>
270 {% endif %}
271
272 </dl>
273 </div>
274
275 {% endblock %}