Add Server config page

Handle server ip addresses input and store
TODO: Key pair form
This commit is contained in:
Khanh Ngo 2020-04-19 15:50:59 +07:00
parent 20fcdbafa5
commit febf075f8d
No known key found for this signature in database
GPG key ID: D5FAA6A16150E49E
9 changed files with 285 additions and 22 deletions

View file

@ -29,7 +29,8 @@ func (t *TemplateRegistry) Render(w io.Writer, name string, data interface{}, c
func New() *echo.Echo {
e := echo.New()
templates := make(map[string]*template.Template)
templates["home.html"] = template.Must(template.ParseFiles("templates/home.html", "templates/base.html"))
templates["clients.html"] = template.Must(template.ParseFiles("templates/clients.html", "templates/base.html"))
templates["server.html"] = template.Must(template.ParseFiles("templates/server.html", "templates/base.html"))
e.Logger.SetLevel(log.DEBUG)
e.Pre(middleware.RemoveTrailingSlash())