mirror of
https://github.com/evilhero/mylar
synced 2024-12-23 00:02:38 +00:00
100 lines
3.4 KiB
HTML
100 lines
3.4 KiB
HTML
<%inherit file="base.html"/>
|
|
<%!
|
|
import mylar
|
|
from mylar import helpers
|
|
%>
|
|
|
|
<%def name="headerIncludes()">
|
|
<div id="subhead_container">
|
|
<div id="subhead_menu">
|
|
|
|
</div>
|
|
</div>
|
|
</%def>
|
|
|
|
|
|
<%def name="body()">
|
|
<div class="title">
|
|
<h1 class="clearfix"><img src="interfaces/default/images/icon_logs.png" alt="config"/>Config listing</h1>
|
|
</div>
|
|
<table class="display_config" id="config_table">
|
|
<thead>
|
|
<tr>
|
|
<th id="key">Key</th>
|
|
<th id="value">Value</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
</tbody>
|
|
</table>
|
|
<br>
|
|
</%def>
|
|
|
|
<%def name="headIncludes()">
|
|
<link rel="stylesheet" href="interfaces/default/css/data_table.css">
|
|
</%def>
|
|
|
|
<%def name="javascriptIncludes()">
|
|
<script src="js/libs/jquery.dataTables.min.js"></script>
|
|
<script>
|
|
$(document).ready(function() {
|
|
initActions();
|
|
|
|
$('#config_table').dataTable( {
|
|
"bProcessing": true,
|
|
"bServerSide": true,
|
|
"sAjaxSource": 'getConfig',
|
|
"sPaginationType": "full_numbers",
|
|
"aaSorting": [[0, 'desc']],
|
|
"iDisplayLength": 25,
|
|
"bStateSave": true,
|
|
"oLanguage": {
|
|
"sSearch":"Filter:",
|
|
"sLengthMenu":"Show _MENU_ lines per page",
|
|
"sEmptyTable": "No config information available",
|
|
"sInfo":"Showing _START_ to _END_ of _TOTAL_ lines",
|
|
"sInfoEmpty":"Showing 0 to 0 of 0 lines",
|
|
"sInfoFiltered":"(filtered from _MAX_ total lines)"},
|
|
"fnRowCallback": function (nRow, aData, iDisplayIndex, iDisplayIndexFull) {
|
|
// if (aData[1] === "ERROR") {
|
|
// $('td', nRow).closest('tr').addClass("gradeX");
|
|
// } else if (aData[1] === "WARNING") {
|
|
// $('td', nRow).closest('tr').addClass("gradeW");
|
|
// } else {
|
|
$('td', nRow).closest('tr').addClass("gradeZ");
|
|
// }
|
|
|
|
return nRow;
|
|
},
|
|
"fnDrawCallback": function (o) {
|
|
// Jump to top of page
|
|
$('html,body').scrollTop(0);
|
|
},
|
|
"fnServerData": function ( sSource, aoData, fnCallback ) {
|
|
/* Add some extra data to the sender */
|
|
$.getJSON(sSource, aoData, function (json) {
|
|
fnCallback(json)
|
|
});
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
<script>
|
|
var timer;
|
|
function setRefresh()
|
|
{
|
|
refreshrate = document.getElementById('refreshrate');
|
|
if(refreshrate != null)
|
|
{
|
|
if(timer)
|
|
{
|
|
clearInterval(timer);
|
|
}
|
|
if(refreshrate.value != 0)
|
|
{
|
|
timer = setInterval("$('#config_table').dataTable().fnDraw()",1000*refreshrate.value);
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</%def>
|