diff options
author | Simon Rettberg | 2018-11-21 14:53:14 +0100 |
---|---|---|
committer | Simon Rettberg | 2018-11-21 14:53:14 +0100 |
commit | 6812e85e11718116f097f493419c489c41660c77 (patch) | |
tree | ee6b5a4c841e63efe33f204e1dc1eb08a886e76a /modules-available/serversetup-bwlp/templates/ipxe_update.html | |
parent | [serversetup-bwlp] add location selection to menu edit + ui improvements (diff) | |
download | slx-admin-6812e85e11718116f097f493419c489c41660c77.tar.gz slx-admin-6812e85e11718116f097f493419c489c41660c77.tar.xz slx-admin-6812e85e11718116f097f493419c489c41660c77.zip |
[serversetup-bwlp] Compilation front-end
Diffstat (limited to 'modules-available/serversetup-bwlp/templates/ipxe_update.html')
-rw-r--r-- | modules-available/serversetup-bwlp/templates/ipxe_update.html | 37 |
1 files changed, 25 insertions, 12 deletions
diff --git a/modules-available/serversetup-bwlp/templates/ipxe_update.html b/modules-available/serversetup-bwlp/templates/ipxe_update.html index 71611085..344d3905 100644 --- a/modules-available/serversetup-bwlp/templates/ipxe_update.html +++ b/modules-available/serversetup-bwlp/templates/ipxe_update.html @@ -1,13 +1,13 @@ <div class="panel panel-default"> <div class="panel-heading">{{lang_menuGeneration}}</div> <div class="panel-body"> - <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 id="file-list"> + {{#files}} + <div id="built-{{namehyphen}}"> + <span class="glyphicon glyphicon-question-sign"></span> + {{name}} + </div> + {{/files}} </div> <div id="genfailed" class="collapse"> <div class="alert alert-danger"> @@ -19,15 +19,16 @@ </div> <script type="text/javascript"> + document.addEventListener('DOMContentLoaded', function() { + var slxFileList = $('#file-list').find('.glyphicon'); + }); + 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' || task.statusCode === 'TASK_FINISHED') { + + if (task.statusCode === 'TASK_FINISHED') { $('#tm-compile-div').find('pre').hide(); } if (task.statusCode === 'TASK_ERROR') { @@ -36,6 +37,18 @@ $gf.append($('<pre>').text(task.data.errors)); } $gf.show('slow'); + slxFileList.find('.glyphicon-question-sign').removeClass('glyphicon-question-sign').addClass('glyphicon-stop'); + } else { + // Working or finished + if (task.data && task.data.files && task.data.files) { + for (var k in task.data.files) { + if (!task.data.files[k]) + continue; + var f = '#built-' + k.replace('/', '-').replace('.', '-'); + var $e = $(f); + $e.find('.glyphicon-question-sign').removeClass('glyphicon-question-sign').addClass('glyphicon-ok text-success'); + } + } } } </script> |