Added filter button in crawl journal view, renamed file and clean
Javascript.
This commit is contained in:
parent
afe0e7d297
commit
c0ba11880d
3 changed files with 100 additions and 59 deletions
|
@ -85,7 +85,7 @@ public class CrawlJournalView
|
|||
index += 1;
|
||||
}
|
||||
|
||||
String content = PresenterUtils.dynamize("/fr/devinsy/statoolinfos/htmlize/crawlJournal.xhtml", data).toString();
|
||||
String content = PresenterUtils.dynamize("/fr/devinsy/statoolinfos/htmlize/crawlJournalView.xhtml", data).toString();
|
||||
result = XidynUtils.extractBodyContent(content);
|
||||
}
|
||||
catch (XidynException exception)
|
||||
|
|
|
@ -1,58 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>StatoolInfos</title>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="keywords" content="statoolinfos,devinsy,federation" />
|
||||
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
|
||||
<link rel="stylesheet" type="text/css" href="statoolinfos.css" />
|
||||
<script src="sorttable.js" />
|
||||
<script src="Chart.bundle.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="center_table">
|
||||
|
||||
<div class="center">
|
||||
<h2 id="title">Journal des téléchargements</h2>
|
||||
<div>Nombre de téléchargements : <span id="totalCount">n/a</span></div>
|
||||
<div>Nombre d'erreurs : <span id="errorCount">n/a</span></div>
|
||||
<div>Date : <span id="date">n/a</span></div>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="center_table" style="width: 1005px;">
|
||||
<table id="crawlLogs" class="table_classic left">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 205px;">Parent</th>
|
||||
<th>URL</th>
|
||||
<th style="width: 150px;">Statut</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr id="crawlLogLine">
|
||||
<td id="crawlLogLineParentUrl"><a href="#" id="crawlLogLineParentUrlLink">n/a</a></td>
|
||||
<td id="crawlLogLineUrl"><a href="#" id="crawlLogLineUrlLink">n/a</a></td>
|
||||
<td id="crawlLogLineStatus" class="td_center center">n/a</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$('#crawlLogs').DataTable(
|
||||
{
|
||||
paging: false,
|
||||
ordering: true,
|
||||
"order": [[ 0, "asc" ]],
|
||||
language: dataTableFrench,
|
||||
column:
|
||||
[ {},{},
|
||||
{
|
||||
"bSortable": false
|
||||
},
|
||||
]
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
99
src/fr/devinsy/statoolinfos/htmlize/crawlJournalView.xhtml
Normal file
99
src/fr/devinsy/statoolinfos/htmlize/crawlJournalView.xhtml
Normal file
|
@ -0,0 +1,99 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>StatoolInfos</title>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="keywords" content="statoolinfos,devinsy,federation" />
|
||||
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
|
||||
<link rel="stylesheet" type="text/css" href="statoolinfos.css" />
|
||||
<script src="sorttable.js" />
|
||||
<script src="Chart.bundle.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="center_table" style="width:1005px;">
|
||||
<div class="center">
|
||||
<h2 id="title">Journal des téléchargements</h2>
|
||||
<div>Nombre de téléchargements : <span id="totalCount">n/a</span></div>
|
||||
<div>Nombre d'erreurs : <span id="errorCount">n/a</span></div>
|
||||
<div>Date : <span id="date">n/a</span></div>
|
||||
</div>
|
||||
<br/>
|
||||
<div style="margin-left: 0px; margin-bottom: 10px;">
|
||||
<a id="allButton" class="button" href="#">Tout</a>
|
||||
<a id="nokButton" class="button" href="#">Erreurs</a>
|
||||
</div>
|
||||
<div class="center_table">
|
||||
<table id="crawlLogs" class="table_classic left">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 205px;">Parent</th>
|
||||
<th>URL</th>
|
||||
<th style="width: 150px;">Statut</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr id="crawlLogLine">
|
||||
<td id="crawlLogLineParentUrl"><a href="#" id="crawlLogLineParentUrlLink">n/a</a></td>
|
||||
<td id="crawlLogLineUrl"><a href="#" id="crawlLogLineUrlLink">n/a</a></td>
|
||||
<td id="crawlLogLineStatus" class="td_center center">n/a</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
var table = $('#crawlLogs').DataTable(
|
||||
{
|
||||
paging: false,
|
||||
ordering: true,
|
||||
"order": [[ 0, "asc" ]],
|
||||
language: dataTableFrench,
|
||||
column:
|
||||
[ {},{},
|
||||
{
|
||||
"bSortable": false
|
||||
},
|
||||
]
|
||||
});
|
||||
|
||||
var showAll=1;
|
||||
$("#nokButton").click(function()
|
||||
{
|
||||
if (showAll == 1)
|
||||
{
|
||||
showAll=0;
|
||||
$.fn.dataTable.ext.search.push(
|
||||
function(settings, data, dataIndex)
|
||||
{
|
||||
var result;
|
||||
|
||||
var label = table.cell(dataIndex, 2).data();
|
||||
if ((label.includes('SUCCESS')) || label.includes('UPDATED'))
|
||||
result = false;
|
||||
else
|
||||
result = true;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
);
|
||||
table.draw();
|
||||
}
|
||||
});
|
||||
|
||||
$("#allButton").click(function()
|
||||
{
|
||||
if (showAll == 0)
|
||||
{
|
||||
showAll=1;
|
||||
$.fn.dataTable.ext.search.pop();
|
||||
table.draw();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in a new issue