Skip to content

Commit

Permalink
Merge pull request #1431 from flanksource/feat/check-summary-labels-f…
Browse files Browse the repository at this point in the history
…ilter

feat: filter by check labels
  • Loading branch information
moshloop authored Nov 9, 2023
2 parents af46627 + c9422b5 commit 80c0cd8
Show file tree
Hide file tree
Showing 7 changed files with 123 additions and 100 deletions.
10 changes: 9 additions & 1 deletion cmd/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,16 @@ func serve() {

e.Use(middleware.Logger())

e.Use(func(next echo.HandlerFunc) echo.HandlerFunc {
return func(c echo.Context) error {
c.SetRequest(c.Request().WithContext(apicontext.DefaultContext.Wrap(c.Request().Context())))
return next(c)
}
})

e.GET("/api", api.CheckSummary)
e.GET("/api/summary", api.HealthSummary)
e.GET("/api/summary", api.HealthSummary) // Deprecated: Use Post request for filtering
e.POST("/api/summary", api.HealthSummary)
e.GET("/about", api.About)
e.GET("/api/graph", api.CheckDetails)
e.POST("/api/push", api.PushHandler)
Expand Down
41 changes: 21 additions & 20 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ require (
github.com/elastic/go-elasticsearch/v8 v8.10.1
github.com/fergusstrange/embedded-postgres v1.24.0
github.com/flanksource/commons v1.17.1
github.com/flanksource/duty v1.0.216
github.com/flanksource/duty v1.0.217
github.com/flanksource/gomplate/v3 v3.20.24
github.com/flanksource/is-healthy v0.0.0-20231003215854-76c51e3a3ff7
github.com/flanksource/kommons v0.31.4
Expand Down Expand Up @@ -70,11 +70,11 @@ require (
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0
go.opentelemetry.io/otel/sdk v1.19.0
go.opentelemetry.io/otel/trace v1.19.0
golang.org/x/crypto v0.14.0
golang.org/x/net v0.17.0
golang.org/x/crypto v0.15.0
golang.org/x/net v0.18.0
golang.org/x/sync v0.5.0
google.golang.org/api v0.149.0
google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405
google.golang.org/api v0.150.0
google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17
google.golang.org/grpc v1.59.0
gopkg.in/flanksource/yaml.v3 v3.2.3
gorm.io/gorm v1.25.5
Expand All @@ -83,7 +83,7 @@ require (
k8s.io/apimachinery v0.28.2
k8s.io/client-go v0.28.2
sigs.k8s.io/controller-runtime v0.16.2
sigs.k8s.io/yaml v1.3.0
sigs.k8s.io/yaml v1.4.0
)

require (
Expand All @@ -102,7 +102,7 @@ require (
github.com/antonmedv/expr v1.15.3 // indirect
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/aws/aws-sdk-go v1.47.3 // indirect
github.com/aws/aws-sdk-go v1.47.6 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.0 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.2 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.1 // indirect
Expand Down Expand Up @@ -245,34 +245,35 @@ require (
go.starlark.net v0.0.0-20231101134539-556fd59b42f6 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.26.0 // indirect
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
golang.org/x/oauth2 v0.13.0 // indirect
golang.org/x/exp v0.0.0-20231108232855-2478ac86f678 // indirect
golang.org/x/oauth2 v0.14.0 // indirect
golang.org/x/sys v0.14.0 // indirect
golang.org/x/term v0.13.0 // indirect
golang.org/x/term v0.14.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.4.0 // indirect
golang.org/x/tools v0.14.0 // indirect
golang.org/x/tools v0.15.0 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231030173426-d783a09b4405 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/evanphx/json-patch.v5 v5.7.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/sourcemap.v1 v1.0.5 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
gorm.io/driver/postgres v1.5.4 // indirect
k8s.io/apiextensions-apiserver v0.28.0 // indirect
k8s.io/cli-runtime v0.28.0 // indirect
k8s.io/component-base v0.28.1 // indirect
k8s.io/klog/v2 v2.100.1 // indirect
k8s.io/apiextensions-apiserver v0.28.2 // indirect
k8s.io/cli-runtime v0.28.2 // indirect
k8s.io/component-base v0.28.2 // indirect
k8s.io/klog/v2 v2.110.1 // indirect
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
layeh.com/gopher-json v0.0.0-20201124131017-552bb3c4c3bf // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/kustomize v2.0.3+incompatible // indirect
sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 // indirect
sigs.k8s.io/kustomize/kyaml v0.14.3 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect
sigs.k8s.io/kustomize/api v0.15.0 // indirect
sigs.k8s.io/kustomize/kyaml v0.15.0 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
)
Loading

0 comments on commit 80c0cd8

Please sign in to comment.