diff options
| author | Sujith H <sujith.h@gmail.com> | 2016-08-22 16:42:28 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-09-02 18:09:49 +0100 |
| commit | d9b5d11664e849a7cbb1894062f45017a1c5998c (patch) | |
| tree | 81c2e4aa5ddaaa82bf436c0cf3384047677c9115 /bitbake/lib/toaster/toastergui | |
| parent | d2797b5ec240ab69fb6a5840a77cc5fca8837464 (diff) | |
| download | poky-d9b5d11664e849a7cbb1894062f45017a1c5998c.tar.gz | |
bitbake: toaster: add switch of git and not-git layers imported
This patch updates the layerdetails html file to
add the feature of switching imported layers between
directories and git repositories.
[YOCTO #9913]
(Bitbake rev: 70319eb690a056b41b7e91d79560067edd623ee1)
Signed-off-by: Sujith H <sujith.h@gmail.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui')
| -rw-r--r-- | bitbake/lib/toaster/toastergui/templates/layerdetails.html | 125 |
1 files changed, 101 insertions, 24 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/layerdetails.html b/bitbake/lib/toaster/toastergui/templates/layerdetails.html index 029c93b978..3e1375617d 100644 --- a/bitbake/lib/toaster/toastergui/templates/layerdetails.html +++ b/bitbake/lib/toaster/toastergui/templates/layerdetails.html | |||
| @@ -84,11 +84,16 @@ | |||
| 84 | </script> | 84 | </script> |
| 85 | 85 | ||
| 86 | <div class="page-header"> | 86 | <div class="page-header"> |
| 87 | {% if layerversion.layer.local_source_dir %} | ||
| 88 | <h1>{{layerversion.layer.name}} <small class="commit" style="display:none;"></small> | ||
| 89 | </h1> | ||
| 90 | {% else %} | ||
| 87 | <h1>{{layerversion.layer.name}} <small class="commit" | 91 | <h1>{{layerversion.layer.name}} <small class="commit" |
| 88 | {% if layerversion.get_vcs_reference|length > 13 %} | 92 | {% if layerversion.get_vcs_reference|length > 13 %} |
| 89 | data-toggle="tooltip" title="{{layerversion.get_vcs_reference}}" | 93 | data-toggle="tooltip" title="{{layerversion.get_vcs_reference}}" |
| 90 | {% endif %}>({{layerversion.get_vcs_reference|truncatechars:13}})</small> | 94 | {% endif %}>({{layerversion.get_vcs_reference|truncatechars:13}})</small> |
| 91 | </h1> | 95 | </h1> |
| 96 | {% endif %} | ||
| 92 | </div> | 97 | </div> |
| 93 | <div class="row"> | 98 | <div class="row"> |
| 94 | <!-- container for tabs --> | 99 | <!-- container for tabs --> |
| @@ -97,6 +102,21 @@ | |||
| 97 | <button type="button" class="close" id="dismiss-alert">×</button> | 102 | <button type="button" class="close" id="dismiss-alert">×</button> |
| 98 | <span id="alert-msg"></span> | 103 | <span id="alert-msg"></span> |
| 99 | </div> | 104 | </div> |
| 105 | |||
| 106 | <span class="button-place"> | ||
| 107 | {% if layerversion.id not in projectlayers %} | ||
| 108 | <button id="add-remove-layer-btn" data-directive="add" class="btn btn-default btn-lg btn-block"> | ||
| 109 | <span class="glyphicon glyphicon-plus"></span> | ||
| 110 | Add the {{layerversion.layer.name}} layer to your project | ||
| 111 | </button> | ||
| 112 | {% else %} | ||
| 113 | <button id="add-remove-layer-btn" data-directive="remove" class="btn btn-default btn-block btn-lg btn-danger"> | ||
| 114 | <span class="glyphicon glyphicon-trash"></span> | ||
| 115 | Remove the {{layerversion.layer.name}} layer from your project | ||
| 116 | </button> | ||
| 117 | {% endif %} | ||
| 118 | </span> | ||
| 119 | |||
| 100 | <ul class="nav nav-tabs"> | 120 | <ul class="nav nav-tabs"> |
| 101 | <li class="active"> | 121 | <li class="active"> |
| 102 | <a data-toggle="tab" href="#information" id="details-tab">Layer details</a> | 122 | <a data-toggle="tab" href="#information" id="details-tab">Layer details</a> |
| @@ -109,23 +129,21 @@ | |||
| 109 | </li> | 129 | </li> |
| 110 | </ul> | 130 | </ul> |
| 111 | <div class="tab-content"> | 131 | <div class="tab-content"> |
| 112 | <span class="button-place"> | ||
| 113 | {% if layerversion.id not in projectlayers %} | ||
| 114 | <button id="add-remove-layer-btn" data-directive="add" class="btn btn-default btn-lg btn-block"> | ||
| 115 | <span class="glyphicon glyphicon-plus"></span> | ||
| 116 | Add the {{layerversion.layer.name}} layer to your project | ||
| 117 | </button> | ||
| 118 | {% else %} | ||
| 119 | <button id="add-remove-layer-btn" data-directive="remove" class="btn btn-default btn-block btn-lg btn-danger"> | ||
| 120 | <span class="glyphicon glyphicon-trash"></span> | ||
| 121 | Remove the {{layerversion.layer.name}} layer from your project | ||
| 122 | </button> | ||
| 123 | {% endif %} | ||
| 124 | </span> | ||
| 125 | 132 | ||
| 126 | <!-- layer details pane --> | 133 | <!-- layer details pane --> |
| 127 | <div id="information" class="tab-pane active"> | 134 | <div id="information" class="tab-pane active"> |
| 128 | <dl class="dl-horizontal"> | 135 | {% if layerversion.layer.local_source_dir %} |
| 136 | <h3>Layer source code location</h3> | ||
| 137 | <dl class="dl-horizontal" id="directory-info"> | ||
| 138 | <dt> | ||
| 139 | Path to the layer directory | ||
| 140 | </dt> | ||
| 141 | <dd> | ||
| 142 | <code>{{layerversion.layer.local_source_dir}}</code> | ||
| 143 | </dd> | ||
| 144 | </dl> | ||
| 145 | {% else %} | ||
| 146 | <dl class="dl-horizontal" id="git-repo-info"> | ||
| 129 | <dt class=""> | 147 | <dt class=""> |
| 130 | <span class="glyphicon glyphicon-question-sign get-help" title="Fetch/clone URL of the repository"></span> | 148 | <span class="glyphicon glyphicon-question-sign get-help" title="Fetch/clone URL of the repository"></span> |
| 131 | Repository URL | 149 | Repository URL |
| @@ -139,11 +157,9 @@ | |||
| 139 | <div class="form-group"> | 157 | <div class="form-group"> |
| 140 | <input type="text" class="form-control" value="{{layerversion.layer.vcs_url}}"> | 158 | <input type="text" class="form-control" value="{{layerversion.layer.vcs_url}}"> |
| 141 | </div> | 159 | </div> |
| 142 | <button data-layer-prop="vcs_url" class="btn btn-default change-btn" type="button">Save</button> | ||
| 143 | <a href="#" style="display:none" class="btn btn-link cancel">Cancel</a> | ||
| 144 | </form> | 160 | </form> |
| 145 | <span class="glyphicon glyphicon-edit"></span> | ||
| 146 | </dd> | 161 | </dd> |
| 162 | {% if layerversion.dirpath %} | ||
| 147 | <dt> | 163 | <dt> |
| 148 | <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> | 164 | <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> |
| 149 | Repository subdirectory | 165 | Repository subdirectory |
| @@ -158,12 +174,9 @@ | |||
| 158 | <div class="form-group"> | 174 | <div class="form-group"> |
| 159 | <input type="text" class="form-control" value="{{layerversion.dirpath}}"> | 175 | <input type="text" class="form-control" value="{{layerversion.dirpath}}"> |
| 160 | </div> | 176 | </div> |
| 161 | <button data-layer-prop="dirpath" class="btn btn-default change-btn" type="button">Save</button> | ||
| 162 | <a href="#" style="display:none" class="btn btn-link cancel">Cancel</a> | ||
| 163 | </form> | 177 | </form> |
| 164 | <span id="change-subdir" class="glyphicon glyphicon-edit"></span> | ||
| 165 | <span class="glyphicon glyphicon-trash delete-current-value" data-toggle="tooltip" title="Delete"></span> | ||
| 166 | </dd> | 178 | </dd> |
| 179 | {% endif %} | ||
| 167 | <dt> | 180 | <dt> |
| 168 | <span class="glyphicon glyphicon-question-sign get-help" title="The Git branch, tag or commit"></span> | 181 | <span class="glyphicon glyphicon-question-sign get-help" title="The Git branch, tag or commit"></span> |
| 169 | Git revision | 182 | Git revision |
| @@ -174,11 +187,75 @@ | |||
| 174 | <div class="form-group"> | 187 | <div class="form-group"> |
| 175 | <input type="text" class="form-control" value="{{layerversion.get_vcs_reference}}"> | 188 | <input type="text" class="form-control" value="{{layerversion.get_vcs_reference}}"> |
| 176 | </div> | 189 | </div> |
| 177 | <button data-layer-prop="commit" class="btn btn-default change-btn" type="button">Save</button> | ||
| 178 | <a href="#" style="display:none" class="btn btn-link cancel">Cancel</a> | ||
| 179 | </form> | 190 | </form> |
| 180 | <span class="glyphicon glyphicon-edit"></i> | ||
| 181 | </dd> | 191 | </dd> |
| 192 | </dl> | ||
| 193 | {% endif %} | ||
| 194 | {% if layerversion.layer_source == layer_source.TYPE_IMPORTED %} | ||
| 195 | <button class="btn btn-default btn-lg" id="edit-layer-source" style="margin-left:220px;">Edit layer source code location</button> | ||
| 196 | {% endif %} | ||
| 197 | <form id="edit-layer-source-form" style="display:none;"> | ||
| 198 | <fieldset> | ||
| 199 | <legend class="radioLegend">Where is the layer source code?</legend> | ||
| 200 | <div class="radio"> | ||
| 201 | <label> | ||
| 202 | <input type="radio" name="source-location" id="repo" value="repo"> | ||
| 203 | In a <strong>Git repository</strong> | ||
| 204 | </label> | ||
| 205 | <p class="help-block" style="margin-left:20px;width:70%;">To build the layer Toaster must be able to access the Git repository, otherwise builds will fail. Toaster will\ | ||
| 206 | fetch and checkout your chosen Git revision every time you start a build.</p> | ||
| 207 | </div> | ||
| 208 | <div class="radio" style="margin-top:15px;"> | ||
| 209 | <label> | ||
| 210 | <input type="radio" name="source-location" id="dir" value="dir" checked> | ||
| 211 | In a <strong>directory</strong> | ||
| 212 | </label> | ||
| 213 | <p class="help-block" style="margin-left:20px;width:70%;">Use this option for quick layer development, by simply providing the path to the layer source code.</p> | ||
| 214 | </div> | ||
| 215 | </fieldset> | ||
| 216 | |||
| 217 | <fieldset id="layer-git"> | ||
| 218 | <legend>Git repository information</legend> | ||
| 219 | <div class="form-group"> | ||
| 220 | <label for="layer-git-repo-url"> | ||
| 221 | Git repository URL | ||
| 222 | <span class="glyphicon glyphicon-question-sign get-help" title="Fetch/clone URL of the repository. Currently, Toaster only supports Git repositories." ></span> | ||
| 223 | </label> | ||
| 224 | <input type="text" id="layer-git-repo-url" class="form-control"> | ||
| 225 | </div> | ||
| 226 | <div class="form-group"> | ||
| 227 | <label for="layer-subdir"> | ||
| 228 | Repository subdirectory | ||
| 229 | <span class="text-muted">(optional)</span> | ||
| 230 | <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> | ||
| 231 | </label> | ||
| 232 | <input type="text" class="form-control" id="layer-subdir"> | ||
| 233 | </div> | ||
| 234 | <div class="form-group" id="layer-revision-ctrl"> | ||
| 235 | <label for="layer-git-ref">Git revision | ||
| 236 | <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> | ||
| 237 | </label> | ||
| 238 | <input type="text" class="form-control" id="layer-git-ref"> | ||
| 239 | <span class="help-inline" style="display:none;" id="invalid-layer-revision-hint"></span> | ||
| 240 | </div> | ||
| 241 | </fieldset> | ||
| 242 | |||
| 243 | <fieldset id="layer-dir"> | ||
| 244 | <legend>Layer directory information</legend> | ||
| 245 | <div class="form-group"> | ||
| 246 | <label for="layer-dir-path"> | ||
| 247 | Enter the absolute path to the layer directory | ||
| 248 | </label> | ||
| 249 | <input type="text" id="layer-dir-path-in-details" class="form-control" value="{{layerversion.layer.local_source_dir}}" required> | ||
| 250 | </div> | ||
| 251 | </fieldset> | ||
| 252 | |||
| 253 | <div style="margin-top:25px;"> | ||
| 254 | <a href="#" class="btn btn-primary btn-lg" id="save-changes-for-switch">Save changes</a> | ||
| 255 | <a href="#" class="btn btn-link btn-lg" id="cancel-changes-for-switch">Cancel</a> | ||
| 256 | </div> | ||
| 257 | </form> | ||
| 258 | |||
| 182 | <dt> | 259 | <dt> |
| 183 | <span class="glyphicon glyphicon-question-sign get-help" title="Other layers this layer depends upon"></span> | 260 | <span class="glyphicon glyphicon-question-sign get-help" title="Other layers this layer depends upon"></span> |
| 184 | Layer dependencies | 261 | Layer dependencies |
