Fixed header view links.

This commit is contained in:
Christian P. MOMON 2024-08-14 03:08:24 +02:00
parent f69a43fb19
commit 6dd90ff3b4

View file

@ -58,8 +58,9 @@ public class ServiceHeaderView
{ {
TagDataManager data = new TagDataManager(); TagDataManager data = new TagDataManager();
data.setAttribute("serviceLogo", "src", "/federation/organizations/" + service.getOrganization().getTechnicalName() + "/services/" String servicePath = "/federation/organizations/" + service.getOrganization().getTechnicalName() + "/services/"
+ service.getTechnicalName() + "/" + service.getLogoFileName()); + service.getTechnicalName();
data.setAttribute("serviceLogo", "src", servicePath + "/" + service.getLogoFileName());
data.setEscapedContent("serviceName", service.getName()); data.setEscapedContent("serviceName", service.getName());
if (service.getWebsiteURL() != null) if (service.getWebsiteURL() != null)
@ -89,14 +90,13 @@ public class ServiceHeaderView
data.setAttribute("organizationsLink", "href", data.setAttribute("organizationsLink", "href",
"/federation/organizations/" + service.getOrganization().getTechnicalName() + "/services.xhtml"); "/federation/organizations/" + service.getOrganization().getTechnicalName() + "/services.xhtml");
data.setAttribute("servicesLink", "href", "services.xhtml"); data.setAttribute("servicesLink", "href", servicePath + "/services.xhtml");
data.setAttribute("rawLink", "href", service.getTechnicalName() + ".properties"); data.setAttribute("rawLink", "href", servicePath + "/" + service.getTechnicalName() + ".properties");
data.setAttribute("rawCheckLink", "href", "propertyCheck.xhtml"); data.setAttribute("rawCheckLink", "href", servicePath + "/propertyCheck.xhtml");
data.setAttribute("statsLink", "href", "stats.xhtml"); data.setAttribute("statsLink", "href", servicePath + "/stats.xhtml");
data.setAttribute("metricsLink", "href", "/federation/organizations/" + service.getOrganization().getTechnicalName() + "/services/" data.setAttribute("metricsLink", "href", servicePath + "/metrics/");
+ service.getTechnicalName() + "/metrics/");
if (service.getLegalURL() != null) if (service.getLegalURL() != null)
{ {
@ -179,7 +179,7 @@ public class ServiceHeaderView
data.getIdData("softwareSourceLinkImg").getAttribute("class").setMode(DisplayMode.REPLACE); data.getIdData("softwareSourceLinkImg").getAttribute("class").setMode(DisplayMode.REPLACE);
} }
data.setAttribute("crawlLink", "href", "crawl.xhtml"); data.setAttribute("crawlLink", "href", servicePath + "/crawl.xhtml");
if (service.getCrawlJournal().getErrors().isEmpty()) if (service.getCrawlJournal().getErrors().isEmpty())
{ {
data.setAttribute("crawlLinkImg", "src", "/commons/circle-icons/download-mono.svg"); data.setAttribute("crawlLinkImg", "src", "/commons/circle-icons/download-mono.svg");
@ -189,8 +189,7 @@ public class ServiceHeaderView
data.setAttribute("crawlLinkImg", "src", "/commons/circle-icons/download.svg"); data.setAttribute("crawlLinkImg", "src", "/commons/circle-icons/download.svg");
} }
data.setAttribute("uptimeLink", "href", "/federation/organizations/" + service.getOrganization().getTechnicalName() + "/services/" data.setAttribute("uptimeLink", "href", servicePath + "/uptime.xhtml");
+ service.getTechnicalName() + "/uptime.xhtml");
Services services = new Services(); Services services = new Services();
services.add(service); services.add(service);
if (uptimeJournal.hasRecentError(services)) if (uptimeJournal.hasRecentError(services))
@ -208,7 +207,7 @@ public class ServiceHeaderView
data.setContent("warningCount", checks.getWarningCount()); data.setContent("warningCount", checks.getWarningCount());
data.setContent("voidCount", checks.getVoidCount()); data.setContent("voidCount", checks.getVoidCount());
data.setAttribute("alertLink", "href", "propertyAlert.xhtml"); data.setAttribute("alertLink", "href", servicePath + "/propertyAlert.xhtml");
} }
// //