new source promoted

This commit is contained in:
2019-10-27 22:56:00 +01:00
parent f781e24028
commit 93846dbbea
17 changed files with 52 additions and 383 deletions

14
source/webpages.go Normal file
View File

@@ -0,0 +1,14 @@
package main
import "gopkg.in/macaron.v1"
func statusPage(ctx *macaron.Context) {
var pluglist []Dictionary
for num, o := range TheConfig.Outlets {
pluglist = append(pluglist, Dictionary{"id": num, "description": o.Name})
}
ctx.Data["pluglist"] = pluglist
ctx.HTML(200, "status") // 200 is the response code.
}