Improved date format display.
This commit is contained in:
parent
5e208beb9a
commit
9a23ad5551
3 changed files with 9 additions and 9 deletions
|
@ -21,6 +21,7 @@ package fr.devinsy.statoolinfos.htmlize;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
@ -166,7 +167,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());
|
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;
|
index += 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,9 +22,7 @@ import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.Locale;
|
|
||||||
|
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.slf4j.Logger;
|
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.StatAgent;
|
||||||
import fr.devinsy.statoolinfos.stats.propertyfiles.PropertiesFileStat;
|
import fr.devinsy.statoolinfos.stats.propertyfiles.PropertiesFileStat;
|
||||||
import fr.devinsy.statoolinfos.stats.propertyfiles.PropertiesFileStats;
|
import fr.devinsy.statoolinfos.stats.propertyfiles.PropertiesFileStats;
|
||||||
import fr.devinsy.statoolinfos.util.BuildInformation;
|
|
||||||
import fr.devinsy.xidyn.XidynException;
|
import fr.devinsy.xidyn.XidynException;
|
||||||
import fr.devinsy.xidyn.data.TagDataManager;
|
import fr.devinsy.xidyn.data.TagDataManager;
|
||||||
import fr.devinsy.xidyn.presenters.PresenterUtils;
|
import fr.devinsy.xidyn.presenters.PresenterUtils;
|
||||||
|
@ -87,9 +84,6 @@ public class PropertiesFilesPage
|
||||||
|
|
||||||
TagDataManager data = new TagDataManager();
|
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("fileCount", stats.size());
|
||||||
data.setContent("lineCount", stats.getLineCount());
|
data.setContent("lineCount", stats.getLineCount());
|
||||||
data.setContent("propertyCount", stats.getPropertyCount());
|
data.setContent("propertyCount", stats.getPropertyCount());
|
||||||
|
@ -148,7 +142,8 @@ public class PropertiesFilesPage
|
||||||
data.setContent("fileListLine", index, "fileListLineVoidCount", stat.getVoidCount());
|
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;
|
index += 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
*/
|
*/
|
||||||
package fr.devinsy.statoolinfos.htmlize;
|
package fr.devinsy.statoolinfos.htmlize;
|
||||||
|
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
@ -81,7 +83,8 @@ public class ServiceListView
|
||||||
data.setEscapedContent("serviceListLine", index, "serviceListLineSoftwareLink", service.getSoftwareName());
|
data.setEscapedContent("serviceListLine", index, "serviceListLineSoftwareLink", service.getSoftwareName());
|
||||||
data.setAttribute("serviceListLine", index, "serviceListLineSoftwareLink", "href", "software-" + service.getSoftwareTechnicalName() + ".xhtml");
|
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", "src", "status-" + service.getStatus().toString().toLowerCase() + ".png");
|
||||||
data.setAttribute("serviceListLine", index, "serviceStatusImg", "title", StringUtils.defaultIfBlank(service.getStatusDescription(), service.getStatus().toString()));
|
data.setAttribute("serviceListLine", index, "serviceStatusImg", "title", StringUtils.defaultIfBlank(service.getStatusDescription(), service.getStatus().toString()));
|
||||||
|
|
Loading…
Reference in a new issue