Skip to content

Commit b74a2db

Browse files
authored
Merge pull request #224 from flashcatcloud/feat/alert-event-list-required-window
feat: bump go-flashduty to v0.15.15 (alert event list requires a time window)
2 parents ec0922a + ab63ae7 commit b74a2db

10 files changed

Lines changed: 165 additions & 88 deletions

‎go.mod‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/flashcatcloud/flashduty-cli
33
go 1.26.0
44

55
require (
6-
github.com/flashcatcloud/go-flashduty v0.15.14
6+
github.com/flashcatcloud/go-flashduty v0.15.15
77
github.com/mattn/go-runewidth v0.0.30
88
github.com/spf13/cobra v1.10.2
99
github.com/spf13/pflag v1.0.10

‎go.sum‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
github.com/clipperhouse/uax29/v2 v2.2.0 h1:ChwIKnQN3kcZteTXMgb1wztSgaU+ZemkgWdohwgs8tY=
22
github.com/clipperhouse/uax29/v2 v2.2.0/go.mod h1:EFJ2TJMRUaplDxHKj1qAEhCtQPW2tJSwu5BF98AuoVM=
33
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
4-
github.com/flashcatcloud/go-flashduty v0.15.14 h1:185WAkgahlRnLBk3jI6kYL2t8IoH5YtQ9Pd4ckEPRWM=
5-
github.com/flashcatcloud/go-flashduty v0.15.14/go.mod h1:YpHiTYXR5NXBI/rGRZfUy537XMkhdCkwA8NW1QoRHwk=
4+
github.com/flashcatcloud/go-flashduty v0.15.15 h1:jMgWfpuXqdyHArSvUtf9ATwFFB7s49hgN7Rv+c9PxAY=
5+
github.com/flashcatcloud/go-flashduty v0.15.15/go.mod h1:YpHiTYXR5NXBI/rGRZfUy537XMkhdCkwA8NW1QoRHwk=
66
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
77
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
88
github.com/mattn/go-runewidth v0.0.30 h1:+KUuiDA4fF0R1p5FeueHefjDm+GIM+kWfFnDjybOPgk=

‎internal/cli/alert_event.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func newAlertEventListCmd() *cobra.Command {
2424
cmd := &cobra.Command{
2525
Use: "list",
2626
Short: "List alert events globally",
27-
Long: curatedLong("List alert events across all alerts within a time window, optionally filtered by severity, channel, or integration type. In json/toon mode, output defaults to compact event fields; use --fields to choose a different projection.", "Alerts", "EventReadList"),
27+
Long: curatedLong("List alert events across all alerts within a time window, optionally filtered by severity, channel, or integration type. --since/--until window must be < 31 days. In json/toon mode, output defaults to compact event fields; use --fields to choose a different projection.", "Alerts", "EventReadList"),
2828
RunE: func(cmd *cobra.Command, args []string) error {
2929
return runCommand(cmd, args, func(ctx *RunContext) error {
3030
if ctx.Structured() && cmd.Flags().Changed("fields") && len(parseStringSlice(fields)) == 0 {
@@ -37,8 +37,8 @@ func newAlertEventListCmd() *cobra.Command {
3737
}
3838

3939
input := &flashduty.AlertEventGlobalListRequest{
40-
StartTime: flashduty.Int64(startTime),
41-
EndTime: flashduty.Int64(endTime),
40+
StartTime: startTime,
41+
EndTime: endTime,
4242
}
4343
input.Limit = limit
4444
input.Page = page

‎internal/cli/zz_generated_alert_rules.go‎

Lines changed: 10 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎internal/cli/zz_generated_alerts.go‎

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)