diff --git a/views/context.go b/views/context.go index 9b9f6ab..1dc8ff7 100644 --- a/views/context.go +++ b/views/context.go @@ -2,6 +2,7 @@ package views import ( "net/http" + "net/url" "github.com/tigorlazuardi/redmage/config" ) @@ -9,6 +10,7 @@ import ( type Context struct { Config *config.Config Request *http.Request + Query url.Values } func (c *Context) AppendQuery(keyValue ...string) string { @@ -23,5 +25,6 @@ func NewContext(config *config.Config, request *http.Request) *Context { return &Context{ Config: config, Request: request, + Query: request.URL.Query(), } } diff --git a/views/devices/filter.templ b/views/devices/filter.templ index 4d7bb2d..e9feeee 100644 --- a/views/devices/filter.templ +++ b/views/devices/filter.templ @@ -1,8 +1,5 @@ package devices -import "github.com/tigorlazuardi/redmage/api" -import "strconv" - templ filter(data Data) {
Status
} - -templ limitOption(params api.DevicesListParams, value int) { - if int(params.Limit) == value { - - } else { - - } -}