forked from OpenPDU/openpdu
new source promoted
This commit is contained in:
14
source/webpages.go
Normal file
14
source/webpages.go
Normal 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.
|
||||
}
|
||||
Reference in New Issue
Block a user