call user-service for testing
Signed-off-by: Peter Siegmund <developer@mars3142.org>
This commit is contained in:
@@ -38,7 +38,7 @@ import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
|
||||
@PageTitle("Checkout Form")
|
||||
@Route(value = "", layout = MainLayout.class)
|
||||
@Route(value = "/checkout", layout = MainLayout.class)
|
||||
public class CheckoutFormView extends Div {
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user