1
0
mirror of https://github.com/Stirling-Tools/Stirling-PDF.git synced 2024-06-30 22:50:11 +02:00

name changes

This commit is contained in:
Anthony Stirling 2023-08-27 00:38:17 +01:00
parent 135f9611df
commit ca7c63c7d7
5 changed files with 58 additions and 59 deletions

View File

@ -1,14 +1,12 @@
package stirling.software.SPDF.config; package stirling.software.SPDF.config;
import java.util.Arrays;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment; import org.springframework.core.env.Environment;
import stirling.software.SPDF.utils.PropertyConfigs;
import stirling.software.SPDF.model.ApplicationProperties; import stirling.software.SPDF.model.ApplicationProperties;
@Configuration @Configuration
public class AppConfig { public class AppConfig {
@ -24,7 +22,7 @@ public class AppConfig {
@Bean(name = "appName") @Bean(name = "appName")
public String appName() { public String appName() {
String homeTitle = applicationProperties.getUi().getHomeName(); String homeTitle = applicationProperties.getUi().getAppName();
return (homeTitle != null) ? homeTitle : "Stirling PDF"; return (homeTitle != null) ? homeTitle : "Stirling PDF";
} }
@ -42,7 +40,7 @@ public class AppConfig {
@Bean(name = "navBarText") @Bean(name = "navBarText")
public String navBarText() { public String navBarText() {
String defaultNavBar = applicationProperties.getUi().getNavbarName() != null ? applicationProperties.getUi().getNavbarName() : applicationProperties.getUi().getHomeName(); String defaultNavBar = applicationProperties.getUi().getAppNameNavbar() != null ? applicationProperties.getUi().getAppNameNavbar() : applicationProperties.getUi().getAppName();
return (defaultNavBar != null) ? defaultNavBar : "Stirling PDF"; return (defaultNavBar != null) ? defaultNavBar : "Stirling PDF";
} }

View File

@ -174,8 +174,8 @@ public class ApplicationProperties {
public static class System { public static class System {
private String defaultLocale; private String defaultLocale;
private Boolean googlevisibility; private Boolean googlevisibility;
private String rootPath; private String rootURIPath;
private String customstaticFilePath; private String customStaticFilePath;
private Integer maxFileSize; private Integer maxFileSize;
public String getDefaultLocale() { public String getDefaultLocale() {
@ -194,20 +194,20 @@ public class ApplicationProperties {
this.googlevisibility = googlevisibility; this.googlevisibility = googlevisibility;
} }
public String getRootPath() { public String getRootURIPath() {
return rootPath; return rootURIPath;
} }
public void setRootPath(String rootPath) { public void setRootURIPath(String rootURIPath) {
this.rootPath = rootPath; this.rootURIPath = rootURIPath;
} }
public String getCustomstaticFilePath() { public String getCustomStaticFilePath() {
return customstaticFilePath; return customStaticFilePath;
} }
public void setCustomstaticFilePath(String customstaticFilePath) { public void setCustomStaticFilePath(String customStaticFilePath) {
this.customstaticFilePath = customstaticFilePath; this.customStaticFilePath = customStaticFilePath;
} }
public Integer getMaxFileSize() { public Integer getMaxFileSize() {
@ -220,8 +220,8 @@ public class ApplicationProperties {
@Override @Override
public String toString() { public String toString() {
return "System [defaultLocale=" + defaultLocale + ", googlevisibility=" + googlevisibility + ", rootPath=" return "System [defaultLocale=" + defaultLocale + ", googlevisibility=" + googlevisibility + ", rootURIPath="
+ rootPath + ", customstaticFilePath=" + customstaticFilePath + ", maxFileSize=" + maxFileSize + rootURIPath + ", customStaticFilePath=" + customStaticFilePath + ", maxFileSize=" + maxFileSize
+ "]"; + "]";
} }
@ -229,43 +229,41 @@ public class ApplicationProperties {
} }
public static class Ui { public static class Ui {
private String homeName; private String appName;
private String homeDescription; private String homeDescription;
private String navbarName; private String appNameNavbar;
public String getHomeName() { public String getAppName() {
return homeName; return appName;
} }
public void setHomeName(String homeName) { public void setAppName(String appName) {
this.homeName = homeName; this.appName = appName;
} }
public String getHomeDescription() { public String getHomeDescription() {
return homeDescription; return homeDescription;
} }
public void setHomeDescription(String homeDescription) { public void setHomeDescription(String homeDescription) {
this.homeDescription = homeDescription; this.homeDescription = homeDescription;
} }
public String getNavbarName() { public String getAppNameNavbar() {
return navbarName; return appNameNavbar;
} }
public void setNavbarName(String navbarName) {
this.navbarName = navbarName;
}
@Override
public String toString() {
return "Ui [homeName=" + homeName + ", homeDescription=" + homeDescription + ", navbarName=" + navbarName
+ "]";
}
public void setAppNameNavbar(String appNameNavbar) {
this.appNameNavbar = appNameNavbar;
}
@Override
public String toString() {
return "UserInterface [appName=" + appName + ", homeDescription=" + homeDescription + ", appNameNavbar=" + appNameNavbar + "]";
}
} }
public static class Endpoints { public static class Endpoints {
private List<String> toRemove; private List<String> toRemove;
private List<String> groupsToRemove; private List<String> groupsToRemove;

View File

@ -22,15 +22,15 @@ server.error.include-message=always
server.servlet.session.tracking-modes=cookie server.servlet.session.tracking-modes=cookie
server.servlet.context-path=${APP_ROOT_PATH:/} server.servlet.context-path=${SYSTEM_ROOTURIPATH:/}
spring.devtools.restart.enabled=true spring.devtools.restart.enabled=true
spring.devtools.livereload.enabled=true spring.devtools.livereload.enabled=true
spring.thymeleaf.encoding=UTF-8 spring.thymeleaf.encoding=UTF-8
server.connection-timeout=${CONNECTION_TIMEOUT:5m} server.connection-timeout=${SYSTEM_CONNECTIONTIMEOUTMINUTES:5m}
spring.mvc.async.request-timeout=${ASYNC_CONNECTION_TIMEOUT:300000} spring.mvc.async.request-timeout=${SYSTEM_CONNECTIONTIMEOUTMILLISECONDS:300000}
spring.resources.static-locations=file:customFiles/static/ spring.resources.static-locations=file:customFiles/static/
#spring.thymeleaf.prefix=file:/customFiles/templates/,classpath:/templates/ #spring.thymeleaf.prefix=file:/customFiles/templates/,classpath:/templates/

View File

@ -1,3 +1,7 @@
# Welcome to settings file
# Remove comment marker # if on start of line to enable the configuration
# If you want to override with environment parameter follow parameter naming SECURITY_INITIALLOGIN_USERNAME
security: security:
enableLogin: false # set to 'true' to enable login enableLogin: false # set to 'true' to enable login
initialLogin: initialLogin:
@ -8,14 +12,16 @@ security:
system: system:
defaultLocale: 'en-US' # Set the default language (e.g. 'de-DE', 'fr-FR', etc) defaultLocale: 'en-US' # Set the default language (e.g. 'de-DE', 'fr-FR', etc)
googlevisibility: false # 'true' to allow Google visibility, 'false' to disallow googlevisibility: false # 'true' to allow Google visibility, 'false' to disallow
rootPath: / # Set the application's root URI (e.g. /pdf-app) rootURIPath: / # Set the application's root URI (e.g. /pdf-app)
customstaticFilePath: '/customFiles/static/' # Directory path for custom static files customStaticFilePath: '/customFiles/static/' # Directory path for custom static files
maxFileSize: 2000 # Set the maximum file size in MB maxFileSize: 2000 # Set the maximum file size in MB
connectionTimeoutMinutes: 5m
connectionTimeoutMilliSeconds: 300000
ui: #ui:
homeName: # Application's visible name # appName: exampleAppName # Application's visible name
homeDescription: # Short description or tagline. # homeDescription: I am a description # Short description or tagline shown on homepage.
navbarName: # Name displayed on the navigation bar # appNameNavbar: navbarName # Name displayed on the navigation bar
endpoints: endpoints:
toRemove: [] # List endpoints to disable (e.g. ['img-to-pdf', 'remove-pages']) toRemove: [] # List endpoints to disable (e.g. ['img-to-pdf', 'remove-pages'])
@ -23,4 +29,3 @@ endpoints:
metrics: metrics:
enabled: true # 'true' to enable metric API endpoints, 'false' to disable enabled: true # 'true' to enable metric API endpoints, 'false' to disable

View File

@ -24,9 +24,7 @@
<p th:text="${message} + ' for path: ' + ${path}"></p> <p th:text="${message} + ' for path: ' + ${path}"></p>
<button type="button" class="btn btn-danger" th:if="${trace}" onclick="toggletrace()">Show Stack Trace</button> <button type="button" class="btn btn-danger" th:if="${trace}" onclick="toggletrace()">Show Stack Trace</button>
<button type="button" class="btn btn-secondary" th:if="${trace}" onclick="copytrace()">Copy Stack Trace</button> <button type="button" class="btn btn-secondary" th:if="${trace}" onclick="copytrace()">Copy Stack Trace</button>
<button type="button" class="close" data-bs-dismiss="alert" aria-label="Close" onclick="dismissError()"> <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close" onclick="dismissError()"></button>
<span aria-hidden="true">&times;</span>
</button>
<!-- Stack trace section --> <!-- Stack trace section -->
<div id="trace" th:if="${trace}" style="max-height: 0; overflow: hidden;"> <div id="trace" th:if="${trace}" style="max-height: 0; overflow: hidden;">
<div style="background-color: #f8d7da; border: 1px solid #f5c6cb; border-radius: 3px; padding: 10px; margin-top: 5px;"> <div style="background-color: #f8d7da; border: 1px solid #f5c6cb; border-radius: 3px; padding: 10px; margin-top: 5px;">