call user-service for testing
Signed-off-by: Peter Siegmund <developer@mars3142.org>
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -13,7 +13,7 @@
|
|||||||
<java.version>21</java.version>
|
<java.version>21</java.version>
|
||||||
<vaadin.version>24.4.0.beta4</vaadin.version>
|
<vaadin.version>24.4.0.beta4</vaadin.version>
|
||||||
<spring-cloud.version>2023.0.1</spring-cloud.version>
|
<spring-cloud.version>2023.0.1</spring-cloud.version>
|
||||||
<spring-cloud-gcp.version>5.3.0</spring-cloud-gcp.version>
|
<spring-cloud-gcp.version>5.4.1</spring-cloud-gcp.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
|
@@ -38,7 +38,7 @@ import java.util.LinkedHashSet;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
@PageTitle("Checkout Form")
|
@PageTitle("Checkout Form")
|
||||||
@Route(value = "", layout = MainLayout.class)
|
@Route(value = "/checkout", layout = MainLayout.class)
|
||||||
public class CheckoutFormView extends Div {
|
public class CheckoutFormView extends Div {
|
||||||
|
|
||||||
private static final Set<String> states = new LinkedHashSet<>();
|
private static final Set<String> states = new LinkedHashSet<>();
|
||||||
|
@@ -0,0 +1,34 @@
|
|||||||
|
package dev.mars3142.fhq.views.landingpage;
|
||||||
|
|
||||||
|
import com.vaadin.flow.component.applayout.AppLayout;
|
||||||
|
import com.vaadin.flow.component.html.Div;
|
||||||
|
import com.vaadin.flow.component.html.NativeLabel;
|
||||||
|
import com.vaadin.flow.component.orderedlayout.HorizontalLayout;
|
||||||
|
import jakarta.annotation.PostConstruct;
|
||||||
|
import lombok.val;
|
||||||
|
|
||||||
|
/* package */ class LandingPageLayout extends AppLayout {
|
||||||
|
|
||||||
|
@PostConstruct
|
||||||
|
private void init() {
|
||||||
|
initNavBar();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initNavBar() {
|
||||||
|
val left = new Div();
|
||||||
|
left.setWidthFull();
|
||||||
|
|
||||||
|
val title = new NativeLabel("Firmware HQ");
|
||||||
|
title.setWidthFull();
|
||||||
|
|
||||||
|
val right = new Div();
|
||||||
|
right.setWidthFull();
|
||||||
|
|
||||||
|
val bar = new HorizontalLayout();
|
||||||
|
bar.addClassName("navbar");
|
||||||
|
bar.setWidthFull();
|
||||||
|
bar.add(left, title, right);
|
||||||
|
|
||||||
|
addToNavbar(bar);
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,26 @@
|
|||||||
|
package dev.mars3142.fhq.views.landingpage;
|
||||||
|
|
||||||
|
import com.vaadin.flow.component.Composite;
|
||||||
|
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
|
||||||
|
import com.vaadin.flow.router.PageTitle;
|
||||||
|
import com.vaadin.flow.router.Route;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import lombok.val;
|
||||||
|
import org.springframework.web.client.RestClient;
|
||||||
|
|
||||||
|
@PageTitle("Firmware HQ")
|
||||||
|
@Route(value = "", layout = LandingPageLayout.class)
|
||||||
|
@Slf4j
|
||||||
|
public class LandingPageView extends Composite<VerticalLayout> {
|
||||||
|
public LandingPageView() {
|
||||||
|
val client = RestClient
|
||||||
|
.builder()
|
||||||
|
.baseUrl("https://user-service-ggxookssmq-ew.a.run.app/v1")
|
||||||
|
.build();
|
||||||
|
val response = client.get()
|
||||||
|
.uri("/users")
|
||||||
|
.retrieve()
|
||||||
|
.body(String.class);
|
||||||
|
log.info("Response: {}", response);
|
||||||
|
}
|
||||||
|
}
|
7
src/main/resources/application-dev.yaml
Normal file
7
src/main/resources/application-dev.yaml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
server:
|
||||||
|
port: ${PORT:8090}
|
||||||
|
|
||||||
|
vaadin:
|
||||||
|
# To improve the performance during development.
|
||||||
|
# For more information https://vaadin.com/docs/latest/integrations/spring/configuration#special-configuration-parameters
|
||||||
|
allowed-packages : com.vaadin,org.vaadin,dev.hilla,dev.mars3142
|
@@ -1,15 +0,0 @@
|
|||||||
server.port=${PORT:8080}
|
|
||||||
logging.level.org.atmosphere = warn
|
|
||||||
spring.mustache.check-template-location = false
|
|
||||||
|
|
||||||
# Launch the default browser when starting the application in development mode
|
|
||||||
vaadin.launch-browser=true
|
|
||||||
# PostgreSQL configuration.
|
|
||||||
spring.datasource.url = jdbc:postgresql://localhost:5432/vaadinstart
|
|
||||||
spring.datasource.username = vaadinstart
|
|
||||||
spring.datasource.password = vaadinstart
|
|
||||||
spring.jpa.hibernate.ddl-auto = update
|
|
||||||
# To improve the performance during development.
|
|
||||||
# For more information https://vaadin.com/docs/latest/integrations/spring/configuration#special-configuration-parameters
|
|
||||||
vaadin.allowed-packages = com.vaadin,org.vaadin,dev.hilla,dev.mars3142.fhq
|
|
||||||
spring.jpa.defer-datasource-initialization = true
|
|
12
src/main/resources/application.yaml
Normal file
12
src/main/resources/application.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
server:
|
||||||
|
port: ${PORT:8080}
|
||||||
|
|
||||||
|
logging:
|
||||||
|
level:
|
||||||
|
org:atmosphere: warn
|
||||||
|
|
||||||
|
spring:
|
||||||
|
mustache:
|
||||||
|
check-template-location: false
|
||||||
|
jpa:
|
||||||
|
defer-datasource-initialization: true
|
Reference in New Issue
Block a user