Fixed n/a sort and date sort.

This commit is contained in:
Christian P. MOMON 2021-06-04 16:51:50 +02:00
parent b1434d284b
commit cccd606ac7
4 changed files with 15 additions and 24 deletions

View file

@ -128,26 +128,8 @@ public class FederationPage
data.setEscapedAttribute("organizationListLine", index, "organizationListLineUrlLink", "href", organization.getWebsite());
data.setContent("organizationListLine", index, "organizationListLineServiceCount", organization.getServiceCount());
long count = organization.getPreviousMonthUserCount();
if (count == 0)
{
data.setContent("organizationListLine", index, "organizationListLineUserCount", "n/a");
}
else
{
data.setContent("organizationListLine", index, "organizationListLineUserCount", count);
}
count = organization.getPreviousMonthVisitCount();
if (count == 0)
{
data.setContent("organizationListLine", index, "organizationListLineVisitCount", "n/a");
}
else
{
data.setContent("organizationListLine", index, "organizationListLineVisitCount", count);
}
data.setContent("organizationListLine", index, "organizationListLineUserCount", organization.getPreviousMonthUserCount());
data.setContent("organizationListLine", index, "organizationListLineVisitCount", organization.getPreviousMonthVisitCount());
data.setContent("organizationListLine", index, "organizationListLineDate", organization.getCrawledDate().format(DateTimeFormatter.ofPattern("dd/MM/YYYY")));
data.setAttribute("organizationListLine", index, "organizationListLineDate", "title", organization.getCrawledDate().format(DateTimeFormatter.ofPattern("HH:mm:ss")));

View file

@ -85,6 +85,10 @@ public class ServiceListView
data.setEscapedContent("serviceListLine", index, "serviceListLineSoftwareLink", service.getSoftwareName());
data.setAttribute("serviceListLine", index, "serviceListLineSoftwareLink", "href", "software-" + service.getSoftwareTechnicalName() + ".xhtml");
data.setContent("serviceListLine", index, "serviceListLineUserCount", service.getPreviousMonthUserCount());
data.setContent("serviceListLine", index, "serviceListLineVisitCount", service.getPreviousMonthVisitCount());
data.setEscapedContent("serviceListLine", index, "serviceListLineDate", service.getCrawledDate().format(DateTimeFormatter.ofPattern("dd/MM/YYYY")));
data.setEscapedAttribute("serviceListLine", index, "serviceListLineDate", "title", service.getCrawledDate().format(DateTimeFormatter.ofPattern("HH:mm:ss")));

View file

@ -50,7 +50,8 @@
paging: false,
ordering: true,
"order": [[ 2, "desc" ]],
language: dataTableFrench
language: dataTableFrench,
"columns": [null, null, null, null, null, { "sType": "date" } ]
});
</script>
</body>

View file

@ -11,7 +11,7 @@
<script src="Chart.bundle.min.js"></script>
</head>
<body>
<div class="center_table" style="width: 1450px;">
<div class="center_table" style="width: 1500px;">
<br/>
<div class="center">Nombre de services : <span id="serviceCount">n/a</span></div>
@ -53,6 +53,7 @@
<th class="">URL</th>
<th class="">Logiciel</th>
<th class="" style="width: 100px;">Utilisateurs mensuels</th>
<th class="" style="width: 10px;">Visites mensuelles</th>
<th class="" style="width: 25px;">Statut</th>
<th class="" style="width: 25px;" colspan="5">Inscription</th>
<th class="" style="width: 25px;" colspan="5">Liens</th>
@ -79,7 +80,8 @@
<a href="#" id="serviceListLineSoftwareLink" title="">n/a</a>
</td>
<td id="serviceListLineUserCount" class="td_number">n/a</td>
<td id="serviceListLineVisitCount" class="td_number">n/a</td>
<td id="" class="td_icon_alone">
<img id="serviceStatusImg" src="status-void.png" title="n/a"/>
</td>
@ -136,7 +138,9 @@
paging: false,
ordering: true,
"order": [[ 2, "desc" ]],
language: dataTableFrench
language: dataTableFrench,
"columns": [null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, { "sType": "date" } ]
});
</script>
</body>