From b2fc689bdcff28bf75c0128db19ba4730d726b4f Mon Sep 17 00:00:00 2001 From: simponic Date: Thu, 28 Mar 2024 12:57:35 -0400 Subject: dns api (#1) Co-authored-by: Elizabeth Hunt Reviewed-on: https://git.hatecomputers.club/hatecomputers/hatecomputers.club/pulls/1 --- templates/api_keys.html | 40 +++++++++++++++++++++++++++++++++++++ templates/base.html | 4 ++++ templates/dns.html | 52 +++++++++++++++++++++++++++++++++++++++++++------ 3 files changed, 90 insertions(+), 6 deletions(-) create mode 100644 templates/api_keys.html (limited to 'templates') diff --git a/templates/api_keys.html b/templates/api_keys.html new file mode 100644 index 0000000..93eebd5 --- /dev/null +++ b/templates/api_keys.html @@ -0,0 +1,40 @@ +{{ define "content" }} + + + + + + + {{ if (eq (len .APIKeys) 0) }} + + + + {{ end }} + {{ range $key := .APIKeys }} + + + + + + {{ end }} +
KeyCreated AtRevoke
No API Keys Found
{{ $key.Key }}{{ $key.CreatedAt }} +
+ + +
+
+
+
+

Add An API Key

+
+ +
+ + {{ if .FormError }} + {{ if (len .FormError.Errors) }} + {{ range $error := .FormError.Errors }} +
{{ $error }}
+ {{ end }} + {{ end }} + {{ end }} +{{ end }} diff --git a/templates/base.html b/templates/base.html index 79e0d12..9f5a903 100644 --- a/templates/base.html +++ b/templates/base.html @@ -35,7 +35,10 @@ {{ if .User }} dns. | + api keys. + | logout, {{ .User.DisplayName }}. + {{ else }} login. {{ end }} @@ -74,6 +77,7 @@ + diff --git a/templates/dns.html b/templates/dns.html index 0a40cab..e317d05 100644 --- a/templates/dns.html +++ b/templates/dns.html @@ -5,10 +5,11 @@ Name Content TTL + Delete {{ if (eq (len .DNSRecords) 0) }} - No DNS records found + No DNS records found {{ end }} {{ range $record := .DNSRecords }} @@ -17,21 +18,60 @@ {{ $record.Name }} {{ $record.Content }} {{ $record.TTL }} + +
+ + +
+ {{ end }}
-
+

Add DNS Records

+

note that the name must be a subdomain of {{ .User.Username }}


- + - + - + - +
+ + {{ if .FormError }} + {{ if (len .FormError.Errors) }} + {{ range $error := .FormError.Errors }} +
{{ $error }}
+ {{ end }} + {{ end }} + {{ end }} {{ end }} -- cgit v1.2.3-70-g09d2