diff options
author | Simon Rettberg | 2019-02-15 15:55:10 +0100 |
---|---|---|
committer | Simon Rettberg | 2019-02-15 15:55:10 +0100 |
commit | bc9aa8105db4742255265a35594fafc93269d59d (patch) | |
tree | 338dd9588519ed2b996c675a920160258c8762ba /modules-available/serversetup-bwlp-pxelinux/templates | |
parent | [dozmod] Add UI to create preset network rules (diff) | |
parent | [serversetup-bwlp-ipxe] ipxe script: Don't load unused png (diff) | |
download | slx-admin-bc9aa8105db4742255265a35594fafc93269d59d.tar.gz slx-admin-bc9aa8105db4742255265a35594fafc93269d59d.tar.xz slx-admin-bc9aa8105db4742255265a35594fafc93269d59d.zip |
Merge branch 'ipxe'
Diffstat (limited to 'modules-available/serversetup-bwlp-pxelinux/templates')
4 files changed, 193 insertions, 0 deletions
diff --git a/modules-available/serversetup-bwlp-pxelinux/templates/heading.html b/modules-available/serversetup-bwlp-pxelinux/templates/heading.html new file mode 100644 index 00000000..d68360f1 --- /dev/null +++ b/modules-available/serversetup-bwlp-pxelinux/templates/heading.html @@ -0,0 +1 @@ +<h1>{{lang_moduleHeading}}</h1>
\ No newline at end of file diff --git a/modules-available/serversetup-bwlp-pxelinux/templates/ipaddress.html b/modules-available/serversetup-bwlp-pxelinux/templates/ipaddress.html new file mode 100644 index 00000000..8d73dfac --- /dev/null +++ b/modules-available/serversetup-bwlp-pxelinux/templates/ipaddress.html @@ -0,0 +1,37 @@ +<div class="panel panel-default"> + <div class="panel-heading"> + {{lang_bootAddress}} + </div> + <div class="panel-body"> + <div class="{{chooseHintClass}}"> + {{lang_chooseIP}} + </div> + <form method="post" action="?do=ServerSetup"> + <input type="hidden" name="action" value="ip"> + <input type="hidden" name="token" value="{{token}}"> + <table class="slx-table"> + {{#ips}} + <tr> + <td>{{ip}}</td> + {{#default}} + <td> + <span class="btn btn-success btn-xs"><span class="glyphicon glyphicon-ok"></span> {{lang_active}}</span> + </td> + {{/default}} + {{^default}} + <td> + <button class="btn btn-primary btn-xs" name="ip" value="{{ip}}" {{perms.edit.address.disabled}}> + <span class="glyphicon glyphicon-flag"></span> + {{lang_set}} + </button> + </td> + {{/default}} + </tr> + {{/ips}} + </table> + <p> + {{lang_bootHint}} + </p> + </form> + </div> +</div>
\ No newline at end of file diff --git a/modules-available/serversetup-bwlp-pxelinux/templates/ipxe.html b/modules-available/serversetup-bwlp-pxelinux/templates/ipxe.html new file mode 100644 index 00000000..f4b0b4d3 --- /dev/null +++ b/modules-available/serversetup-bwlp-pxelinux/templates/ipxe.html @@ -0,0 +1,117 @@ +<form method="post" action="?do=ServerSetup"> + <input type="text" name="prevent_autofill" id="prevent_autofill" value="" style="position:absolute;top:-2000px" tabindex="-1"> + <input type="password" name="password_fake" id="password_fake" value="" style="position:absolute;top:-2000px" tabindex="-1"> + <input type="hidden" name="action" value="ipxe"> + <input type="hidden" name="token" value="{{token}}"> + <div class="panel panel-default"> + <div class="panel-heading"> + {{lang_bootMenu}} + </div> + <div class="panel-body"> + <p> + {{lang_bootInfo}} + </p> + <br> + + <div class="form-group"> + <strong>{{lang_bootBehavior}}</strong> + <div class="radio"> + <input type="radio" name="defaultentry" value="net" {{active-net}} id="id-net" {{perms.edit.menu.disabled}}> + <label for="id-net">bwLehrpool</label> + </div> + <div class="radio"> + <input type="radio" name="defaultentry" value="hdd" {{active-hdd}} id="id-hdd" {{perms.edit.menu.disabled}}> + <label for="id-hdd">{{lang_localHDD}}</label> + </div> + <div class="radio"> + <input type="radio" name="defaultentry" value="custom" {{active-custom}} id="id-custom" {{perms.edit.menu.disabled}}> + <label for="id-custom">{{lang_customEntry}} ("custom")</label> + </div> + </div> + + <div class="form-group"> + <strong>{{lang_menuDisplayTime}}</strong> + <div class="input-group form-narrow"> + <input type="text" class="form-control" name="timeout" value="{{timeout}}" pattern="\d+" {{perms.edit.menu.readonly}}> + <span class="input-group-addon">{{lang_seconds}}</span> + </div> + </div> + + <div class="form-group"> + <strong>{{lang_masterPassword}}</strong> + <div class="form-narrow"> + <input type="{{password_type}}" class="form-control" name="masterpassword" value="{{masterpasswordclear}}" {{perms.edit.menu.readonly}}> + </div> + <i>{{lang_masterPasswordHelp}}</i> + </div> + + <div class="form-group"> + <strong>{{lang_menuCustom}}</strong> <a class="btn btn-default btn-xs" data-toggle="modal" data-target="#help-custom"><span class="glyphicon glyphicon-question-sign"></span></a> + <textarea class="form-control" name="custom" rows="8" {{perms.edit.menu.readonly}}>{{custom}}</textarea> + </div> + </div> + + <div class="panel-footer"> + <button class="btn btn-primary pull-right" name="action" value="ipxe" {{perms.edit.menu.disabled}}>{{lang_bootMenuCreate}}</button> + <div> + <div class="btn-group" role="group"> + <a class="btn btn-default {{perms.download.disabled}}" href="?do=ServerSetup&action=getimage"> + <span class="glyphicon glyphicon-download-alt"></span> + {{lang_downloadImage}} + </a> + <span class="btn btn-default" data-toggle="modal" data-target="#help-usbimg"><span class="glyphicon glyphicon-question-sign"></span></span> + </div> + </div> + </div> + </div> +</form> + +<div class="modal fade" id="help-custom" tabindex="-1" role="dialog"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> + {{lang_menuCustom}} + </div> + <div class="modal-body"> + {{lang_menuCustomHint1}} + <br>{{lang_example}}: + <pre>LABEL custom + MENU LABEL ^My Boot Entry + KERNEL http://1.2.3.4/kernel + INITRD http://1.2.3.4/initramfs-stage31 + APPEND custom=option + IPAPPEND 3</pre> + {{lang_menuCustomHint2}} LABEL <strong>custom</strong> + {{lang_menuCustomHint3}} + </div> + </div> + </div> +</div> + +<div class="modal fade" id="help-usbimg" tabindex="-1" role="dialog"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> + {{lang_usbImage}} + </div> + <div class="modal-body"> + <p>{{lang_usbImgHelp}}</p> + <p> + <b>Linux</b> + <br> + {{lang_usbImgHelpLinux}} + </p> + <p> + <b>Windows</b> + <br> + {{lang_usbImgHelpWindows}} + </p> + <p> + <a href="https://rufus.akeo.ie/#download">{{lang_downloadRufus}}</a> + </p> + </div> + </div> + </div> +</div>
\ No newline at end of file diff --git a/modules-available/serversetup-bwlp-pxelinux/templates/ipxe_update.html b/modules-available/serversetup-bwlp-pxelinux/templates/ipxe_update.html new file mode 100644 index 00000000..c5aafa1c --- /dev/null +++ b/modules-available/serversetup-bwlp-pxelinux/templates/ipxe_update.html @@ -0,0 +1,38 @@ +<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> + <div id="genfailed" class="collapse"> + <div class="alert alert-danger"> + {{lang_generationFailed}} + </div> + </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 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') { + var $gf = $('#genfailed'); + if (task.data && task.data.errors) { + $gf.append($('<pre>').text(task.data.errors)); + } + $gf.show('slow'); + } + } +</script> |