Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
872ebac
update dependencies
wojcik91 Feb 16, 2026
1be3805
put stats endpoints into a separate module
wojcik91 Feb 16, 2026
df5a6f0
add dedicated API endpoints for connected users & network devices
wojcik91 Feb 16, 2026
c341c48
adjust connected users table UI for a paginated endpoint
wojcik91 Feb 17, 2026
f6d6a63
implement fetching connected users stats
wojcik91 Feb 18, 2026
6fc273f
fix query params
wojcik91 Feb 18, 2026
26ff432
update connected network devices helper struct
wojcik91 Feb 18, 2026
0cdbf19
implement the network devices endpoint
wojcik91 Feb 18, 2026
e9bfc4e
lint fix
wojcik91 Feb 18, 2026
4bfcfcf
assign network ips to devices
wojcik91 Feb 18, 2026
a94758d
update network devices table
wojcik91 Feb 18, 2026
5d278bc
filter out network devices from connected users queries
wojcik91 Feb 18, 2026
ca6feed
fix user device count
wojcik91 Feb 18, 2026
88362a4
add table skeletons
wojcik91 Feb 18, 2026
80101c6
add endpoint for listing active user devices
wojcik91 Feb 18, 2026
5c6d3a1
show expanded user devices rows
wojcik91 Feb 18, 2026
6ea8477
refetch data on period change
wojcik91 Feb 18, 2026
9b5b95b
cleanup
wojcik91 Feb 18, 2026
20a8591
Merge branch 'dev' into update_location_stats_api
wojcik91 Feb 18, 2026
e88bc06
update dependencies
wojcik91 Feb 18, 2026
9377e2d
update query data
wojcik91 Feb 18, 2026
bbe0d54
add API test
wojcik91 Feb 19, 2026
4e83139
Merge branch 'dev' into update_location_stats_api
wojcik91 Feb 19, 2026
9f93621
update dependencies
wojcik91 Feb 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 12 additions & 8 deletions crates/defguard_common/src/db/models/vpn_session_stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,19 @@ impl VpnSessionStats<Id> {
/// IPv6: [x::y:z]:p -> x::y:z
#[must_use]
pub fn endpoint_without_port(&self) -> Option<String> {
// Remove port part
let mut addr = self.endpoint.rsplit_once(':')?.0;
endpoint_without_port(&self.endpoint)
}
}

// Strip square brackets from IPv6 addrs
if addr.starts_with('[') && addr.ends_with(']') {
let end = addr.len() - 1;
addr = &addr[1..end];
}
pub fn endpoint_without_port(endpoint: &str) -> Option<String> {
// Remove port part
let mut addr = endpoint.rsplit_once(':')?.0;

Some(addr.to_owned())
// Strip square brackets from IPv6 addrs
if addr.starts_with('[') && addr.ends_with(']') {
let end = addr.len() - 1;
addr = &addr[1..end];
}

Some(addr.to_owned())
}
Loading
Loading