Update dashboard filters and packet views
This commit is contained in:
@@ -21,6 +21,8 @@ type pageData struct {
|
||||
CurrentProject projects.ProjectItem
|
||||
Search string
|
||||
Status string
|
||||
Packet string
|
||||
PacketOptions []PacketOption
|
||||
Rows []ProgressRow
|
||||
FilteredRows []ProgressRow
|
||||
Summary ProgressSummary
|
||||
@@ -64,7 +66,9 @@ func buildProgressData(r *http.Request) (pageData, int, error) {
|
||||
summary := BuildProgressSummary(rows)
|
||||
search := r.URL.Query().Get("search")
|
||||
status := r.URL.Query().Get("status")
|
||||
filteredRows := FilterProgressRows(rows, search, status)
|
||||
packet := r.URL.Query().Get("packet")
|
||||
packetOptions := UniquePackets(rows)
|
||||
filteredRows := FilterProgressRows(rows, search, status, packet)
|
||||
page := parsePage(r.URL.Query().Get("page"))
|
||||
pagedRows, hasMore := PaginateProgressRows(filteredRows, page, defaultPageSize)
|
||||
visibleCount := page * defaultPageSize
|
||||
@@ -77,6 +81,8 @@ func buildProgressData(r *http.Request) (pageData, int, error) {
|
||||
CurrentProject: project,
|
||||
Search: search,
|
||||
Status: status,
|
||||
Packet: packet,
|
||||
PacketOptions: packetOptions,
|
||||
Rows: rows,
|
||||
FilteredRows: pagedRows,
|
||||
Summary: summary,
|
||||
|
||||
Reference in New Issue
Block a user