diff options
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates/importlayer.html')
| -rw-r--r-- | bitbake/lib/toaster/toastergui/templates/importlayer.html | 260 |
1 files changed, 129 insertions, 131 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/importlayer.html b/bitbake/lib/toaster/toastergui/templates/importlayer.html index 1848f410e6..dd81f2f379 100644 --- a/bitbake/lib/toaster/toastergui/templates/importlayer.html +++ b/bitbake/lib/toaster/toastergui/templates/importlayer.html | |||
| @@ -5,135 +5,133 @@ | |||
| 5 | {% block title %} Import layer - {{project.name}} - Toaster {% endblock %} | 5 | {% block title %} Import layer - {{project.name}} - Toaster {% endblock %} |
| 6 | {% block pagecontent %} | 6 | {% block pagecontent %} |
| 7 | 7 | ||
| 8 | {% include "projecttopbar.html" %} | 8 | <div class="row"> |
| 9 | 9 | {% include "projecttopbar.html" %} | |
| 10 | 10 | {% if project and project.release %} | |
| 11 | {% if project and project.release %} | 11 | <script src="{% static 'js/layerDepsModal.js' %}"></script> |
| 12 | <script src="{% static 'js/layerDepsModal.js' %}"></script> | 12 | <script src="{% static 'js/importlayer.js' %}"></script> |
| 13 | <script src="{% static 'js/importlayer.js' %}"></script> | 13 | <script> |
| 14 | <script> | 14 | $(document).ready(function (){ |
| 15 | $(document).ready(function (){ | 15 | var ctx = { |
| 16 | var ctx = { | 16 | xhrImportLayerUrl : "{% url 'xhr_importlayer' %}", |
| 17 | xhrImportLayerUrl : "{% url 'xhr_importlayer' %}", | 17 | }; |
| 18 | }; | 18 | |
| 19 | 19 | try { | |
| 20 | try { | 20 | importLayerPageInit(ctx); |
| 21 | importLayerPageInit(ctx); | 21 | } catch (e) { |
| 22 | } catch (e) { | 22 | document.write("Sorry, An error has occurred loading this page"); |
| 23 | document.write("Sorry, An error has occurred loading this page"); | 23 | console.warn(e); |
| 24 | console.warn(e); | 24 | } |
| 25 | } | 25 | }); |
| 26 | }); | 26 | </script> |
| 27 | </script> | 27 | |
| 28 | 28 | <form class="col-md-11"> | |
| 29 | <form class="span11"> | 29 | <fieldset> |
| 30 | <fieldset> | 30 | <h2>Layer repository information</h2> |
| 31 | <legend>Layer repository information</legend> | 31 | <span class="help-block">The layer you are importing must be compatible with <strong>{{project.release.description}}</strong>, which is the release you are using in this project.</span> |
| 32 | <span class="help-block">The layer you are importing must be compatible with <strong>{{project.release.description}}</strong>, which is the release you are using in this project.</span> | 32 | <div class="alert alert-error" id="import-error" style="display:none"> |
| 33 | <div class="alert alert-error" id="import-error" style="display:none"> | 33 | <button type="button" class="close" data-dismiss="alert">×</button> |
| 34 | <button type="button" class="close" data-dismiss="alert">×</button> | 34 | <h3> </h3> |
| 35 | <h3> </h3> | 35 | <p></p> |
| 36 | <p></p> | 36 | <ul></ul> |
| 37 | <ul></ul> | 37 | </div> |
| 38 | </div> | 38 | |
| 39 | 39 | <div class="form-group" id="layer-name-ctrl"> | |
| 40 | <div class="control-group" id="layer-name-ctrl"> | 40 | <label class="control-label" for="import-layer-name"> |
| 41 | <label class="control-label air" for="import-layer-name"> | 41 | Layer name |
| 42 | Layer name | 42 | <span class="glyphicon glyphicon-question-sign get-help" title="Something like 'meta-mylayer'. Your layer name must be unique and can only include letters, numbers and dashes"></span> |
| 43 | <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"></span> | 43 | </label> |
| 44 | </label> | 44 | <input class="form-control" id="import-layer-name" type="text" required autofocus data-autocomplete="off" data-provide="typeahead"> |
| 45 | <div class="controls"> | 45 | <span class="help-block" style="display: none;" id="invalid-layer-name-hint">A valid layer name can only include letters, numbers and dashes</span> |
| 46 | <input id="import-layer-name" type="text" required autofocus data-autocomplete="off" data-provide="typeahead"> | 46 | <span class="help-inline" style="display: none;" id="duplicated-layer-name-hint"></span> |
| 47 | <span class="help-inline" style="display: none;" id="invalid-layer-name-hint">A valid layer name can only include letters, numbers and dashes</span> | 47 | </div> |
| 48 | <span class="help-inline" style="display: none;" id="duplicated-layer-name-hint"></span> | 48 | |
| 49 | </div> | 49 | <div id="duplicate-layer-info" style="display:none"> |
| 50 | 50 | <div class="alert alert-warning"> | |
| 51 | </div> | 51 | <h3>A layer called <a href="" class="dup-layer-link"><span class="dup-layer-name"></span></a> already exists</h3> |
| 52 | <div id="duplicate-layer-info" style="display:none"> | 52 | <p>Layer names must be unqiue. Please use a different layer name.</p> |
| 53 | <div class="alert warning"> | 53 | <dl> |
| 54 | <h3>A layer called <a href="" class="dup-layer-link"><span class="dup-layer-name"></span></a> already exists</h3> | 54 | <dt> |
| 55 | <p>Layer names must be unqiue. Please use a different layer name.</p> | 55 | The <span class="dup-layer-name"></span> repository url is |
| 56 | </div> | 56 | </dt> |
| 57 | <dl> | 57 | <dd> |
| 58 | <dt> | 58 | <span id="dup-layer-vcs-url"></span> |
| 59 | The <span class="dup-layer-name"></span> repository url is | 59 | </dd> |
| 60 | </dt> | 60 | <dt> |
| 61 | <dd> | 61 | The <span class="dup-layer-name"></span> revision is |
| 62 | <span id="dup-layer-vcs-url"></span> | 62 | </dt> |
| 63 | </dd> | 63 | <dd> |
| 64 | 64 | <span id="dup-layer-revision"></span> | |
| 65 | <dt> | 65 | </dd> |
| 66 | The <span class="dup-layer-name"></span> revision is | 66 | </dl> |
| 67 | </dt> | 67 | <p><a href="" class="dup-layer-link">View the <span class="dup-layer-name"></span> layer information</a></p> |
| 68 | <dd> | 68 | </div> |
| 69 | <span id="dup-layer-revision"></span> | 69 | </div> |
| 70 | </dd> | 70 | |
| 71 | </dl> | 71 | <div class="fields-apart-from-layer-name"> |
| 72 | 72 | <div class="form-group"> | |
| 73 | <p><a href="" class="dup-layer-link">View the <span class="dup-layer-name"></span> layer information</a></p> | 73 | <label for="layer-git-repo-url"> |
| 74 | 74 | Git repository URL | |
| 75 | </div> | 75 | <span class="glyphicon glyphicon-question-sign get-help" title="Fetch/clone URL of the repository. Currently, Toaster only supports Git repositories." ></span> |
| 76 | 76 | </label> | |
| 77 | <div class="fields-apart-from-layer-name"> | 77 | |
| 78 | <label for="layer-git-repo-url" class="project-form"> | 78 | <input type="text" id="layer-git-repo-url" class="form-control" required> |
| 79 | Git repository URL | 79 | </div> |
| 80 | <span class="icon-question-sign get-help" title="Fetch/clone URL of the repository. Currently, Toaster only supports Git repositories." ></span> | 80 | <div class="form-group"> |
| 81 | </label> | 81 | <label for="layer-subdir"> |
| 82 | 82 | Repository subdirectory | |
| 83 | <input type="text" id="layer-git-repo-url" class="input-xxlarge" required> | 83 | <span class="text-muted">(optional)</span> |
| 84 | <label class="project-form" for="layer-subdir"> | 84 | <span class="glyphicon glyphicon-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)"></span> |
| 85 | Repository subdirectory | 85 | </label> |
| 86 | <span class="muted">(optional)</span> | 86 | <input type="text" class="form-control" id="layer-subdir"> |
| 87 | <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)"></span> | 87 | </div> |
| 88 | </label> | 88 | <div class="form-group" id="layer-revision-ctrl"> |
| 89 | <input type="text" id="layer-subdir"> | 89 | <label for="layer-git-ref">Git revision |
| 90 | 90 | <span class="glyphicon glyphicon-question-sign get-help" title="You can provide a Git branch, a tag or a commit SHA as the revision"></span> | |
| 91 | <div class="control-group" id="layer-revision-ctrl"> | 91 | </label> |
| 92 | <label class="control-label project-form" for="layer-git-ref">Git revision | 92 | <input type="text" class="form-control" id="layer-git-ref" required> |
| 93 | <span class="icon-question-sign get-help" title="You can provide a Git branch, a tag or a commit SHA as the revision"></span> | 93 | <span class="help-inline" style="diaply:none;" id="invalid-layer-revision-hint"></span> |
| 94 | </label> | 94 | </div> |
| 95 | <div class="controls"> | 95 | </div> |
| 96 | <input type="text" class="span3" id="layer-git-ref" required> | 96 | |
| 97 | <span class="help-inline" style="diaply:none;" id="invalid-layer-revision-hint"></span> | 97 | </fieldset> |
| 98 | </div> | 98 | |
| 99 | </div> | 99 | <div class="fields-apart-from-layer-name"> |
| 100 | </div> | 100 | <fieldset> |
| 101 | 101 | <h2> | |
| 102 | </fieldset> | 102 | Layer dependencies |
| 103 | 103 | <small class="text-muted">(optional)</small> | |
| 104 | <div class="fields-apart-from-layer-name"> | 104 | <span class="glyphicon glyphicon-question-sign get-help heading-help" title="Other layers this layer depends upon"></span> |
| 105 | <fieldset class="air"> | 105 | </h2> |
| 106 | <legend> | 106 | <ul class="list-unstyled lead" id="layer-deps-list"> |
| 107 | Layer dependencies | 107 | </ul> |
| 108 | <span class="muted">(optional)</span> | 108 | <div class="form-inline"> |
| 109 | <span class="icon-question-sign get-help heading-help" title="Other layers this layer depends upon"></span> | 109 | <div class="form-group"> |
| 110 | </legend> | 110 | <input type="text" autocomplete="off" data-minLength="1" data-autocomplete="off" data-provide="typeahead" placeholder="Type a layer name" id="layer-dependency" class="form-control"> |
| 111 | <ul class="unstyled configuration-list" id="layer-deps-list"> | 111 | </div> |
| 112 | </ul> | 112 | <button class="btn btn-default" id="add-layer-dependency-btn"> |
| 113 | <div class="input-append"> | 113 | Add layer |
| 114 | <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"> | 114 | </button> |
| 115 | <a class="btn" id="add-layer-dependency-btn"> | 115 | <span class="help-inline">You can only add layers Toaster knows about</span> |
| 116 | Add layer | 116 | </div> |
| 117 | </a> | 117 | </fieldset> |
| 118 | </div> | 118 | <div class="top-air" id="form-actions"> |
| 119 | <span class="help-inline">You can only add layers Toaster knows about</span> | 119 | <button class="btn btn-primary btn-lg" data-toggle="modal" id="import-and-add-btn" data-target="#dependencies-message" disabled>Import and add to project</button> |
| 120 | </fieldset> | 120 | <span class="help-inline" id="import-and-add-hint" style="vertical-align: middle;">To import a layer you need to enter a layer name, a Git repository URL and a Git revision (branch, tag or commit)</span> |
| 121 | <div class="air" id="form-actions"> | 121 | </div> |
| 122 | <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> | 122 | </div> |
| 123 | <span class="help-inline" id="import-and-add-hint" style="vertical-align: middle;">To import a layer you need to enter a layer name, a Git repository URL and a revision (branch, tag or commit)</span> | 123 | </form> |
| 124 | </div> | 124 | |
| 125 | </div> | 125 | {% else %} {#project and project release#} |
| 126 | </form> | 126 | <div class="page-header"> |
| 127 | 127 | <h1>Import layer</h1> | |
| 128 | {% else %} {#project and project release#} | 128 | </div> |
| 129 | <div class="page-header"> | 129 | <div class="alert alert-info" id="import-error" > |
| 130 | <h1>Import layer</h1> | 130 | <h3>Unsupported project type</h3> |
| 131 | </div> | 131 | <p>This project does not support importing layers.</p> |
| 132 | <div class="alert alert-info" id="import-error" > | 132 | <ul></ul> |
| 133 | <h3>Unsupported project type</h3> | 133 | </div> |
| 134 | <p>This project does not support importing layers.</p> | 134 | |
| 135 | <ul></ul> | 135 | {% endif %} |
| 136 | </div> | 136 | </div> |
| 137 | |||
| 138 | {% endif %} | ||
| 139 | {% endblock %} | 137 | {% endblock %} |
