Fixed bad path in last metrics page.

This commit is contained in:
Christian P. MOMON 2024-08-19 00:02:10 +02:00
parent dc73cd79f5
commit ce6801f8b3

View file

@ -80,16 +80,24 @@ public class LastStatsView
int index = 0; int index = 0;
for (Service service : services.sortByName()) for (Service service : services.sortByName())
{ {
data.setAttribute("serviceListLine", index, "serviceListLineOrganizationLink", "href", service.getOrganization().getTechnicalName() + ".xhtml"); String serviceRoot = "/federation/organizations/" + service.getOrganization().getTechnicalName() + "/services/"
data.setAttribute("serviceListLine", index, "serviceListLineOrganizationLogo", "src", service.getOrganization().getLogoFileName()); + service.getTechnicalName() + "/";
data.setEscapedAttribute("serviceListLine", index, "serviceListLineOrganizationLogo", "title", service.getOrganization().getName()); String organizationRoot = "/federation/organizations/" + service.getOrganization().getTechnicalName() + "/";
data.setAttribute("serviceListLine", index, "serviceListLineLogo", "src", service.getLogoFileName()); data.setAttribute("serviceListLine", index, "serviceListLineOrganizationLink", "href", organizationRoot);
data.setAttribute("serviceListLine", index, "serviceListLineOrganizationLogo", "src",
organizationRoot + service.getOrganization().getLogoFileName());
data.setEscapedAttribute("serviceListLine", index, "serviceListLineOrganizationLogo", "title",
service.getOrganization().getName());
data.setAttribute("serviceListLine", index, "serviceListLineLogo", "src", serviceRoot + service.getLogoFileName());
data.setEscapedContent("serviceListLine", index, "serviceListLineNameValue", service.getName()); data.setEscapedContent("serviceListLine", index, "serviceListLineNameValue", service.getName());
data.setAttribute("serviceListLine", index, "serviceListLineNameLink", "href", service.getOrganization().getTechnicalName() + "-" + service.getTechnicalName() + ".xhtml"); data.setAttribute("serviceListLine", index, "serviceListLineNameLink", "href", serviceRoot);
data.setAttribute("serviceListLine", index, "serviceStatusImg", "src", "/commons/status-" + service.getStatus().toString().toLowerCase() + ".png"); data.setAttribute("serviceListLine", index, "serviceStatusImg", "src",
data.setAttribute("serviceListLine", index, "serviceStatusImg", "title", StringUtils.defaultIfBlank(service.getStatusDescription(), service.getStatus().toString())); "/commons/status-" + service.getStatus().toString().toLowerCase() + ".png");
data.setAttribute("serviceListLine", index, "serviceStatusImg", "title",
StringUtils.defaultIfBlank(service.getStatusDescription(), service.getStatus().toString()));
if (service.getWebsiteURL() != null) if (service.getWebsiteURL() != null)
{ {
@ -99,16 +107,25 @@ public class LastStatsView
} }
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.setContent("serviceListLine", index, "serviceListLineHitCount", StatoolInfosUtils.defaultIfZero(service.getMonthHitCount(month), "😢")); data.setContent("serviceListLine", index, "serviceListLineHitCount",
data.setContent("serviceListLine", index, "serviceListLineVisitCount", StatoolInfosUtils.defaultIfZero(service.getMonthVisitCount(month), "😞")); StatoolInfosUtils.defaultIfZero(service.getMonthHitCount(month), "😢"));
data.setContent("serviceListLine", index, "serviceListLineVisitorCount", StatoolInfosUtils.defaultIfZero(service.getMonthVisitorCount(month), "😞")); data.setContent("serviceListLine", index, "serviceListLineVisitCount",
data.setContent("serviceListLine", index, "serviceListLineUserCount", StatoolInfosUtils.defaultIfZero(service.getMonthUserCount(month), "😢")); StatoolInfosUtils.defaultIfZero(service.getMonthVisitCount(month), "😞"));
data.setContent("serviceListLine", index, "serviceListLineAccountCount", StatoolInfosUtils.defaultIfZero(service.getMonthAccountCount(month), "😇")); data.setContent("serviceListLine", index, "serviceListLineVisitorCount",
data.setContent("serviceListLine", index, "serviceListLineActiveAccountCount", StatoolInfosUtils.defaultIfZero(service.getMonthActiveAccountCount(month), "😇")); StatoolInfosUtils.defaultIfZero(service.getMonthVisitorCount(month), "😞"));
data.setContent("serviceListLine", index, "serviceListLineDatabaseBytes", StatoolInfosUtils.defaultIfZero(service.getMonthDatabaseBytes(month), "😇")); data.setContent("serviceListLine", index, "serviceListLineUserCount",
data.setContent("serviceListLine", index, "serviceListLineDatafilesBytes", StatoolInfosUtils.defaultIfZero(service.getMonthDatafilesBytes(month), "😇")); StatoolInfosUtils.defaultIfZero(service.getMonthUserCount(month), "😢"));
data.setContent("serviceListLine", index, "serviceListLineAccountCount",
StatoolInfosUtils.defaultIfZero(service.getMonthAccountCount(month), "😇"));
data.setContent("serviceListLine", index, "serviceListLineActiveAccountCount",
StatoolInfosUtils.defaultIfZero(service.getMonthActiveAccountCount(month), "😇"));
data.setContent("serviceListLine", index, "serviceListLineDatabaseBytes",
StatoolInfosUtils.defaultIfZero(service.getMonthDatabaseBytes(month), "😇"));
data.setContent("serviceListLine", index, "serviceListLineDatafilesBytes",
StatoolInfosUtils.defaultIfZero(service.getMonthDatafilesBytes(month), "😇"));
index += 1; index += 1;
} }