diff options
| author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2015-06-08 13:36:56 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-12 00:01:49 +0100 |
| commit | a8be6d4bb18232f13ffcaaf1a4137322db59fe48 (patch) | |
| tree | a5faf6af828e1ea571bf862f9c35c3d69e481d4e /bitbake/lib/toaster/toastergui/templates/project.html | |
| parent | 88dca45a703867581084d15368b7c68117b3184c (diff) | |
| download | poky-a8be6d4bb18232f13ffcaaf1a4137322db59fe48.tar.gz | |
bitbake: toastergui: remove xhr_datatypeahead and xhr_XXXbuild
We remove the endpoints for XHR on the toastergui application.
The endpoints are now replaced with calls to the respective
REST endpoints (i.e. projectlayers, projecttargets, projectmachines).
(Bitbake rev: 8e7a2c3b125a34fd9d6fa0442ab13290137ecc51)
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/project.html')
| -rw-r--r-- | bitbake/lib/toaster/toastergui/templates/project.html | 52 |
1 files changed, 36 insertions, 16 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/project.html b/bitbake/lib/toaster/toastergui/templates/project.html index e598631304..63fbc40f55 100644 --- a/bitbake/lib/toaster/toastergui/templates/project.html +++ b/bitbake/lib/toaster/toastergui/templates/project.html | |||
| @@ -30,7 +30,7 @@ vim: expandtab tabstop=2 | |||
| 30 | 30 | ||
| 31 | {%else%} | 31 | {%else%} |
| 32 | 32 | ||
| 33 | <div id="main" role="main" data-ng-app="project" data-ng-controller="prjCtrl" class="top-padded"> | 33 | <div id="main" role="main" data-ng-app="project" data-ng-controller="prjCtrl" class="top-padded" data-ng-cloak> |
| 34 | 34 | ||
| 35 | <!-- project name --> | 35 | <!-- project name --> |
| 36 | <div class="page-header"> | 36 | <div class="page-header"> |
| @@ -46,10 +46,30 @@ vim: expandtab tabstop=2 | |||
| 46 | 46 | ||
| 47 | <!-- custom templates for ng --> | 47 | <!-- custom templates for ng --> |
| 48 | 48 | ||
| 49 | <script type="text/ng-template" id="suggestion_details"> | 49 | <style> |
| 50 | <a> {[match.model.name]} {[match.model.detail]} </a> | 50 | .missing-layer { |
| 51 | color: lightgrey; | ||
| 52 | } | ||
| 53 | </style> | ||
| 54 | <script type="text/ng-template" id="recipes_suggestion_details"> | ||
| 55 | <a> {[match.model.name]} | ||
| 56 | <span data-ng-class="{'missing-layer':($parent.$parent.$parent.$parent.filterProjectLayerIds().indexOf(match.model.projectcompatible_layer.id) == -1)}"> | ||
| 57 | [{[match.model.layer_version__layer__name]}] | ||
| 58 | </span> | ||
| 59 | </a> | ||
| 51 | </script> | 60 | </script> |
| 52 | 61 | ||
| 62 | <script type="text/ng-template" id="machines_suggestion_details"> | ||
| 63 | <a> {[match.model.name]} <span class="{'missing-layer':(filterProjectLayerIds().indexOf(match.model.layer_version_compatible_id) == -1)}">[{[match.model.layer_version__layer__name]}]</span> </a> | ||
| 64 | </script> | ||
| 65 | |||
| 66 | <script type="text/ng-template" id="layers_suggestion_details"> | ||
| 67 | <a> {[match.model['layer__name']]} ( {[match.model.layer__vcs_url]} ) </a> | ||
| 68 | </script> | ||
| 69 | |||
| 70 | |||
| 71 | |||
| 72 | |||
| 53 | <!-- modal dialogs --> | 73 | <!-- modal dialogs --> |
| 54 | <script type="text/ng-template" id="dependencies_modal"> | 74 | <script type="text/ng-template" id="dependencies_modal"> |
| 55 | <div class="modal-header"> | 75 | <div class="modal-header"> |
| @@ -104,14 +124,14 @@ vim: expandtab tabstop=2 | |||
| 104 | <div class="well"> | 124 | <div class="well"> |
| 105 | <form class="build-form" data-ng-submit="buildNamedTarget()"> | 125 | <form class="build-form" data-ng-submit="buildNamedTarget()"> |
| 106 | <div class="input-append controls"> | 126 | <div class="input-append controls"> |
| 107 | <input type="text" class="huge input-xxlarge" placeholder="Type the recipe(s) you want to build" autocomplete="off" data-ng-model="targetName" data-typeahead="e.name for e in getAutocompleteSuggestions('targets', $viewValue)|filter:$viewValue" data-typeahead-template-url="suggestion_details" data-ng-disabled="!layers.length"/> | 127 | <input type="text" class="huge input-xxlarge" placeholder="Type the recipe(s) you want to build" autocomplete="off" data-ng-model="targetName" data-typeahead="a.name for a in getRecipesAutocompleteSuggestions($viewValue)" data-typeahead-template-url="recipes_suggestion_details" data-ng-disabled="!layers.length"/> |
| 108 | <button type="submit" class="btn btn-large btn-primary" data-ng-disabled="!targetName.length"> | 128 | <button type="submit" class="btn btn-large btn-primary" data-ng-disabled="!targetName.length"> |
| 109 | Build | 129 | Build |
| 110 | </button> | 130 | </button> |
| 111 | </div> | 131 | </div> |
| 112 | <i class="icon-question-sign get-help get-help-blue" title="Type the name of one or more recipes you want to build, separated by a space. You can also specify a task by appending a semicolon and a task name to a recipe name, like so: <code>core-image-minimal:do_build</code>"></i> | 132 | <i class="icon-question-sign get-help get-help-blue" title="Type the name of one or more recipes you want to build, separated by a space. You can also specify a task by appending a semicolon and a task name to a recipe name, like so: <code>core-image-minimal:do_build</code>"></i> |
| 113 | <p> | 133 | <p> |
| 114 | <a href="{% url 'all-targets' project.id %}">View all compatible recipes</a> | 134 | <a href="{% url 'projecttargets' project.id %}">View all compatible recipes</a> |
| 115 | <i class="icon-question-sign get-help get-help-blue heading-help" title="View all the recipes you can build with the release selected for this project, which is {[project.release.desc]}"></i> | 135 | <i class="icon-question-sign get-help get-help-blue heading-help" title="View all the recipes you can build with the release selected for this project, which is {[project.release.desc]}"></i> |
| 116 | {% if completedbuilds.count %} | 136 | {% if completedbuilds.count %} |
| 117 | | <a href="{% url 'projectbuilds' project.id %}">View all project builds ({{completedbuilds.count}})</a> | 137 | | <a href="{% url 'projectbuilds' project.id %}">View all project builds ({{completedbuilds.count}})</a> |
| @@ -278,7 +298,7 @@ vim: expandtab tabstop=2 | |||
| 278 | <p> | 298 | <p> |
| 279 | You can: | 299 | You can: |
| 280 | <ul> | 300 | <ul> |
| 281 | <li> <a href="{% url 'all-layers' project.id %}">View all compatible layers available in Toaster</a> | 301 | <li> <a href="{% url 'projectlayers' project.id %}">View all compatible layers available in Toaster</a> |
| 282 | <li> <a href="{% url 'importlayer' project.id %}">Import a layer</a> | 302 | <li> <a href="{% url 'importlayer' project.id %}">Import a layer</a> |
| 283 | <li> <a href="https://www.yoctoproject.org/docs/1.6.1/dev-manual/dev-manual.html#understanding-and-creating-layers" target="_blank">Read about layers in the manual</a> | 303 | <li> <a href="https://www.yoctoproject.org/docs/1.6.1/dev-manual/dev-manual.html#understanding-and-creating-layers" target="_blank">Read about layers in the manual</a> |
| 284 | </ul> | 304 | </ul> |
| @@ -287,13 +307,13 @@ vim: expandtab tabstop=2 | |||
| 287 | </div> | 307 | </div> |
| 288 | <form data-ng-submit="layerAdd()"> | 308 | <form data-ng-submit="layerAdd()"> |
| 289 | <div class="input-append"> | 309 | <div class="input-append"> |
| 290 | <input type="text" class="input-xlarge" id="layer" autocomplete="off" placeholder="Type a layer name" data-minLength="1" data-ng-model="layerAddName" data-typeahead="e.name for e in getAutocompleteSuggestions('layers', $viewValue)|filter:$viewValue" data-typeahead-template-url="suggestion_details" data-typeahead-on-select="onLayerSelect($item, $model, $label)" data-typeahead-editable="false" data-ng-class="{ 'has-error': layerAddName.$invalid }" /> | 310 | <input type="text" class="input-xlarge" id="layer" autocomplete="off" placeholder="Type a layer name" data-minLength="1" data-ng-model="layerAddName" data-typeahead="e for e in getLayersAutocompleteSuggestions($viewValue)" data-typeahead-template-url="layers_suggestion_details" data-typeahead-on-select="onLayerSelect($item, $model, $label)" data-typeahead-editable="false" data-ng-class="{ 'has-error': layerAddName.$invalid }" /> |
| 291 | <input type="submit" id="add-layer" class="btn" value="Add" data-ng-disabled="!layerAddName.length"/> | 311 | <input type="submit" id="add-layer" class="btn" value="Add" data-ng-disabled="!layerAddName.length"/> |
| 292 | </div> | 312 | </div> |
| 293 | {% csrf_token %} | 313 | {% csrf_token %} |
| 294 | </form> | 314 | </form> |
| 295 | <p> | 315 | <p> |
| 296 | <a href="{% url 'all-layers' project.id %}">View all compatible layers</a> | 316 | <a href="{% url 'projectlayers' project.id %}">View all compatible layers</a> |
| 297 | <i class="icon-question-sign get-help" title="View all the layers you can build with the release selected for this project, which is {[project.release.desc]}"></i> | 317 | <i class="icon-question-sign get-help" title="View all the layers you can build with the release selected for this project, which is {[project.release.desc]}"></i> |
| 298 | | | 318 | | |
| 299 | <a href="{% url 'importlayer' project.id %}">Import layer</a></p> | 319 | <a href="{% url 'importlayer' project.id %}">Import layer</a></p> |
| @@ -314,14 +334,14 @@ vim: expandtab tabstop=2 | |||
| 314 | </h3> | 334 | </h3> |
| 315 | <form data-ng-submit="buildNamedTarget()"> | 335 | <form data-ng-submit="buildNamedTarget()"> |
| 316 | <div class="input-append"> | 336 | <div class="input-append"> |
| 317 | <input type="text" class="input-xlarge" placeholder="Type the recipe(s) you want to build" autocomplete="off" data-minLength="1" data-ng-model="targetName1" data-typeahead="e.name for e in getAutocompleteSuggestions('targets', $viewValue)|filter:$viewValue" data-typeahead-template-url="suggestion_details" data-ng-disabled="!layers.length"> | 337 | <input type="text" class="input-xlarge" placeholder="Type the recipe(s) you want to build" autocomplete="off" data-minLength="1" data-ng-model="targetName1" data-typeahead="a.name for a in getRecipesAutocompleteSuggestions($viewValue)" data-typeahead-template-url="recipes_suggestion_details" data-ng-disabled="!layers.length"> |
| 318 | <button type="submit" class="btn btn-primary" data-ng-disabled="!targetName1.length"> | 338 | <button type="submit" class="btn btn-primary" data-ng-disabled="!targetName1.length"> |
| 319 | Build </button> | 339 | Build </button> |
| 320 | </div> | 340 | </div> |
| 321 | {% csrf_token %} | 341 | {% csrf_token %} |
| 322 | </form> | 342 | </form> |
| 323 | <p> | 343 | <p> |
| 324 | <a href="{% url 'all-targets' project.id %}">View all compatible recipes</a> | 344 | <a href="{% url 'projecttargets' project.id %}">View all compatible recipes</a> |
| 325 | <i class="icon-question-sign get-help" title="View all the recipes you can build with the release selected for this project, which is {[project.release.desc]}"></i> | 345 | <i class="icon-question-sign get-help" title="View all the recipes you can build with the release selected for this project, which is {[project.release.desc]}"></i> |
| 326 | </p> | 346 | </p> |
| 327 | <div data-ng-if="frequenttargets.length"> | 347 | <div data-ng-if="frequenttargets.length"> |
| @@ -355,13 +375,13 @@ vim: expandtab tabstop=2 | |||
| 355 | You cannot really compare the builds for the new machine with the previous ones. | 375 | You cannot really compare the builds for the new machine with the previous ones. |
| 356 | </div> | 376 | </div> |
| 357 | <form data-ng-submit="editProjectSettings('#select-machine')" class="input-append"> | 377 | <form data-ng-submit="editProjectSettings('#select-machine')" class="input-append"> |
| 358 | <input type="text" id="machine" autocomplete="off" data-ng-model="machineName" value="{[machine.name]}" data-typeahead="m.name for m in getAutocompleteSuggestions('machines', $viewValue)" data-typeahead-template-url="suggestion_details" /> | 378 | <input type="text" id="machine" autocomplete="off" data-ng-model="machineName" value="{[machine.name]}" data-typeahead="m.name for m in getMachinesAutocompleteSuggestions($viewValue)" data-typeahead-template-url="machines_suggestion_details" /> |
| 359 | <input type="submit" id="apply-change-machine" class="btn" data-ng-disabled="machineName == machine.name || machineName.length == 0" value="Save"/> | 379 | <input type="submit" id="apply-change-machine" class="btn" data-ng-disabled="machineName == machine.name || machineName.length == 0" value="Save"/> |
| 360 | <input type="reset" id="cancel-machine" class="btn btn-link" data-ng-click="toggle('#select-machine')" value="Cancel"/> | 380 | <input type="reset" id="cancel-machine" class="btn btn-link" data-ng-click="toggle('#select-machine')" value="Cancel"/> |
| 361 | {% csrf_token %} | 381 | {% csrf_token %} |
| 362 | </form> | 382 | </form> |
| 363 | <p> | 383 | <p> |
| 364 | <a href="{% url 'all-machines' project.id %}" class="link">View all compatible machines</a> | 384 | <a href="{% url 'projectmachines' project.id %}" class="link">View all compatible machines</a> |
| 365 | <i class="icon-question-sign get-help" title="View all the machines you can set with the release selected for this project, which is {[project.release.desc]}"></i> | 385 | <i class="icon-question-sign get-help" title="View all the machines you can set with the release selected for this project, which is {[project.release.desc]}"></i> |
| 366 | </p> | 386 | </p> |
| 367 | </div> | 387 | </div> |
| @@ -429,11 +449,11 @@ vim: expandtab tabstop=2 | |||
| 429 | angular.element(document).ready(function() { | 449 | angular.element(document).ready(function() { |
| 430 | scope = angular.element("#main").scope(); | 450 | scope = angular.element("#main").scope(); |
| 431 | scope.urls = {}; | 451 | scope.urls = {}; |
| 432 | scope.urls.xhr_build = "{% url 'xhr_projectbuild' project.id %}"; | 452 | scope.urls.xhr_build = "{% url 'projectbuilds' project.id %}"; |
| 433 | scope.urls.xhr_edit = "{% url 'project' project.id %}?format=json"; | 453 | scope.urls.xhr_edit = "{% url 'project' project.id %}?format=json"; |
| 434 | scope.urls.xhr_datatypeahead = "{% url 'xhr_datatypeahead' project.id %}"; | 454 | scope.urls.layers = "{% url 'projectlayers' project.id %}"; |
| 435 | scope.urls.layers = "{% url 'all-layers' project.id %}"; | 455 | scope.urls.targets = "{% url 'projecttargets' project.id %}"; |
| 436 | scope.urls.targets = "{% url 'all-targets' project.id %}"; | 456 | scope.urls.machines = "{% url 'projectmachines' project.id %}"; |
| 437 | scope.urls.importlayer = "{% url 'importlayer' project.id %}"; | 457 | scope.urls.importlayer = "{% url 'importlayer' project.id %}"; |
| 438 | scope.urls.layer = "{% url 'base_layerdetails' project.id %}"; | 458 | scope.urls.layer = "{% url 'base_layerdetails' project.id %}"; |
| 439 | scope.project = {{prj|json}}; | 459 | scope.project = {{prj|json}}; |
