Skip to content

Commit

Permalink
feat: use header config file
Browse files Browse the repository at this point in the history
  • Loading branch information
f-necas committed Jan 8, 2025
1 parent c22b095 commit 3b4d0d5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/gwc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@

<groupId>org.geoserver</groupId>
<artifactId>gs-gwc</artifactId>
<version>2.25.2-georchestra</version>
<packaging>jar</packaging>
<name>GeoWebCache (GWC) Module</name>
<version>2.25.2-georchestra</version>

<dependencies>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion src/web/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

<groupId>org.geoserver.web</groupId>
<artifactId>gs-web-core</artifactId>
<packaging>jar</packaging>
<version>2.25.2-georchestra</version>
<packaging>jar</packaging>
<name>Core UI Module</name>

<dependencies>
Expand Down
3 changes: 3 additions & 0 deletions src/web/core/src/main/java/applicationContext.xml
Original file line number Diff line number Diff line change
Expand Up @@ -503,4 +503,7 @@
<bean id="georchestraStylesheet" class="java.lang.String" factory-method="valueOf">
<constructor-arg value="${georchestra.georchestraStylesheet:}" />
</bean>
<bean id="georchestraHeaderConfigFile" class="java.lang.String" factory-method="valueOf">
<constructor-arg value="${georchestra.headerConfigFile:}" />
</bean>
</beans>
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public class GeorchestraHeaderWebComponent extends WebComponent {
private String legacyHeader;
private String logoUrl;
private String georchestraStylesheet;
private String headerConfigFile;

private static Logger LOGGER = Logging.getLogger(GeorchestraHeaderWebComponent.class);

Expand All @@ -23,6 +24,8 @@ private void init() {
logoUrl = getGeoServerApplication().getBean("georchestraLogoUrl").toString();
georchestraStylesheet =
getGeoServerApplication().getBean("georchestraStylesheet").toString();
headerConfigFile =
getGeoServerApplication().getBean("georchestraHeaderConfigFile").toString();
}

protected GeoServerApplication getGeoServerApplication() {
Expand All @@ -36,11 +39,11 @@ public GeorchestraHeaderWebComponent(String id) {

@Override
protected void onComponentTag(ComponentTag tag) {
tag.put("style", "width:100%;height:" + this.headerHeight + "px;border:none;");
tag.put("active-app", "geoserver");
tag.put("legacy-url", this.headerUrl);
tag.put("legacy-header", this.legacyHeader);
tag.put("logo-url", this.logoUrl);
tag.put("config-file", this.headerConfigFile);
tag.put("stylesheet", this.georchestraStylesheet);
super.onComponentTag(tag);
}
Expand Down

0 comments on commit 3b4d0d5

Please sign in to comment.