ln.skyscanner/www/crawler/subnets.html

47 lines
1.6 KiB
HTML

<%frame "frame.html"%>
<div>
<h1>Crawler / Subnets</h1>
</div>
<div>
<button onclick="refreshSubnetTable();">!?</button>
</div>
<div class="scroll fill">
<table id="subnetTable" style="max-height: 500px;"></table>
</div>
<script type="text/javascript">
var subnetTable = null;
function refreshSubnetTable()
{
var subnetList = skyapi().call("api/crawler","GetSubnets");
if (!subnetList)
subnetList = []
$('#subnetTable').DataTable().clear();
$('#subnetTable').DataTable().rows.add( subnetList ).draw();
}
var columns = [
{ title: "Netzbereich", data: "Network", sorter: "string", width: 120 },
{ title: "Bezeichnung", data: "Name", sorter: "string", width: 180 },
{ title: "Erstellt / Gefunden", data: "FirstSeen", sorter: "", width: 180, formatter: "datetime", formatterParams: { inputFormat: "", outputFormat: "DD.MM.YYYY hh:mm:ss", invalidPlaceHolder: "-" } },
{ title: "Letzter Scan", data: "LastScan", sorter: "", width: 180, formatter: "datetime", formatterParams: { inputFormat: "", outputFormat: "DD.MM.YYYY hh:mm:ss", invalidPlaceHolder: "-" } },
{ title: "Nächster Scan",data: "NextScan",sorter: "",width: 180,formatter: "datetime",formatterParams: {inputFormat: "",outputFormat: "DD.MM.YYYY hh:mm:ss",invalidPlaceHolder: "-"} },
];
$("#subnetTable").DataTable( {
columns: columns,
select: "single",
});
refreshSubnetTable();
//skyapi().addRefresh( refreshSubnetTable );
</script>