diff options
| author | Michael Wood <michael.g.wood@intel.com> | 2014-11-28 20:12:18 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-12-18 10:24:07 +0000 |
| commit | 1605cd37dbfcd75043f57dd527e0bfc0a79e1e78 (patch) | |
| tree | 505bf86cdde6993010c5a153d153b3206ab98cf2 /bitbake/lib/toaster/toastergui/templates/importlayer.html | |
| parent | 13141af70813d84b27e41d7a6e5792c748b3ae90 (diff) | |
| download | poky-1605cd37dbfcd75043f57dd527e0bfc0a79e1e78.tar.gz | |
bitbake: toaster: Add import layer feature.
This feature allows users to import layers from git into their current
project and associate it with the release of the current project and the
dependencies for the newly imported layer with existing layers.
It will also resolve the child dependencies of the dependencies added.
[YOCTO #6595]
(Bitbake rev: 017f5c746e894f9d87d927c848386459ea332378)
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates/importlayer.html')
| -rw-r--r-- | bitbake/lib/toaster/toastergui/templates/importlayer.html | 109 |
1 files changed, 78 insertions, 31 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/importlayer.html b/bitbake/lib/toaster/toastergui/templates/importlayer.html index 7e48eac66e..913f951c28 100644 --- a/bitbake/lib/toaster/toastergui/templates/importlayer.html +++ b/bitbake/lib/toaster/toastergui/templates/importlayer.html | |||
| @@ -1,68 +1,115 @@ | |||
| 1 | {% extends "baseprojectpage.html" %} | 1 | {% extends "baseprojectpage.html" %} |
| 2 | {% load projecttags %} | 2 | {% load projecttags %} |
| 3 | {% load humanize %} | 3 | {% load humanize %} |
| 4 | {% load static %} | ||
| 4 | 5 | ||
| 5 | {% block localbreadcrumb %} | 6 | {% block localbreadcrumb %} |
| 6 | <li>Layers</li> | 7 | <li>Import layer</li> |
| 7 | {% endblock %} | 8 | {% endblock %} |
| 8 | 9 | ||
| 9 | {% block projectinfomain %} | 10 | {% block projectinfomain %} |
| 11 | |||
| 12 | <script src="{% static 'js/importlayer.js' %}"></script> | ||
| 13 | <script> | ||
| 14 | $(document).ready(function (){ | ||
| 15 | var ctx = {}; | ||
| 16 | ctx.xhrDataTypeaheadUrl = "{% url 'xhr_datatypeahead' %}"; | ||
| 17 | ctx.layerDetailsUrl = "{% url 'layerdetails' %}"; | ||
| 18 | ctx.xhrImportLayerUrl = "{% url 'xhr_importlayer' %}"; | ||
| 19 | ctx.xhrEditProjectUrl = "{% url 'xhr_projectedit' project.id %}"; | ||
| 20 | ctx.projectPageUrl = "{% url 'project' project.id %}"; | ||
| 21 | ctx.projectId = {{project.id}}; | ||
| 22 | |||
| 23 | try { | ||
| 24 | importLayerPageInit(ctx); | ||
| 25 | } catch(e) { | ||
| 26 | document.write(e.stack); | ||
| 27 | console.log(e); | ||
| 28 | } | ||
| 29 | }); | ||
| 30 | </script> | ||
| 31 | |||
| 10 | <div class="page-header"> | 32 | <div class="page-header"> |
| 11 | <h1>Import layer</h1> | 33 | <h1>Import layer</h1> |
| 12 | </div> | 34 | </div> |
| 35 | |||
| 36 | {% include "layers_dep_modal.html" %} | ||
| 13 | <form> | 37 | <form> |
| 14 | {% if project %} | 38 | {% if project %} |
| 15 | <span class="help-block" style="padding-left:19px;">The layer you are importing must be compatible with {{project.release.name}} ({{project.release.description}}), which is the release you are using in this project.</span> | 39 | <span class="help-block" style="padding-left:19px;">The layer you are importing must be compatible with {{project.release.name}} ({{project.release.description}}), which is the release you are using in this project.</span> |
| 16 | {% endif %} | 40 | {% endif %} |
| 17 | <fieldset class="air"> | 41 | <fieldset class="air"> |
| 18 | <legend>Layer repository information</legend> | 42 | <legend>Layer repository information</legend> |
| 43 | <div class="alert alert-error" id="import-error" style="display:none"> | ||
| 44 | <button type="button" class="close" data-dismiss="alert">×</button> | ||
| 45 | <h3></h3> | ||
| 46 | <span></span> | ||
| 47 | <ul></ul> | ||
| 48 | </div> | ||
| 49 | |||
| 50 | <div class="control-group" id="layer-name-ctrl"> | ||
| 51 | <label class="control-label" for="layer-name"> | ||
| 52 | Layer name | ||
| 53 | <span class="icon-question-sign get-help" title="Something like 'meta-mylayer'. Your layer name must be unique and can only include letters, numbers and dashes" /> | ||
| 54 | </label> | ||
| 55 | <div class="controls"> | ||
| 56 | <input id="layer-name" type="text" required autofocus> | ||
| 57 | <span class="help-inline" style="display: none;" id="invalid-layer-name-hint">A valid layer name can only include letters, numbers and dashes</span> | ||
| 58 | <span class="help-inline" style="display: none;" id="duplicated-layer-name-hint"></span> | ||
| 59 | </div> | ||
| 60 | |||
| 61 | </div> | ||
| 62 | |||
| 19 | <label> | 63 | <label> |
| 20 | Git repository URL | 64 | Git repository URL |
| 21 | <i class="icon-question-sign get-help" title="Fetch/clone URL of the repository. Currently, Toaster only supports Git repositories."></i> | 65 | <span class="icon-question-sign get-help" title="Fetch/clone URL of the repository. Currently, Toaster only supports Git repositories." /> |
| 22 | </label> | 66 | </label> |
| 23 | <input id="repo" type="text" class="input-xxlarge" required> | 67 | |
| 24 | <label class="project-form"> | 68 | <input type="text" id="layer-git-repo-url" class="input-xxlarge" required> |
| 69 | <label class="project-form" for="layer-subdir"> | ||
| 25 | Repository subdirectory | 70 | Repository subdirectory |
| 26 | <span class="muted">(optional)</span> | 71 | <span class="muted">(optional)</span> |
| 27 | <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> | 72 | <span 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)" /> |
| 28 | </label> | ||
| 29 | <input type="text" id="subdir"> | ||
| 30 | <label class="project-form">Branch, tag or commit</label> | ||
| 31 | <input type="text" class="span4" id="layer-version" required> | ||
| 32 | <label class="project-form"> | ||
| 33 | Layer name | ||
| 34 | <i class="icon-question-sign get-help" title="Something like 'meta-mylayer'. Your layer name must be unique and can only include letters, numbers and dashes"></i> | ||
| 35 | </label> | 73 | </label> |
| 36 | <input id="layer-name" type="text" required> | 74 | <input type="text" id="layer-subdir"> |
| 75 | |||
| 76 | <div class="control-group" id="layer-revision-ctrl"> | ||
| 77 | <label class="control-label" for="layer-git-ref">Revision | ||
| 78 | <span class="icon-question-sign get-help" title="You can provide a Git branch, a tag or a commit SHA as the revision"></span> | ||
| 79 | </label> | ||
| 80 | <div class="controls"> | ||
| 81 | <input type="text" class="span4" id="layer-git-ref" required> | ||
| 82 | <span class="help-inline" style="diaply:none;" id="invalid-layer-revision-hint"></span> | ||
| 83 | </div> | ||
| 84 | </div> | ||
| 85 | |||
| 86 | <label class="project-form" for="layer-description">Layer description | ||
| 87 | <span class="muted">(optional)</span> | ||
| 88 | <span class="icon-question-sign get-help" title="Short description for for the layer" /> | ||
| 89 | </label> | ||
| 90 | <input id="layer-description" type="text" class="input-xxlarge" /> | ||
| 91 | |||
| 37 | </fieldset> | 92 | </fieldset> |
| 38 | <fieldset class="air"> | 93 | <fieldset class="air"> |
| 39 | <legend> | 94 | <legend> |
| 40 | Layer dependencies | 95 | Layer dependencies |
| 41 | <span class="muted">(optional)</span> | 96 | <span class="muted">(optional)</span> |
| 42 | <i class="icon-question-sign get-help heading-help" title="Other layers this layer depends upon"></i> | 97 | <span class="icon-question-sign get-help heading-help" title="Other layers this layer depends upon" /> |
| 43 | </legend> | 98 | </legend> |
| 44 | <ul class="unstyled configuration-list"> | 99 | <ul class="unstyled configuration-list" id="layer-deps-list"> |
| 45 | <li> | ||
| 46 | <a href="" class="layer-info" title="OpenEmbedded | daisy">openembedded-core (meta)</a> | ||
| 47 | <i class="icon-trash"></i> | ||
| 48 | </li> | ||
| 49 | </ul> | 100 | </ul> |
| 50 | <div class="input-append"> | 101 | <div class="input-append"> |
| 51 | <input type="text" autocomplete="off" data-minLength="1" data-autocomplete="off" | 102 | <input type="text" autocomplete="off" data-minLength="1" data-autocomplete="off" data-provide="typeahead" placeholder="Type a layer name" id="layer-dependency" class="input-xlarge"> |
| 52 | data-provide="typeahead" data-source=' | 103 | <a class="btn" type="button" id="add-layer-dependency-btn" disabled> |
| 53 | [] | ||
| 54 | ' placeholder="Type a layer name" id="layer-dependency" class="input-xlarge"> | ||
| 55 | <a class="btn" type="button" id="add-layer-dependency" disabled> | ||
| 56 | Add layer | 104 | Add layer |
| 57 | </a> | 105 | </a> |
| 58 | </div> | 106 | </div> |
| 59 | <span class="help-inline">You can only add layers Toaster knows about</span> | 107 | <span class="help-inline">You can only add layers Toaster knows about</span> |
| 60 | </fieldset> | 108 | </fieldset> |
| 61 | <div class="form-actions"> | 109 | <div class="form-actions" id="form-actions"> |
| 62 | <a href="#dependencies-message" class="btn btn-primary btn-large" data-toggle="modal" data-target="#dependencies-message" disabled>Import and add to project</a> | 110 | <button class="btn btn-primary btn-large" data-toggle="modal" id="import-and-add-btn" data-target="#dependencies-message" disabled>Import and add to project</button> |
| 63 | <a href="layer-details-just-imported.html" class="btn btn-large" disabled>Just import for the moment</a> | 111 | <span class="help-inline" id="import-and-add-hint" style="vertical-align: middle;">To import a layer, you need to enter a repository URL, a branch, tag or commit and a layer name</span> |
| 64 | <span class="help-inline" style="vertical-align: middle;">To import a layer, you need to enter a repository URL, a branch, tag or commit and a layer name</span> | ||
| 65 | </div> | 112 | </div> |
| 66 | </form> | 113 | </form> |
| 67 | 114 | ||
| 68 | {% endblock %} | 115 | {% endblock %} |
