Files
poky/bitbake/lib/toaster/toastergui/templates/newcustomimage_modal.html
Elliot Smith a40a3e6def bitbake: toaster: add build dashboard buttons to edit/create custom images
When a build is viewed in the dashboard, enable users to edit
a custom image which was built during that build, and/or create
a new custom image based on one of the image recipes built during
the build.

Add methods to the Build model to enable querying for the
set of image recipes built during a build.

Add buttons to the dashboard, with the "Edit custom image"
button opening a basic modal for now. The "New custom image"
button opens the existing new custom image modal, but is modified
to show a list of images available as a base for a new custom image.

Add a new function to the new custom image modal's script which
enables multiple potential custom images to be shown as radio
buttons in the dialog (if there is more than 1). Modify existing
code to use this new function.

Add a template filter which allows the queryset of recipes for
a build to be available to client-side scripts, and from there
be used to populate the new custom image modal.

[YOCTO #9123]

(Bitbake rev: 4c49ffd28e41c4597bdac34d5e54c125571a4b95)

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-19 21:11:26 +01:00

49 lines
1.8 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% load static %}
<script src="{% static 'js/newcustomimage_modal.js' %}"></script>
<script>
$(document).ready(function (){
try {
newCustomImageModalInit();
} catch (e) {
document.write("Sorry, An error has occurred loading this page");
console.warn(e);
}
});
</script>
<div class="modal hide fade in" id="new-custom-image-modal" aria-hidden="false">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3>New custom image</h3>
</div>
<div class="modal-body">
<!--
this container is visible if there are multiple image recipes which could
be used as a basis for the new custom image; radio buttons are added to it
via newCustomImageModalSetRecipes() as required
-->
<div data-role="image-selector" style="display:none;">
<h4>Which image do you want to customise?</h4>
<div data-role="image-selector-radios"></div>
<span class="help-block error" id="invalid-recipe-help" style="display:none"></span>
<div class="air"></div>
</div>
<h4>Name your custom image</h4>
<div class="row-fluid">
<span class="help-block span8">Image names must be unique. They should not contain spaces or capital letters, and the only allowed special character is dash (-).<p></p>
</span></div>
<div class="control-group controls">
<input type="text" class="huge" placeholder="Type the custom image name" required>
<span class="help-block error" id="invalid-name-help" style="display:none"></span>
</div>
</div>
<div class="modal-footer">
<button id="create-new-custom-image-btn" class="btn btn-primary btn-large" data-original-title="" title="" disabled>Create custom image</button>
</div>
</div>