fedimint_gateway_ui/
general.rs1use fedimint_gateway_common::GatewayInfo;
2use maud::{Markup, html};
3
4pub fn render(gateway_info: &GatewayInfo) -> Markup {
5 html!(
6 div class="card h-100" {
7 div class="card-header dashboard-header" { "Gateway Information" }
8 div class="card-body" {
9 div id="status" class="alert alert-info" {
10 "Status: " strong { (gateway_info.gateway_state.clone()) }
11 }
12
13 table class="table table-sm mb-0" {
14 tbody {
15 tr {
16 th { "Gateway ID" }
17 td { (gateway_info.gateway_id.to_string()) }
18 }
19 tr {
20 th { "Network" }
21 td { (gateway_info.network.to_string()) }
22 }
23 tr {
24 th { "Synced to Chain" }
25 td { (gateway_info.synced_to_chain) }
26 }
27 @if let Some(block_height) = gateway_info.block_height {
28 tr {
29 th { "Block Height" }
30 td { (block_height) }
31 }
32 }
33 tr {
34 th { "API Endpoint" }
35 td { (gateway_info.api.to_string()) }
36 }
37 tr {
38 th { "Iroh API" }
39 td { (gateway_info.iroh_api.to_string()) }
40 }
41 }
42 }
43 }
44 }
45 )
46}