Skip to content

Commit

Permalink
Live Preview: Add possibility to disable the feature in the config fi…
Browse files Browse the repository at this point in the history
…le sent to the frontend
  • Loading branch information
GeoffreyKarnbach committed Nov 27, 2024
1 parent 6fd4949 commit b1999f5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/java/org/damap/base/rest/ConfigResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ public class ConfigResource {
@ConfigProperty(name = "damap.fits-url")
Optional<URL> fitsUrl;

@ConfigProperty(name = "damap.gotenberg-url")
Optional<URL> gotenbergUrl;

/**
* config.
*
Expand All @@ -54,11 +57,16 @@ public ConfigDO config() {
configDO.setEnv(env);
configDO.setPersonSearchServiceConfigs(personServiceConfigurations.getConfigs());
configDO.setFitsServiceAvailable(getFitsServiceAvailability());
configDO.setLivePreviewAvailable(getGotenbergServiceAvailability());

return configDO;
}

private boolean getFitsServiceAvailability() {
return fitsUrl.isPresent();
}

private boolean getGotenbergServiceAvailability() {
return gotenbergUrl.isPresent();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ public class ConfigDO {
private String env;
private List<ServiceConfig> personSearchServiceConfigs;
private boolean fitsServiceAvailable;
private boolean livePreviewAvailable;
}

0 comments on commit b1999f5

Please sign in to comment.