add and modify new index page
This commit is contained in:
7
main.go
7
main.go
@@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user