summaryrefslogtreecommitdiffstats
path: root/modules-available/serversetup-bwlp/templates/ipxe_update.html
diff options
context:
space:
mode:
authorSimon Rettberg2018-05-07 17:34:35 +0200
committerSimon Rettberg2018-05-07 17:34:35 +0200
commit9b24161637553f3889d9a81344e6eec59dc6aa00 (patch)
tree55a6734634ba8ffc83b244b1d495bb89836dc00a /modules-available/serversetup-bwlp/templates/ipxe_update.html
parenttaskmanager.js: Support setting min height of log <pre> (diff)
downloadslx-admin-9b24161637553f3889d9a81344e6eec59dc6aa00.tar.gz
slx-admin-9b24161637553f3889d9a81344e6eec59dc6aa00.tar.xz
slx-admin-9b24161637553f3889d9a81344e6eec59dc6aa00.zip
[serversetup-bwlp] Add log output to ipxe building task
Diffstat (limited to 'modules-available/serversetup-bwlp/templates/ipxe_update.html')
-rw-r--r--modules-available/serversetup-bwlp/templates/ipxe_update.html24
1 files changed, 20 insertions, 4 deletions
diff --git a/modules-available/serversetup-bwlp/templates/ipxe_update.html b/modules-available/serversetup-bwlp/templates/ipxe_update.html
index 9c598667..e7ba5ffa 100644
--- a/modules-available/serversetup-bwlp/templates/ipxe_update.html
+++ b/modules-available/serversetup-bwlp/templates/ipxe_update.html
@@ -1,20 +1,36 @@
<div class="panel panel-default">
<div class="panel-heading">{{lang_menuGeneration}}</div>
<div class="panel-body">
- <div data-tm-id="{{taskid}}" data-tm-log="error" data-tm-callback="restartCb">{{lang_menuGeneration}}</div>
- <div id="genfailed" class="alert alert-danger" style="display:none">
+ <div id="built-pxe" class="invisible">
+ <span class="glyphicon glyphicon-ok"></span>
+ {{lang_pxeBuilt}}
+ </div>
+ <div id="built-usb" class="invisible">
+ <span class="glyphicon glyphicon-ok"></span>
+ {{lang_usbBuilt}}
+ </div>
+ <div id="genfailed" class="alert alert-danger collapse">
{{lang_generationFailed}}
</div>
+ <div data-tm-id="{{taskid}}" data-tm-log="log" data-tm-log-height="31em" data-tm-callback="ipxeGenCb">{{lang_menuGeneration}}</div>
</div>
</div>
<script type="text/javascript">
- function restartCb(task)
+ function ipxeGenCb(task)
{
if (!task || !task.statusCode)
return;
+ if (task.data) {
+ if (task.data.pxeDone) $('#built-pxe').removeClass('invisible');
+ if (task.data.usbDone) $('#built-usb').removeClass('invisible');
+ }
if (task.statusCode === 'TASK_ERROR') {
- $('#genfailed').show('slow');
+ var $gf = $('#genfailed');
+ if (task.data && task.data.errors) {
+ $gf.append($('<pre>').text(task.data.errors));
+ }
+ $gf.show('slow');
}
}
</script>