From cccd606ac77d0f446d2a08071c98da0822840b0e Mon Sep 17 00:00:00 2001
From: "Christian P. MOMON"
Date: Fri, 4 Jun 2021 16:51:50 +0200
Subject: [PATCH] Fixed n/a sort and date sort.
---
.../statoolinfos/htmlize/FederationPage.java | 22 ++-----------------
.../statoolinfos/htmlize/ServiceListView.java | 4 ++++
.../statoolinfos/htmlize/federation.xhtml | 3 ++-
.../htmlize/serviceListView.xhtml | 10 ++++++---
4 files changed, 15 insertions(+), 24 deletions(-)
diff --git a/src/fr/devinsy/statoolinfos/htmlize/FederationPage.java b/src/fr/devinsy/statoolinfos/htmlize/FederationPage.java
index c7d62f4..f218777 100644
--- a/src/fr/devinsy/statoolinfos/htmlize/FederationPage.java
+++ b/src/fr/devinsy/statoolinfos/htmlize/FederationPage.java
@@ -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")));
diff --git a/src/fr/devinsy/statoolinfos/htmlize/ServiceListView.java b/src/fr/devinsy/statoolinfos/htmlize/ServiceListView.java
index 74d4226..dceebd9 100644
--- a/src/fr/devinsy/statoolinfos/htmlize/ServiceListView.java
+++ b/src/fr/devinsy/statoolinfos/htmlize/ServiceListView.java
@@ -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")));
diff --git a/src/fr/devinsy/statoolinfos/htmlize/federation.xhtml b/src/fr/devinsy/statoolinfos/htmlize/federation.xhtml
index 678412d..f516cbb 100644
--- a/src/fr/devinsy/statoolinfos/htmlize/federation.xhtml
+++ b/src/fr/devinsy/statoolinfos/htmlize/federation.xhtml
@@ -50,7 +50,8 @@
paging: false,
ordering: true,
"order": [[ 2, "desc" ]],
- language: dataTableFrench
+ language: dataTableFrench,
+ "columns": [null, null, null, null, null, { "sType": "date" } ]
});
-
+
Nombre de services : n/a
@@ -53,6 +53,7 @@
URL |
Logiciel |
Utilisateurs mensuels |
+
Visites mensuelles |
Statut |
Inscription |
Liens |
@@ -79,7 +80,8 @@
n/a
n/a |
-
+
n/a |
+
|
@@ -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" } ]
});