diff --git a/pom.xml b/pom.xml
index 94e6016..3689245 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
de.assecutor.votianlt
votianlt
- 0.5.1
+ 0.5.2
jar
diff --git a/src/main/java/de/assecutor/votianlt/pages/view/AddJobView.java b/src/main/java/de/assecutor/votianlt/pages/view/AddJobView.java
index d5d9954..fab80ff 100644
--- a/src/main/java/de/assecutor/votianlt/pages/view/AddJobView.java
+++ b/src/main/java/de/assecutor/votianlt/pages/view/AddJobView.java
@@ -1238,7 +1238,6 @@ public class AddJobView extends Main {
qty.setMax(9999); // Set reasonable maximum
qty.setWidth("10%");
qty.setRequiredIndicatorVisible(true);
- qty.setPlaceholder("1");
// Add validation on blur
qty.addBlurListener(e -> {
if (qty.getValue() == null || qty.getValue() <= 0) {
diff --git a/src/main/java/de/assecutor/votianlt/pages/view/LoginView.java b/src/main/java/de/assecutor/votianlt/pages/view/LoginView.java
index 2f2062c..d3269b3 100644
--- a/src/main/java/de/assecutor/votianlt/pages/view/LoginView.java
+++ b/src/main/java/de/assecutor/votianlt/pages/view/LoginView.java
@@ -27,6 +27,7 @@ import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.web.context.HttpSessionSecurityContextRepository;
import com.vaadin.flow.server.VaadinSession;
import org.springframework.beans.factory.annotation.Value;
+import org.springframework.core.env.Environment;
import jakarta.annotation.PostConstruct;
@Route("login")
@@ -45,6 +46,9 @@ public class LoginView extends VerticalLayout implements BeforeEnterObserver, Af
@Autowired
private AuthenticationManager authenticationManager;
+ @Autowired
+ private Environment environment;
+
@Value("${app.security.two-factor.enabled:false}")
private boolean twoFactorEnabled;
@@ -108,7 +112,19 @@ public class LoginView extends VerticalLayout implements BeforeEnterObserver, Af
@PostConstruct
private void init() {
// Set version after Spring injection
- versionSpan.setText("Version " + appVersion);
+ String[] activeProfiles = environment.getActiveProfiles();
+ String[] defaultProfiles = environment.getDefaultProfiles();
+
+ String profileInfo = "";
+ if (activeProfiles.length > 0) {
+ profileInfo = " (" + String.join(", ", activeProfiles) + ")";
+ } else if (defaultProfiles.length > 0) {
+ profileInfo = " (" + String.join(", ", defaultProfiles) + ")";
+ } else {
+ profileInfo = " (default)";
+ }
+
+ versionSpan.setText("Version " + appVersion + profileInfo);
}
private void handlePasswordLogin(String username, String password) {
diff --git a/src/main/resources/application-dev.properties b/src/main/resources/application-dev.properties
new file mode 100644
index 0000000..16386d5
--- /dev/null
+++ b/src/main/resources/application-dev.properties
@@ -0,0 +1,10 @@
+# Development-specific configuration
+
+# MongoDB - Development database
+spring.data.mongodb.uri=mongodb://192.168.180.25:27017/votianlt_dev
+
+# Enable browser launch in development
+vaadin.launch-browser=true
+
+# Development logging levels
+logging.level.de.assecutor.votianlt=DEBUG
\ No newline at end of file
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 0a45580..99c6a81 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -1,5 +1,8 @@
server.port=${PORT:8080}
server.address=0.0.0.0
+
+# Default active profile
+spring.profiles.active=dev
logging.level.org.atmosphere=warn
logging.level.de.assecutor.votianlt=INFO
logging.level.de.assecutor.votianlt.controller.MessageController=DEBUG
@@ -15,7 +18,7 @@ vaadin.allowed-packages=com.vaadin,org.vaadin,de.assecutor.votianlt
# Open-in-view is only needed if you use lazy-loaded entities in your Flow views.
spring.jpa.open-in-view=false
-# MongoDB - Development database by default
+# MongoDB - Default configuration (override in profile-specific files)
spring.data.mongodb.uri=mongodb://192.168.180.25:27017/votianlt_dev
spring.data.mongodb.auto-index-creation=true
spring.data.mongodb.socket-timeout=30000