25 lines
403 B
Go
25 lines
403 B
Go
package ui
|
|
|
|
import (
|
|
_ "embed"
|
|
"html/template"
|
|
"io"
|
|
)
|
|
|
|
//go:embed dashboard.html
|
|
var dashboardHTML string
|
|
|
|
var tmpl = template.Must(template.New("dashboard").Parse(dashboardHTML))
|
|
|
|
type DashboardData struct {
|
|
Domain string
|
|
Port string
|
|
AppsDir string
|
|
ActiveCount int
|
|
Apps any
|
|
}
|
|
|
|
func RenderDashboard(w io.Writer, data DashboardData) error {
|
|
return tmpl.Execute(w, data)
|
|
}
|