From 7b8b872ef0e8250ab3c94be6c7e6c32b5a86de41 Mon Sep 17 00:00:00 2001 From: James Hillyerd Date: Sun, 16 Aug 2015 19:52:35 -0700 Subject: [PATCH] Copy integral templates into bootstrap theme --- themes/bootstrap/templates/_base.html | 54 ++++ themes/bootstrap/templates/mailbox/_html.html | 1 + themes/bootstrap/templates/mailbox/_list.html | 12 + themes/bootstrap/templates/mailbox/_show.html | 39 +++ themes/bootstrap/templates/mailbox/index.html | 92 ++++++ themes/bootstrap/templates/root/index.html | 12 + themes/bootstrap/templates/root/status.html | 285 ++++++++++++++++++ 7 files changed, 495 insertions(+) create mode 100644 themes/bootstrap/templates/_base.html create mode 100644 themes/bootstrap/templates/mailbox/_html.html create mode 100644 themes/bootstrap/templates/mailbox/_list.html create mode 100644 themes/bootstrap/templates/mailbox/_show.html create mode 100644 themes/bootstrap/templates/mailbox/index.html create mode 100644 themes/bootstrap/templates/root/index.html create mode 100644 themes/bootstrap/templates/root/status.html diff --git a/themes/bootstrap/templates/_base.html b/themes/bootstrap/templates/_base.html new file mode 100644 index 0000000..7f396b2 --- /dev/null +++ b/themes/bootstrap/templates/_base.html @@ -0,0 +1,54 @@ + + + + + + {{template "title" .}} + + + + + {{template "script" .}} + + + +
+
+ {{template "menu" .}} +
+
+ {{with .ctx.Session.Flashes "errors"}} +
+

Please fix the following errors and resubmit:

+

    + {{range .}} +
  • {{.}}
  • + {{end}} +
+
+ {{end}} + {{template "content" .}} +
+
+ + + diff --git a/themes/bootstrap/templates/mailbox/_html.html b/themes/bootstrap/templates/mailbox/_html.html new file mode 100644 index 0000000..1d10587 --- /dev/null +++ b/themes/bootstrap/templates/mailbox/_html.html @@ -0,0 +1 @@ +{{.body}} diff --git a/themes/bootstrap/templates/mailbox/_list.html b/themes/bootstrap/templates/mailbox/_list.html new file mode 100644 index 0000000..49a656e --- /dev/null +++ b/themes/bootstrap/templates/mailbox/_list.html @@ -0,0 +1,12 @@ +{{$name := .name}} +{{range .messages}} +
+
{{.Subject}}
+
{{.From}}
+
{{friendlyTime .Date}}
+
+{{else}} +
+

No messages!

+
+{{end}} diff --git a/themes/bootstrap/templates/mailbox/_show.html b/themes/bootstrap/templates/mailbox/_show.html new file mode 100644 index 0000000..4ca2c55 --- /dev/null +++ b/themes/bootstrap/templates/mailbox/_show.html @@ -0,0 +1,39 @@ +{{$name := .name}} +{{$id := .message.Id}} +
+ Link + Delete + Source + {{if .htmlAvailable}} + HTML + {{end}} +
+ + + + + + + + + +
From:{{.message.From}}
Date:{{.message.Date}}
+ +{{with .attachments}} +
+ + {{range $i, $e := .}} + + + + + + + {{end}} +
Attachments:
{{$e.FileName}}({{$e.ContentType}})ViewDownload
+{{end}} + +

{{.message.Subject}}

+ +
{{.body}}
+ diff --git a/themes/bootstrap/templates/mailbox/index.html b/themes/bootstrap/templates/mailbox/index.html new file mode 100644 index 0000000..4b5a174 --- /dev/null +++ b/themes/bootstrap/templates/mailbox/index.html @@ -0,0 +1,92 @@ +{{define "title"}}{{printf "Inbucket for %v" .name}}{{end}} +{{$name := .name}} + +{{define "script"}} + +{{end}} + +{{define "menu"}} + +
+ Refresh List +
+
+{{end}} + +{{define "content"}} +
+

Select a message at left, or enter a different username into the box on upper right.

+
+{{end}} + diff --git a/themes/bootstrap/templates/root/index.html b/themes/bootstrap/templates/root/index.html new file mode 100644 index 0000000..8a1899e --- /dev/null +++ b/themes/bootstrap/templates/root/index.html @@ -0,0 +1,12 @@ +{{define "title"}}Inbucket{{end}} + +{{define "script"}}{{end}} + +{{define "menu"}} + +{{end}} + +{{define "content"}}{{.greeting}}{{end}} diff --git a/themes/bootstrap/templates/root/status.html b/themes/bootstrap/templates/root/status.html new file mode 100644 index 0000000..6ab12c8 --- /dev/null +++ b/themes/bootstrap/templates/root/status.html @@ -0,0 +1,285 @@ +{{define "title"}}Inbucket Status{{end}} + +{{define "script"}} + + +{{end}} + +{{define "menu"}} + +{{end}} + +{{define "content"}} +

Inbucket Status

+ +

Metrics are polled every 10 seconds. Inbucket does not keep history for the +10 minute graphs, but your web browser will accumulate the data over time.

+ +
+

Configuration

+ + + + + + + + + + + + + + + + + +
Version:{{.version}}, built on {{.buildDate}}
SMTP Listener:{{.smtpListener}}
POP3 Listener:{{.pop3Listener}}
HTTP Listener:{{.webListener}}
+

 

+
+
+

General Metrics

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Uptime:.
System Memory:..(10min)
Heap Size:..(10min)
Heap In-Use:..(10min)
Heap # Objects:..(10min)
+

 

+
+
+

SMTP Metrics

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current Connections:..(10min)
Total Connections:..(60min)
Messages Received:..(60min)
Errors Logged:.(60min)
Warnings Logged:.(60min)
+

 

+
+
+

Data Store Metrics

+ + + + + + + + + + + + + + + + + + + + + +
Retention Period: + {{if .retentionMinutes}} + . + {{else}} + Disabled + {{end}} +
Retention Scan: + {{if .retentionMinutes}} + Completed . ago + {{else}} + Disabled + {{end}} +
Retention Deletes:.(60min)
Currently Retained:.(60min)
+

 

+
+{{end}} +