Added some dates.

This commit is contained in:
Christian P. MOMON 2020-09-28 03:52:51 +02:00
parent 0474353463
commit b568101584
15 changed files with 81 additions and 11 deletions

View file

@ -21,6 +21,7 @@ package fr.devinsy.statoolinfos.core;
import java.io.File; import java.io.File;
import java.net.MalformedURLException; import java.net.MalformedURLException;
import java.net.URL; import java.net.URL;
import java.time.LocalDateTime;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@ -85,6 +86,21 @@ public class Federation extends PathPropertyList
return result; return result;
} }
/**
* Gets the crawled date.
*
* @return the crawled date
*/
public LocalDateTime getCrawledDate()
{
LocalDateTime result;
result = LocalDateTime.parse(get("crawl.file.datetime"));
//
return result;
}
/** /**
* Gets the description. * Gets the description.
* *

View file

@ -21,6 +21,7 @@ package fr.devinsy.statoolinfos.core;
import java.io.File; import java.io.File;
import java.net.MalformedURLException; import java.net.MalformedURLException;
import java.net.URL; import java.net.URL;
import java.time.LocalDateTime;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@ -67,6 +68,21 @@ public class Organization extends PathPropertyList
} }
} }
/**
* Gets the crawled date.
*
* @return the crawled date
*/
public LocalDateTime getCrawledDate()
{
LocalDateTime result;
result = LocalDateTime.parse(get("crawl.file.datetime"));
//
return result;
}
public String getDescription() public String getDescription()
{ {
String result; String result;

View file

@ -21,6 +21,7 @@ package fr.devinsy.statoolinfos.core;
import java.io.File; import java.io.File;
import java.net.MalformedURLException; import java.net.MalformedURLException;
import java.net.URL; import java.net.URL;
import java.time.LocalDateTime;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@ -56,6 +57,16 @@ public class Service extends PathPropertyList
super(properties); super(properties);
} }
public LocalDateTime getCrawledDate()
{
LocalDateTime result;
result = LocalDateTime.parse(get("crawl.file.datetime"));
//
return result;
}
/** /**
* Gets the description. * Gets the description.
* *

View file

@ -73,6 +73,8 @@ public class FederationPage
data.setContent("organizationListLine", index, "organizationListLineServiceCount", organization.getServiceCount()); data.setContent("organizationListLine", index, "organizationListLineServiceCount", organization.getServiceCount());
data.setContent("organizationListLine", index, "organizationListLineDate", organization.getCrawledDate().toString());
index += 1; index += 1;
} }

View file

@ -74,6 +74,7 @@ public class OrganizationPage
data.setAttribute("serviceListLine", index, "serviceListLineSoftwareLink", "href", "software-" + StatoolInfosUtils.toTechnicalName(service.getSoftwareName()) + ".xhtml"); data.setAttribute("serviceListLine", index, "serviceListLineSoftwareLink", "href", "software-" + StatoolInfosUtils.toTechnicalName(service.getSoftwareName()) + ".xhtml");
data.setEscapedContent("serviceListLine", index, "serviceListLineSoftwareValue", service.getSoftwareName()); data.setEscapedContent("serviceListLine", index, "serviceListLineSoftwareValue", service.getSoftwareName());
data.setEscapedContent("serviceListLine", index, "serviceListLineDate", service.getCrawledDate().toString());
index += 1; index += 1;
} }

View file

@ -80,6 +80,7 @@ public class PropertiesFilesPage
data.setContent("fileListLine", index, "fileListLineBlankPropertyCount", stat.getBlankPropertyCount()); data.setContent("fileListLine", index, "fileListLineBlankPropertyCount", stat.getBlankPropertyCount());
data.setContent("fileListLine", index, "fileListLineFilledPropertyCount", stat.getFilledPropertyCount()); data.setContent("fileListLine", index, "fileListLineFilledPropertyCount", stat.getFilledPropertyCount());
data.setContent("fileListLine", index, "fileListLineErrorCount", stat.getErrorCount()); data.setContent("fileListLine", index, "fileListLineErrorCount", stat.getErrorCount());
data.setContent("fileListLine", index, "fileListLineDate", stat.getUpdateDate().toString());
index += 1; index += 1;
} }

View file

@ -71,6 +71,7 @@ public class ServicesPage
data.setEscapedContent("serviceListLine", index, "serviceListLineWebsiteLink", service.getWebsite()); data.setEscapedContent("serviceListLine", index, "serviceListLineWebsiteLink", service.getWebsite());
data.setAttribute("serviceListLine", index, "serviceListLineWebsiteLink", "href", service.getWebsite()); data.setAttribute("serviceListLine", index, "serviceListLineWebsiteLink", "href", service.getWebsite());
data.setEscapedContent("serviceListLine", index, "serviceListLineSoftware", service.getSoftwareName()); data.setEscapedContent("serviceListLine", index, "serviceListLineSoftware", service.getSoftwareName());
data.setEscapedContent("serviceListLine", index, "serviceListLineDate", service.getCrawledDate().toString());
index += 1; index += 1;
} }

View file

@ -19,7 +19,7 @@
<table class="table_classic center_table sortable" style="width: 900px; margin-left: auto; margin-right: auto;"> <table class="table_classic center_table sortable" style="width: 900px; margin-left: auto; margin-right: auto;">
<thead> <thead>
<tr> <tr>
<th class="">Nom de la catégorie</th> <th class="" style="width: 200px;">Nom de la catégorie</th>
<th class="">Logiciels</th> <th class="">Logiciels</th>
<th class="" style="width: 100px;">Services</th> <th class="" style="width: 100px;">Services</th>
<th class="" style="width: 100px;">Organisations</th> <th class="" style="width: 100px;">Organisations</th>
@ -31,9 +31,7 @@
<td id="categoryListLineName" style="padding-top: 0; padding-bottom: 0;"> <td id="categoryListLineName" style="padding-top: 0; padding-bottom: 0;">
<a href="#" id="categoryListLineNameLink" title="">n/a</a> <a href="#" id="categoryListLineNameLink" title="">n/a</a>
</td> </td>
<td id="categoryListLineCategory" style="padding-top: 0; padding-bottom: 0;"> <td id="categoryListLineSoftwares">n/a</td>
<a href="#" id="categoryListLineCategoryLink" title="categoryListLineCategoryDescription">n/a</a>
</td>
<td id="categoryListLineServiceCount" class="td_number">n/a</td> <td id="categoryListLineServiceCount" class="td_number">n/a</td>
<td id="categoryListLineOrganizationCount" class="td_number">n/a</td> <td id="categoryListLineOrganizationCount" class="td_number">n/a</td>
<td id="categoryListLineUserCount" class="td_number">n/a</td> <td id="categoryListLineUserCount" class="td_number">n/a</td>

View file

@ -17,13 +17,14 @@
<div>Nombre de membres : <span id="organizationCount">n/a</span></div> <div>Nombre de membres : <span id="organizationCount">n/a</span></div>
<div>Nombre de services : <span id="serviceCount">n/a</span></div> <div>Nombre de services : <span id="serviceCount">n/a</span></div>
<div class="left"> <div class="left">
<table class="table_classic center_table sortable" style="width: 600px; margin-left: auto; margin-right: auto;"> <table class="table_classic center_table sortable" style="width: 800px; margin-left: auto; margin-right: auto;">
<thead> <thead>
<tr> <tr>
<th style="width: 200px;">Nom du membre</th> <th style="width: 200px;">Nom du membre</th>
<th style="width: 250px;">URL</th> <th style="width: 250px;">URL</th>
<th style="width: 10px;">Services</th> <th style="width: 10px;">Services</th>
<th style="width: 10px;">Utilisateurs mensuels</th> <th style="width: 10px;">Utilisateurs mensuels</th>
<th style="width: 10px;">Date</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -35,8 +36,9 @@
</a> </a>
</td> </td>
<td id="organizationListLineUrl"><a href="#" id="organizationListLineUrlLink">n/a</a></td> <td id="organizationListLineUrl"><a href="#" id="organizationListLineUrlLink">n/a</a></td>
<td id="organizationListLineServiceCount" class="center">n/a</td> <td id="organizationListLineServiceCount" class="td_number">n/a</td>
<td id="organizationListLineUserCount" class="center">n/a</td> <td id="organizationListLineUserCount" class="td_number">n/a</td>
<td id="organizationListLineDate" class="center">n/a</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

View file

@ -20,13 +20,14 @@
<p id="organizationDescription">Bla bla description</p> <p id="organizationDescription">Bla bla description</p>
<div>Nombre de services : <span id="serviceCount">n/a</span></div> <div>Nombre de services : <span id="serviceCount">n/a</span></div>
<div class="left"> <div class="left">
<table class="table_classic center_table sortable" style="width: 600px; margin-left: auto; margin-right: auto;"> <table class="table_classic center_table sortable" style="width: 900px; margin-left: auto; margin-right: auto;">
<thead> <thead>
<tr> <tr>
<th class="">Nom du service</th> <th class="" style="width: 200px;">Nom du service</th>
<th class="">URL</th> <th class="">URL</th>
<th class="">Logiciel</th> <th class="">Logiciel</th>
<th class="" style="width: 100px;">Utilisateurs mensuels</th> <th class="" style="width: 100px;">Utilisateurs mensuels</th>
<th class="" style="width: 100px;">Date</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -44,6 +45,7 @@
</a> </a>
</td> </td>
<td id="serviceListLineUserCount" class="td_number">n/a</td> <td id="serviceListLineUserCount" class="td_number">n/a</td>
<td id="serviceListLineDate" class="center">n/a</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

View file

@ -25,6 +25,7 @@
<th style="width: 100px;">Remplies</th> <th style="width: 100px;">Remplies</th>
<th style="width: 100px;">Vides</th> <th style="width: 100px;">Vides</th>
<th style="width: 100px;">Erreurs</th> <th style="width: 100px;">Erreurs</th>
<th style="width: 100px;">Date</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -43,6 +44,7 @@
<td id="fileListLineFilledPropertyCount" class="td_number">n/a</td> <td id="fileListLineFilledPropertyCount" class="td_number">n/a</td>
<td id="fileListLineBlankPropertyCount" class="td_number">n/a</td> <td id="fileListLineBlankPropertyCount" class="td_number">n/a</td>
<td id="fileListLineErrorCount" class="td_number">n/a</td> <td id="fileListLineErrorCount" class="td_number">n/a</td>
<td id="fileListLineDate" class="td_number">n/a</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

View file

@ -25,12 +25,14 @@
<th class="">URL</th> <th class="">URL</th>
<th class="">Logiciel</th> <th class="">Logiciel</th>
<th class="">Utilisateurs mensuels</th> <th class="">Utilisateurs mensuels</th>
<th style="width: 10px;">Date</th>
</tr> </tr>
<tr id="serviceListLine"> <tr id="serviceListLine">
<td id="serviceListLineName"><a href="#" id="serviceListLineNameLink">n/a</a></td> <td id="serviceListLineName"><a href="#" id="serviceListLineNameLink">n/a</a></td>
<td id="serviceListLineUrl"><a href="#" id="serviceListLineUrlLink">n/a</a></td> <td id="serviceListLineUrl"><a href="#" id="serviceListLineUrlLink">n/a</a></td>
<td id="serviceListLineSoftware">n/a</td> <td id="serviceListLineSoftware">n/a</td>
<td id="serviceListLineUserCount">n/a</td> <td id="serviceListLineUserCount">n/a</td>
<td id="serviceListLineDate" class="center">n/a</td>
</tr> </tr>
</table> </table>
</div> </div>

View file

@ -16,14 +16,15 @@
<div>Nombre de services : <span id="serviceCount">n/a</span></div> <div>Nombre de services : <span id="serviceCount">n/a</span></div>
<div class="left"> <div class="left">
<table class="table_classic center_table sortable" style="width: 900px; margin-left: auto; margin-right: auto;"> <table class="table_classic center_table sortable" style="width: 1000px; margin-left: auto; margin-right: auto;">
<thead> <thead>
<tr> <tr>
<th class="">Nom du service</th> <th class="" style="width: 200px;">Nom du service</th>
<th class="">Organisation</th> <th class="">Organisation</th>
<th class="">URL</th> <th class="">URL</th>
<th class="">Logiciel</th> <th class="">Logiciel</th>
<th class="" style="width: 100px;">Utilisateurs mensuels</th> <th class="" style="width: 100px;">Utilisateurs mensuels</th>
<th class="" style="width: 100px;">Date</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -43,6 +44,7 @@
<td id="serviceListLineWebsite"><a href="#" id="serviceListLineWebsiteLink">n/a</a></td> <td id="serviceListLineWebsite"><a href="#" id="serviceListLineWebsiteLink">n/a</a></td>
<td id="serviceListLineSoftware">n/a</td> <td id="serviceListLineSoftware">n/a</td>
<td id="serviceListLineUserCount" class="td_number">n/a</td> <td id="serviceListLineUserCount" class="td_number">n/a</td>
<td id="serviceListLineDate" class="center">n/a</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

View file

@ -19,6 +19,7 @@
package fr.devinsy.statoolinfos.stats.propertyfiles; package fr.devinsy.statoolinfos.stats.propertyfiles;
import java.net.URL; import java.net.URL;
import java.time.LocalDateTime;
import fr.devinsy.statoolinfos.core.Organization; import fr.devinsy.statoolinfos.core.Organization;
@ -35,6 +36,7 @@ public class PropertiesFileStat
private int blankPropertyCount; private int blankPropertyCount;
private int filledPropertyCount; private int filledPropertyCount;
private int errorCount; private int errorCount;
private LocalDateTime updateDate;
/** /**
* Instantiates a new properties file stat. * Instantiates a new properties file stat.
@ -78,6 +80,11 @@ public class PropertiesFileStat
return this.organization; return this.organization;
} }
public LocalDateTime getUpdateDate()
{
return this.updateDate;
}
public URL getURL() public URL getURL()
{ {
return this.url; return this.url;
@ -143,6 +150,11 @@ public class PropertiesFileStat
this.organization = organization; this.organization = organization;
} }
public void setUpdateDate(final LocalDateTime updateDate)
{
this.updateDate = updateDate;
}
public void setURL(final URL url) public void setURL(final URL url)
{ {
this.url = url; this.url = url;

View file

@ -138,6 +138,7 @@ public class PropertiesFileStats extends ArrayList<PropertiesFileStat>
result.setURL(organization.getInputURL()); result.setURL(organization.getInputURL());
result.setLocalName(organization.getTechnicalName() + ".properties"); result.setLocalName(organization.getTechnicalName() + ".properties");
result.setOrganization(organization); result.setOrganization(organization);
result.setUpdateDate(organization.getCrawledDate());
// //
return result; return result;
@ -161,6 +162,7 @@ public class PropertiesFileStats extends ArrayList<PropertiesFileStat>
result.setURL(service.getInputURL()); result.setURL(service.getInputURL());
result.setLocalName(service.getOrganization().getTechnicalName() + "-" + service.getTechnicalName() + ".properties"); result.setLocalName(service.getOrganization().getTechnicalName() + "-" + service.getTechnicalName() + ".properties");
result.setOrganization(service.getOrganization()); result.setOrganization(service.getOrganization());
result.setUpdateDate(service.getCrawledDate());
// //
return result; return result;