summaryrefslogtreecommitdiff
path: root/templates/dns.html
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth.hunt@simponic.xyz>2024-03-27 22:55:22 -0600
committerElizabeth Hunt <elizabeth.hunt@simponic.xyz>2024-03-27 22:55:22 -0600
commit75ba836d6072235fc7a71659f8630ab3c1b210ad (patch)
tree386b65ae6d7a4215c2f7b4944fc2f0922d162491 /templates/dns.html
parentb2fa4fe9454cbc9c9c0e265e3e6065eaa8726e2f (diff)
downloadhatecomputers.club-75ba836d6072235fc7a71659f8630ab3c1b210ad.tar.gz
hatecomputers.club-75ba836d6072235fc7a71659f8630ab3c1b210ad.zip
add dns form
Diffstat (limited to 'templates/dns.html')
-rw-r--r--templates/dns.html37
1 files changed, 37 insertions, 0 deletions
diff --git a/templates/dns.html b/templates/dns.html
new file mode 100644
index 0000000..0a40cab
--- /dev/null
+++ b/templates/dns.html
@@ -0,0 +1,37 @@
+{{ define "content" }}
+ <table>
+ <tr>
+ <th>Type</th>
+ <th>Name</th>
+ <th>Content</th>
+ <th>TTL</th>
+ </tr>
+ {{ if (eq (len .DNSRecords) 0) }}
+ <tr>
+ <td colspan="4"><span class="blinky">No DNS records found</span></td>
+ </tr>
+ {{ end }}
+ {{ range $record := .DNSRecords }}
+ <tr>
+ <td>{{ $record.Type }}</td>
+ <td>{{ $record.Name }}</td>
+ <td>{{ $record.Content }}</td>
+ <td>{{ $record.TTL }}</td>
+ </tr>
+ {{ end }}
+ </table>
+ <br>
+ <form method="POST" action="/dns">
+ <h2>Add DNS Records</h2>
+ <hr>
+ <label for="type">Type</label>
+ <input type="text" name="type" placeholder="CNAME" required />
+ <label for="name">Name</label>
+ <input type="text" name="name" placeholder="{{ .User.Username }}" required />
+ <label for="content">Content</label>
+ <input type="text" name="content" placeholder="{{ .User.Username }}.dev" required />
+ <label for="ttl">TTL</label>
+ <input type="text" name="ttl" placeholder="43200" required />
+ <input type="submit" value="Add" />
+ </form>
+{{ end }}