diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 21:42:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 21:42:06 +0300 |
commit | 6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch) | |
tree | 78be5963ec075d80116a932011d695dd33910b4e /app/graphql/types/alert_management/alert_type.rb | |
parent | 1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff) |
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'app/graphql/types/alert_management/alert_type.rb')
-rw-r--r-- | app/graphql/types/alert_management/alert_type.rb | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/app/graphql/types/alert_management/alert_type.rb b/app/graphql/types/alert_management/alert_type.rb index 089d2426158..1a0b0685ffe 100644 --- a/app/graphql/types/alert_management/alert_type.rb +++ b/app/graphql/types/alert_management/alert_type.rb @@ -71,7 +71,7 @@ module Types description: 'Number of events of this alert', method: :events - field :details, + field :details, # rubocop:disable Graphql/JSONType GraphQL::Types::JSON, null: true, description: 'Alert details' @@ -94,8 +94,28 @@ module Types field :metrics_dashboard_url, GraphQL::STRING_TYPE, null: true, - description: 'URL for metrics embed for the alert', - resolve: -> (alert, _args, _context) { alert.present.metrics_dashboard_url } + description: 'URL for metrics embed for the alert' + + field :runbook, + GraphQL::STRING_TYPE, + null: true, + description: 'Runbook for the alert as defined in alert details' + + field :todos, + Types::TodoType.connection_type, + null: true, + description: 'Todos of the current user for the alert', + resolver: Resolvers::TodoResolver + + field :details_url, + GraphQL::STRING_TYPE, + null: false, + description: 'The URL of the alert detail page' + + field :prometheus_alert, + Types::PrometheusAlertType, + null: true, + description: 'The alert condition for Prometheus' def notes object.ordered_notes |