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