$def with (hostname, ip_address, system_uptime, sites,\
dynadot_domains, apps, working, statuses, config, user)
$hostname
Applications
$for package, (update_available, applications) in sorted(apps.items()):
$ meta = package.metadata
$meta["Name"] $meta["Version"]
$meta["Summary"]
$if "Project-URL" in meta:
more
$ license = meta.get("License")
$meta["Author"]
$if license:
\
$license
$if update_available:
$for appns, _, mod_name, attrs in applications:
$ app = f"{mod_name}:{attrs[0]}"
Working
$for project, applications in sorted(working.items()):
- $project: $applications
Websites
$for suffix, domain, subdomain, site, a_record, ns_records, \
certified, preloaded in sorted(sites):
$ show_point_ns = False
$ show_point_a = False
$ show_certify = False
$ show_nothing = False
-
$site.name
$ site_app = config["websites"].get(site.name)
$if site_app:
$site_app is mounted
$if preloaded:
HSTS
is preloaded
$else:
$ points = a_record == ip_address
$if points:
\\
$a_record
$if certified:
TLS
enabled
HSTS
$("" if preloaded else "not") preloaded
$else:
TLS
not enabled
$ show_certify = True
$else:
$if a_record is None:
no A record
$else:
$a_record
$if "ns1.digitalocean.com." not in ns_records:
current nameservers: $", ".join(ns_records)
$if domain + "." + suffix in dynadot_domains:
$ show_point_ns = True
$else:
cannot continue (\\
$ show_nothing = True
$if config["tokens"]["dynadot"]:
domain not found in Dynadot account)
$else:
no Dynadot access)
$else:
$ show_point_a = True
$if show_point_ns:
$elif show_point_a:
$elif show_certify:
$elif show_nothing:
$pass
$elif not site_app:
$# TODO HSTS preload
$if site.name != ip_address: