File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
app/handler/machine/filter Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change 1+ package filter
2+
3+ import (
4+ "github.com/gofiber/fiber/v2"
5+ "github.com/typomedia/patchouli/app/store/boltdb"
6+ )
7+
8+ func System (c * fiber.Ctx ) error {
9+ systemId := c .Params ("id" )
10+ db := boltdb .New ()
11+
12+ Machines , err := db .GetAllMachinesBySystemId (systemId )
13+ if err != nil {
14+ return err
15+ }
16+
17+ defer db .Close ()
18+
19+ return c .Render ("app/views/machine/list" , fiber.Map {
20+ "Machines" : Machines ,
21+ })
22+ }
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ func main() {
6565 app .Get ("/machine/new" , machine .New )
6666 app .Get ("/machine/edit/:id" , machine .Edit )
6767 app .Get ("/machine/filter/operator/:id" , machineFilter .Operator )
68+ app .Get ("/machine/filter/system/:id" , machineFilter .System )
6869 app .Post ("/machine/save/:id" , machine .Save )
6970
7071 app .Get ("/machine/update/list/:id" , update .List )
You can’t perform that action at this time.
0 commit comments