feat: initial commit of mini-paas engine and documentation
This commit is contained in:
24
internal/ui/ui.go
Normal file
24
internal/ui/ui.go
Normal file
@@ -0,0 +1,24 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user