diff --git a/src/backup_ui.go b/src/backup_ui.go new file mode 100644 index 0000000..d4b7a76 --- /dev/null +++ b/src/backup_ui.go @@ -0,0 +1,7 @@ +package main + +import "gopkg.in/macaron.v1" + +func backupPage(ctx *macaron.Context) { + ctx.HTML(200, "backup") +} diff --git a/src/lan_ui.go b/src/lan_ui.go new file mode 100644 index 0000000..336bfa1 --- /dev/null +++ b/src/lan_ui.go @@ -0,0 +1,7 @@ +package main + +import "gopkg.in/macaron.v1" + +func lanPage(ctx *macaron.Context) { + ctx.HTML(200, "lan") +} diff --git a/src/syslog_ui.go b/src/syslog_ui.go new file mode 100644 index 0000000..7328350 --- /dev/null +++ b/src/syslog_ui.go @@ -0,0 +1,7 @@ +package main + +import "gopkg.in/macaron.v1" + +func syslogPage(ctx *macaron.Context) { + ctx.HTML(200, "syslog") +} diff --git a/src/ups_ui.go b/src/ups_ui.go index 53065cc..1c686fb 100644 --- a/src/ups_ui.go +++ b/src/ups_ui.go @@ -22,6 +22,9 @@ func upsPage(ctx *macaron.Context) { ctx.Data["upsmfr"] = upsVars["device.mfr"].Value ctx.Data["upsmodel"] = upsVars["device.model"].Value ctx.Data["upsserial"] = upsVars["device.serial"].Value + ctx.Data["upsload"] = upsVars["ups.load"].Value + ctx.Data["upscharge"] = upsVars["battery.charge"].Value + // } ctx.HTML(200, "ups") diff --git a/src/webui.go b/src/webui.go index ac120d9..4c304dd 100644 --- a/src/webui.go +++ b/src/webui.go @@ -105,10 +105,13 @@ func startServer() { // m.Get("/", myHandler) m.Get("/", statusPage) + m.Get("/lan", lanPage) m.Get("/mqtt", mqttPage) m.Post("/mqtt", binding.Bind(MQTTPostForm{}), mqttPost) m.Get("/ups", upsPage) m.Post("/ups", binding.Bind(UPSPostForm{}), upsPost) + m.Get("/syslog", syslogPage) + m.Get("/backup", backupPage) m.Get("/json/status", jsonStatus) m.Post("/json/outlet/:id/toggle", jsonOutletToggle) diff --git a/templates/backup.html b/templates/backup.html new file mode 100644 index 0000000..7599ae7 --- /dev/null +++ b/templates/backup.html @@ -0,0 +1,49 @@ + + + + + {% include "common/common-head.html" %} + + + +
+ + {% include "common/page-header.html" %} {% with pageselected="backup" %} {% include "common/sidebar-menu.html" %} {% endwith %} + + +
+ + +
+ +
+
+ +
+
+

Backup / Restore configuration

+
+ + +
+ +
+ +
+ + +
+ +
+ + + {% include "common/footer.html" %} + +
+ + + {% include "common/common-js.html" %} + + + + diff --git a/templates/common/sidebar-menu.html b/templates/common/sidebar-menu.html index 686347d..9851c36 100644 --- a/templates/common/sidebar-menu.html +++ b/templates/common/sidebar-menu.html @@ -6,61 +6,53 @@ - \ No newline at end of file + diff --git a/templates/lan.html b/templates/lan.html new file mode 100644 index 0000000..049c9b8 --- /dev/null +++ b/templates/lan.html @@ -0,0 +1,49 @@ + + + + + {% include "common/common-head.html" %} + + + +
+ + {% include "common/page-header.html" %} {% with pageselected="lan" %} {% include "common/sidebar-menu.html" %} {% endwith %} + + +
+ + +
+ +
+
+ +
+
+

LAN configuration

+
+ + +
+ +
+ +
+ + +
+ +
+ + + {% include "common/footer.html" %} + +
+ + + {% include "common/common-js.html" %} + + + + diff --git a/templates/syslog.html b/templates/syslog.html new file mode 100644 index 0000000..7cbdf03 --- /dev/null +++ b/templates/syslog.html @@ -0,0 +1,49 @@ + + + + + {% include "common/common-head.html" %} + + + +
+ + {% include "common/page-header.html" %} {% with pageselected="syslog" %} {% include "common/sidebar-menu.html" %} {% endwith %} + + +
+ + +
+ +
+
+ +
+
+

Syslog configuration

+
+ + +
+ +
+ +
+ + +
+ +
+ + + {% include "common/footer.html" %} + +
+ + + {% include "common/common-js.html" %} + + + + diff --git a/templates/ups.html b/templates/ups.html index 421c181..9790d43 100644 --- a/templates/ups.html +++ b/templates/ups.html @@ -63,6 +63,20 @@ +
+ +
+ +
+
+ +
+ +
+ +
+
+