add and modify new index page

This commit is contained in:
Adrian Zürcher
2025-08-05 18:45:19 +02:00
parent 20912ba17c
commit e1ba6e49a8
8 changed files with 495 additions and 74 deletions

View File

@@ -23,7 +23,7 @@ func main() {
panic(err)
}
mianPage, err := handlers.NewMainPage(&templatesFS)
mainPage, err := handlers.NewMainPage(&templatesFS)
if err != nil {
panic(err)
}
@@ -31,7 +31,10 @@ func main() {
http.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.FS(staticFS))))
http.HandleFunc("/taskmanager/htop", htop.UpdateHTop)
http.HandleFunc("/", mianPage.UpdateMainPage)
http.HandleFunc("/", mainPage.UpdateMainPage)
http.HandleFunc("/start-process", mainPage.StartProcess)
http.HandleFunc("/stop-process", mainPage.StopProcess)
http.HandleFunc("/restart-process", mainPage.RestartProcess)
http.HandleFunc("/taskmanager/kill", handlers.KillHandler)
http.HandleFunc("/taskmanager/usage", handlers.UsageHandler)