$def with (now, total, shoal, page, pages, size)
List of Active Squids
$if total > 0:
$total active in the last $squid_active_time seconds
$else:
None active in the last $squid_active_time seconds
# |
Hostname |
Public IP |
Private IP |
Bytes Out |
City |
Country |
Latitude |
Longitude |
Last Received |
Alive |
Clock Sync |
Verified |
Access Level |
$for i,squid in enumerate(shoal):
$ last_msg = int(now - squid.last_active)
$ alive_time = int(now - squid.created);
$ hour = int(alive_time/60/60)
$ minute = (alive_time - hour*60*60) / 60
$ second = alive_time - hour*60*60 - minute*60
$if last_msg < squid_active_time/3:
$ state = 'success'
$elif last_msg >= squid_active_time/3 and last_msg < squid_active_time*2/3:
$ state = 'warning'
$else:
$ state = 'error'
$if squid.global_access == True:
$ access = 'Global'
$elif squid.domain_access == True:
$ access = 'Local Access Only'
$else:
$ access = 'Private'
$if squid.verified:
$ verified = '✔'
$else:
$ verified = '✘'
$if squid.global_access == True:
$ state = 'warning'
$if squid.drift_detected == True:
$ state = 'error'
$((i+1)+(page-1)*size) |
$squid.hostname |
$squid.public_ip |
$squid.private_ip |
$squid.load kB/s |
$squid.geo_data['city'] |
$squid.geo_data['country_name'] |
$squid.geo_data['latitude'] |
$squid.geo_data['longitude'] |
$(last_msg)s |
$(hour)h$(minute)m$(second)s |
$if squid.drift_detected == True:
$("%.1fs" % squid.drift_time) |
$else:
✔ |
$verified |
$access |
$squid.error |
$if size != 0 and pages > 1:
$if pages > 1: