diff options
Diffstat (limited to 'modules-available/dozmod/templates')
5 files changed, 160 insertions, 66 deletions
diff --git a/modules-available/dozmod/templates/actionlog-lecture.html b/modules-available/dozmod/templates/actionlog-lecture.html index 4fb2b4d0..6b8701b7 100644 --- a/modules-available/dozmod/templates/actionlog-lecture.html +++ b/modules-available/dozmod/templates/actionlog-lecture.html @@ -25,6 +25,14 @@ <td><a href="?do=dozmod&section=actionlog&action=showtarget&uuid={{imagebaseid}}">{{imgname}}</a></td> </tr> <tr> + <th class="text-nowrap">{{lang_lastBoot}}</th> + <td>{{lastused_s}}</td> + </tr> + <tr> + <th class="text-nowrap">{{lang_numberBoots}}</th> + <td>{{usecount}}</td> + </tr> + <tr> <td colspan="2">{{{descriptionHtml}}}</td> </tr> </table>
\ No newline at end of file diff --git a/modules-available/dozmod/templates/blockstats.html b/modules-available/dozmod/templates/blockstats.html index cba3b476..b71d219c 100644 --- a/modules-available/dozmod/templates/blockstats.html +++ b/modules-available/dozmod/templates/blockstats.html @@ -30,8 +30,9 @@ <script type="application/javascript"><!-- function slxLoadBlocks(hash, size) { $('#block-details .modal-header').text(hash + '/' + size); - $('#block-details .modal-body').html('<div class="slx-rotation"><span class="glyphicon glyphicon-refresh"></span></div>'); + $('#block-details .modal-body') + .html('<div class="slx-rotation"><span class="glyphicon glyphicon-refresh"></span></div>') + .load('?do=dozmod§ion=special', { token: TOKEN, action: 'getblockinfo', hash: hash, size: size }); $('#block-details').modal('show'); - $('#block-details .modal-body').load('?do=dozmod§ion=blockstats', { token: TOKEN, action: 'getblockinfo', hash: hash, size: size }); } //--></script>
\ No newline at end of file diff --git a/modules-available/dozmod/templates/images-delete.html b/modules-available/dozmod/templates/images-delete.html index 78690426..5bbebdc3 100644 --- a/modules-available/dozmod/templates/images-delete.html +++ b/modules-available/dozmod/templates/images-delete.html @@ -2,96 +2,142 @@ <div class="panel panel-default"> <div class="panel-heading"> - {{lang_heading}} + {{lang_deleteExpiredHeading}} </div> <div class="panel-body"> <p>{{lang_description_delete_images}}</p> <div class="table-responsive"> - <form id="delform" method="post" action="?do=DozMod" onsubmit="return slxPostdel()"> + <form id="delform" method="post" action="?do=dozmod"> <input type="hidden" name="token" value="{{token}}"> <input type="hidden" name="section" value="expiredimages"> <input type="hidden" name="action" value="delimages"> <table class="table table-stripped table-condensed stupidtable"> <thead> - <tr> - <th data-sort="string">{{lang_image}}</th> - <th data-sort="int">{{lang_version}}</th> - <th data-sort="string">{{lang_owner}}</th> - <th><span class="glyphicon glyphicon-upload" title="{{lang_hasNewer}}"></span></th> - <th data-sort="int">{{lang_size}}</th> - <th> - <div class="checkbox"> - <input id="del-all" type="checkbox" onclick="slxChangeAll()"> - <label for="del-all"></label> - <span class="glyphicon glyphicon-trash" title="{{lang_delete}}"></span> - </div> - </th> - </tr> + <tr> + <th data-sort="string">{{lang_image}}</th> + <th data-sort="int">{{lang_version}}</th> + <th data-sort="string">{{lang_owner}}</th> + <th><span class="glyphicon glyphicon-upload" title="{{lang_hasNewer}}"></span></th> + <th data-sort="int">{{lang_size}}</th> + <th> + <div class="checkbox"> + <input id="del-all" type="checkbox"> + <label for="del-all"></label> + <span class="glyphicon glyphicon-trash" title="{{lang_delete}}"></span> + </div> + </th> + </tr> </thead> <tbody> - {{#images}} - <tr> - <td class="text-left text-nowrap {{name_extra_class}}">{{displayname}}<br><span class="small">{{imageversionid}}</span></td> - <td class="text-left text-nowrap" data-sort-value="{{createtime}}" >{{version}}</td> - <td class="text-left text-nowrap"><a href="mailto:{{email}}">{{lastname}}, {{firstname}}</a></td> - <td class="text-left text-nowrap"><span class="glyphicon {{hasNewerClass}}"></span></td> - <td class="text-left text-nowrap" data-sort-value="{{rawfilesize}}">{{filesize}}</td> - <td> - <div class="checkbox"> - <input type="checkbox" id="images[{{imageversionid}}]" class="del-check" name="images[{{imageversionid}}]" {{checked}}> - <label for="images[{{imageversionid}}]"></label> - </div> - </td> - </tr> - {{/images}} + {{#images}} + <tr> + <td class="text-left text-nowrap {{name_extra_class}}">{{displayname}}<br><span class="small">{{imageversionid}}</span> + </td> + <td class="text-left text-nowrap" data-sort-value="{{createtime}}">{{version}}</td> + <td class="text-left text-nowrap"><a href="?do=dozmod&section=actionlog&action=showuser&uuid={{userid}}">{{lastname}}, {{firstname}}</a></td> + <td class="text-left text-nowrap"><span class="glyphicon {{hasNewerClass}}"></span></td> + <td class="text-left text-nowrap" data-sort-value="{{rawfilesize}}">{{filesize}}</td> + <td> + <div class="checkbox"> + <input type="checkbox" id="images[{{imageversionid}}]" class="del-check" + name="images[{{imageversionid}}]" {{checked}}> + <label for="images[{{imageversionid}}]"></label> + </div> + </td> + </tr> + {{/images}} </tbody> </table> - <button {{^allowedDelete}}disabled{{/allowedDelete}} style="margin-left: 20px" id="delbtn" class="btn btn-danger pull-right" type="submit" name="button" value="save"><span class="glyphicon glyphicon-trash"></span> {{lang_delButton}}</button> + <button {{perm.expiredimages.delete.disabled}} id="expired-delete" + class="btn btn-danger pull-right" type="submit"> + <span class="glyphicon glyphicon-trash"></span> + {{lang_delButton}} + </button> </form> <pre style="display:none" id="deloutput"></pre> </div> </div> </div> -<script type="text/javascript"><!-- +<div class="panel panel-default"> + <div class="panel-heading"> + {{lang_orphanedFilesHeading}} + </div> + <div class="panel-body"> + <p>{{lang_orphanedFilesDesc}}</p> + <div id="orphan-ajax"> + <button {{perm.orphaned.scan.disabled}} id="orphan-scan" + class="btn btn-default pull-right" type="button"> + <span class="glyphicon glyphicon-search"></span> + {{lang_scanButton}} + </button> + </div> + </div> +</div> -function slxPostdel() { - var f = $('#delform'); - $('#delbtn').prop('disabled', true); - $.post('?do=DozMod', f.serialize()).done(function (data) { - $('#deloutput').text(data).css('display', ''); - }).fail(function () { - $('#deloutput').text('ERROR').css('display', ''); - }); - return false; -} +<div class="hidden" id="confirm-orphan-delete"> + {{lang_confirmDeleteOrphanedFiles}} +</div> -function slxChangeAll() -{ - if ($('#del-all').is(':checked')) { - $('.del-check').prop('checked', true); - } else { - $('.del-check').prop('checked', false); - } -} +<script type="text/javascript"><!-- -function slxChangeSingle() -{ - var ons = 0; - var offs = 0; - $('.del-check').each(function(idx, elem) { - if (elem.checked) { - ons++; +document.addEventListener("DOMContentLoaded", function () { + $('#del-all').click(function () { + if ($(this).is(':checked')) { + $('.del-check').prop('checked', true); } else { - offs++; + $('.del-check').prop('checked', false); } }); - $('#del-all').prop('checked', offs === 0).prop('indeterminate', ons > 0 && offs > 0); -} - -document.addEventListener("DOMContentLoaded", function() { + var slxChangeSingle = function () { + var ons = 0; + var offs = 0; + $('.del-check').each(function (idx, elem) { + if (elem.checked) { + ons++; + } else { + offs++; + } + }); + // TODO indeterminate doesn't work with styled checkbox + $('#del-all').prop('checked', offs === 0).prop('indeterminate', ons > 0 && offs > 0); + }; $('.del-check').click(slxChangeSingle); slxChangeSingle(); + // Handler for delete expired images button + var delform = $('#delform'); + delform.submit(function (e) { + e.preventDefault(); + $('#expired-delete').prop('disabled', true); + $.post('?do=dozmod', delform.serialize()).done(function (data) { + $('#deloutput').text(data).css('display', ''); + }).fail(function () { + $('#deloutput').text('ERROR').css('display', ''); + }); + }); + // Handler for scanning/deleting orphaned files + var slxOrphans = function (del) { + $.post('?do=dozmod', { + token: TOKEN, section: 'expiredimages', action: 'orphaned', delete: del + }).done(function (data) { + $('#orphan-ajax').html(data).find('#orphan-delete') + .click(slxModalConfirmHandler) + .click(function () { + slxOrphans(1); + }); + }).fail(function () { + $('#orphan-ajax').text('ERROR'); + }); + }; + // Handler for scanning for orphaned files + $('#orphan-scan').click(function () { + $('#orphan-scan').prop('disabled', true); + slxOrphans(0); + }); + window.addEventListener('unload', function () { + // Do something here that forces browsers to throw away any JS state on nav.back + $('input[type=checkbox]').prop('checked', false); + }); }, false); //--> </script> diff --git a/modules-available/dozmod/templates/images-orphaned.html b/modules-available/dozmod/templates/images-orphaned.html new file mode 100644 index 00000000..d1b74a42 --- /dev/null +++ b/modules-available/dozmod/templates/images-orphaned.html @@ -0,0 +1,25 @@ +<table class="table"> + <thead> + <tr> + <th>{{lang_fileName}}</th> + <th>{{lang_status}}</th> + </tr> + </thead> + <tbody> + {{#files}} + <tr> + <td>{{file}}</td> + <td>{{status}}</td> + </tr> + {{/files}} + </tbody> +</table> + +{{#show_delete}} +<button {{perm.orphaned.delete.disabled}} id="orphan-delete" + class="btn btn-danger pull-right" type="button" + data-confirm="#confirm-orphan-delete"> + <span class="glyphicon glyphicon-search"></span> + {{lang_orphanDeleteButton}} +</button> +{{/show_delete}}
\ No newline at end of file diff --git a/modules-available/dozmod/templates/runtimeconfig.html b/modules-available/dozmod/templates/runtimeconfig.html index 44fb4106..1540042d 100644 --- a/modules-available/dozmod/templates/runtimeconfig.html +++ b/modules-available/dozmod/templates/runtimeconfig.html @@ -19,7 +19,7 @@ <div class="checkbox"> <input type="checkbox" name="defaultLecturePermissions[admin]" value="1" {{defaultLecturePermissions.admin}} id ="lecture_admin" class="form-control"> - <label for"lecture_admin"> + <label for="lecture_admin"> {{lang_lecturePermissionAdmin}} </label> </div> @@ -94,6 +94,12 @@ <input name="maxTransfers" class="form-control" type="number" value="{{maxTransfers}}" min="1" max="10" pattern="^\d+$"> </td> </tr> + <tr class="input-group"> + <td class="input-group-addon">{{lang_maxVmHddSizeGb}}</td> + <td> + <input name="vmSizeLimit" class="form-control" type="number" value="{{vmSizeLimit}}" min="0" max="65535" pattern="\d+"> + </td> + </tr> </table> </fieldset> <br> @@ -107,6 +113,14 @@ <p><i>{{lang_allowLoginDescription}}</i></p> </div> <br> + <div class="checkbox"> + <input type="checkbox" name="allowStudentDownload" value="1" {{allowStudentDownload}} id="allowStudentDownload" class="form-control"> + <label for="allowStudentDownload"> + {{lang_allowStudentDownload}} + </label> + <p><i>{{lang_allowStudentDownloadDescription}}</i></p> + </div> + <br> <div> <label for="serverSideCopy"> {{lang_serverSideCopy}} |