diff --git a/src/fr/devinsy/statoolinfos/htmlize/FederationPage.java b/src/fr/devinsy/statoolinfos/htmlize/FederationPage.java index 26dd2ec..125d5b9 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/FederationPage.java +++ b/src/fr/devinsy/statoolinfos/htmlize/FederationPage.java @@ -21,6 +21,7 @@ package fr.devinsy.statoolinfos.htmlize; import java.io.File; import java.io.IOException; import java.nio.charset.StandardCharsets; +import java.time.format.DateTimeFormatter; import org.apache.commons.io.FileUtils; import org.apache.commons.lang3.StringUtils; @@ -166,7 +167,8 @@ public class FederationPage data.setContent("organizationListLine", index, "organizationListLineServiceCount", organization.getServiceCount()); - data.setContent("organizationListLine", index, "organizationListLineDate", organization.getCrawledDate().toString()); + 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"))); index += 1; } diff --git a/src/fr/devinsy/statoolinfos/htmlize/PropertiesFilesPage.java b/src/fr/devinsy/statoolinfos/htmlize/PropertiesFilesPage.java index 6988b8e..f9459a2 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/PropertiesFilesPage.java +++ b/src/fr/devinsy/statoolinfos/htmlize/PropertiesFilesPage.java @@ -22,9 +22,7 @@ import java.io.File; import java.io.IOException; import java.net.MalformedURLException; import java.nio.charset.StandardCharsets; -import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; -import java.util.Locale; import org.apache.commons.io.FileUtils; import org.slf4j.Logger; @@ -37,7 +35,6 @@ import fr.devinsy.statoolinfos.crawl.CrawlCache; import fr.devinsy.statoolinfos.stats.StatAgent; import fr.devinsy.statoolinfos.stats.propertyfiles.PropertiesFileStat; import fr.devinsy.statoolinfos.stats.propertyfiles.PropertiesFileStats; -import fr.devinsy.statoolinfos.util.BuildInformation; import fr.devinsy.xidyn.XidynException; import fr.devinsy.xidyn.data.TagDataManager; import fr.devinsy.xidyn.presenters.PresenterUtils; @@ -87,9 +84,6 @@ public class PropertiesFilesPage TagDataManager data = new TagDataManager(); - data.setContent("versionsup", BuildInformation.instance().version()); - data.setContent("lastUpdateDate", LocalDateTime.now().format(DateTimeFormatter.ofPattern("dd/MM/yyyy HH':'mm", Locale.FRANCE))); - data.setContent("fileCount", stats.size()); data.setContent("lineCount", stats.getLineCount()); data.setContent("propertyCount", stats.getPropertyCount()); @@ -148,7 +142,8 @@ public class PropertiesFilesPage data.setContent("fileListLine", index, "fileListLineVoidCount", stat.getVoidCount()); } - data.setContent("fileListLine", index, "fileListLineDate", stat.getUpdateDate().toString()); + data.setContent("fileListLine", index, "fileListLineDate", stat.getUpdateDate().format(DateTimeFormatter.ofPattern("dd/MM/YYYY"))); + data.setAttribute("fileListLine", index, "fileListLineDate", "title", stat.getUpdateDate().format(DateTimeFormatter.ofPattern("HH:mm:ss"))); index += 1; } diff --git a/src/fr/devinsy/statoolinfos/htmlize/ServiceListView.java b/src/fr/devinsy/statoolinfos/htmlize/ServiceListView.java index e180132..06c670d 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/ServiceListView.java +++ b/src/fr/devinsy/statoolinfos/htmlize/ServiceListView.java @@ -18,6 +18,8 @@ */ package fr.devinsy.statoolinfos.htmlize; +import java.time.format.DateTimeFormatter; + import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -81,7 +83,8 @@ public class ServiceListView data.setEscapedContent("serviceListLine", index, "serviceListLineSoftwareLink", service.getSoftwareName()); data.setAttribute("serviceListLine", index, "serviceListLineSoftwareLink", "href", "software-" + service.getSoftwareTechnicalName() + ".xhtml"); - data.setEscapedContent("serviceListLine", index, "serviceListLineDate", service.getCrawledDate().toString()); + 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"))); data.setAttribute("serviceListLine", index, "serviceStatusImg", "src", "status-" + service.getStatus().toString().toLowerCase() + ".png"); data.setAttribute("serviceListLine", index, "serviceStatusImg", "title", StringUtils.defaultIfBlank(service.getStatusDescription(), service.getStatus().toString()));