diff --git a/handlers/bcp.go b/handlers/bcp.go new file mode 100644 index 0000000..8ada2e4 --- /dev/null +++ b/handlers/bcp.go @@ -0,0 +1,20 @@ +package handlers + +import ( + "net/http" + "text/template" + + "git.espin.casa/albert/cml04-falcon-ui/storage" + "github.com/julienschmidt/httprouter" +) + +func BCPHandler(storage storage.Storager) httprouter.Handle { + return func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { + t, _ := template.ParseFiles("templates/base.html", "templates/po.html") + err := t.Execute(w, nil) + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + } +} diff --git a/handlers/co.go b/handlers/co.go new file mode 100644 index 0000000..2828c5a --- /dev/null +++ b/handlers/co.go @@ -0,0 +1,20 @@ +package handlers + +import ( + "net/http" + "text/template" + + "git.espin.casa/albert/cml04-falcon-ui/storage" + "github.com/julienschmidt/httprouter" +) + +func CoHandler(storage storage.Storager) httprouter.Handle { + return func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { + t, _ := template.ParseFiles("templates/base.html", "templates/co.html") + err := t.Execute(w, nil) + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + } +} diff --git a/handlers/lcp.go b/handlers/lcp.go new file mode 100644 index 0000000..0468855 --- /dev/null +++ b/handlers/lcp.go @@ -0,0 +1,20 @@ +package handlers + +import ( + "net/http" + "text/template" + + "git.espin.casa/albert/cml04-falcon-ui/storage" + "github.com/julienschmidt/httprouter" +) + +func LCPHandler(storage storage.Storager) httprouter.Handle { + return func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { + t, _ := template.ParseFiles("templates/base.html", "templates/lcp.html") + err := t.Execute(w, nil) + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + } +} diff --git a/handlers/po.go b/handlers/po.go new file mode 100644 index 0000000..f5fe2ec --- /dev/null +++ b/handlers/po.go @@ -0,0 +1,20 @@ +package handlers + +import ( + "net/http" + "text/template" + + "git.espin.casa/albert/cml04-falcon-ui/storage" + "github.com/julienschmidt/httprouter" +) + +func PoHandler(storage storage.Storager) httprouter.Handle { + return func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { + t, _ := template.ParseFiles("templates/base.html", "templates/po.html") + err := t.Execute(w, nil) + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + } +} diff --git a/templates/bcp.html b/templates/bcp.html new file mode 100644 index 0000000..742eaac --- /dev/null +++ b/templates/bcp.html @@ -0,0 +1,49 @@ +{{define "title"}}Falcon UI{{end}} + +{{define "body"}} + +
+
+
+ +
+ +
+ +
+
+
+{{ end }} \ No newline at end of file diff --git a/templates/co.html b/templates/co.html index 91a84f4..a493bae 100644 --- a/templates/co.html +++ b/templates/co.html @@ -39,7 +39,7 @@
diff --git a/templates/lcp.html b/templates/lcp.html new file mode 100644 index 0000000..91a84f4 --- /dev/null +++ b/templates/lcp.html @@ -0,0 +1,49 @@ +{{define "title"}}Falcon UI{{end}} + +{{define "body"}} + +
+
+
+ +
+ +
+ +
+
+
+{{ end }} \ No newline at end of file diff --git a/templates/po.html b/templates/po.html new file mode 100644 index 0000000..1315b0a --- /dev/null +++ b/templates/po.html @@ -0,0 +1,49 @@ +{{define "title"}}Falcon UI{{end}} + +{{define "body"}} + +
+
+
+ +
+ +
+ +
+
+
+{{ end }} \ No newline at end of file