Skip to content

Commit

Permalink
feat: Add conditions to monv2 action rules (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
obs-gh-catherman authored Dec 10, 2024
1 parent fce9c23 commit 37ca21f
Show file tree
Hide file tree
Showing 7 changed files with 350 additions and 8 deletions.
23 changes: 23 additions & 0 deletions client/internal/meta/operation/monitorv2.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ fragment MonitorV2SearchResult on MonitorV2SearchResult {
fragment MonitorV2ActionRule on MonitorV2ActionRule {
actionID
levels
# @genqlient(flatten: true)
conditions {
...MonitorV2ComparisonExpression
}
sendEndNotifications
sendRemindersInterval
# @genqlient(flatten: true)
Expand All @@ -175,6 +179,25 @@ fragment MonitorV2ActionDefinition on MonitorV2ActionDefinition {
}
}

fragment MonitorV2ComparisonExpression on MonitorV2ComparisonExpression {
# @genqlient(flatten: true)
compareTerms {
...MonitorV2ComparisonTerm
}
# subExpressions/operator are not used by the UI so we won't support them here yet either
}

fragment MonitorV2ComparisonTerm on MonitorV2ComparisonTerm {
# @genqlient(flatten: true)
comparison {
...MonitorV2Comparison
}
# @genqlient(flatten: true)
column {
...MonitorV2Column
}
}

# @genqlient(for: "MonitorV2Input.iconUrl", omitempty: true)
# @genqlient(for: "MonitorV2Input.description", omitempty: true)
# @genqlient(for: "MonitorV2Input.managedById", omitempty: true)
Expand Down
125 changes: 125 additions & 0 deletions client/meta/genqlient.generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions docs/data-sources/monitor_v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
page_title: "observe_monitor_v2 Data Source - terraform-provider-observe"
subcategory: ""
description: |-
NOTE: This feature is still in development. It is not meant for customer use yet.
Monitors provide a configurable way to alert when conditions about incoming data
are matched. These alerts can optionally also be forwarded to notification receivers
like email and webhooks using shared or single-monitor actions to configure the
Expand All @@ -12,8 +11,6 @@ description: |-

# observe_monitor_v2 (Data Source)

NOTE: This feature is still in development. It is not meant for customer use yet.

Monitors provide a configurable way to alert when conditions about incoming data
are matched. These alerts can optionally also be forwarded to notification receivers
like email and webhooks using shared or single-monitor actions to configure the
Expand Down
Loading

0 comments on commit 37ca21f

Please sign in to comment.