1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
use fedimint_gateway_common::GatewayInfo;
use maud::{Markup, html};
pub fn render(gateway_info: &GatewayInfo) -> Markup {
html!(
div class="card h-100" {
div class="card-header dashboard-header" { "Gateway Network Information" }
div class="card-body" {
div id="status" class="alert alert-info" {
"Status: " strong { (gateway_info.gateway_state.clone()) }
}
@if gateway_info.registrations.is_empty() {
div class="alert alert-secondary" {
"No registrations found."
}
} @else {
table class="table table-sm" {
thead {
tr {
th { "Protocol" }
th { "Details" }
}
}
tbody {
@for (protocol, (url, pubkey)) in &gateway_info.registrations {
tr {
td class="align-middle fw-bold" {
(format!("{:?}", protocol))
}
td {
table class="table table-borderless table-sm mb-0 w-100" {
tbody {
tr {
td class="fw-semibold pe-2 align-top" {
"URL:"
}
td class="text-break small" {
(url.to_string())
}
}
tr {
td class="fw-semibold pe-2 align-top" {
"ID:"
}
td class="text-break font-monospace small" {
(pubkey.to_string())
}
}
}
}
}
}
}
}
}
}
}
}
)
}