diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
commit | e8d2c2579383897a1dd7f9debd359abe8ae8373d (patch) | |
tree | c42be41678c2586d49a75cabce89322082698334 /app/graphql/types/alert_management | |
parent | fc845b37ec3a90aaa719975f607740c22ba6a113 (diff) |
Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42
Diffstat (limited to 'app/graphql/types/alert_management')
4 files changed, 9 insertions, 9 deletions
diff --git a/app/graphql/types/alert_management/alert_sort_enum.rb b/app/graphql/types/alert_management/alert_sort_enum.rb index 11a5cb95722..b4d09734e30 100644 --- a/app/graphql/types/alert_management/alert_sort_enum.rb +++ b/app/graphql/types/alert_management/alert_sort_enum.rb @@ -18,8 +18,8 @@ module Types value 'EVENT_COUNT_DESC', 'Events count by descending order.', value: :event_count_desc value 'SEVERITY_ASC', 'Severity from less critical to more critical.', value: :severity_asc value 'SEVERITY_DESC', 'Severity from more critical to less critical.', value: :severity_desc - value 'STATUS_ASC', 'Status by order: Ignored > Resolved > Acknowledged > Triggered.', value: :status_asc - value 'STATUS_DESC', 'Status by order: Triggered > Acknowledged > Resolved > Ignored.', value: :status_desc + value 'STATUS_ASC', 'Status by order: `Ignored > Resolved > Acknowledged > Triggered`.', value: :status_asc + value 'STATUS_DESC', 'Status by order: `Triggered > Acknowledged > Resolved > Ignored`.', value: :status_desc end end end diff --git a/app/graphql/types/alert_management/alert_type.rb b/app/graphql/types/alert_management/alert_type.rb index 5a2a5c68c8d..0ff0775ca86 100644 --- a/app/graphql/types/alert_management/alert_type.rb +++ b/app/graphql/types/alert_management/alert_type.rb @@ -8,7 +8,7 @@ module Types present_using ::AlertManagement::AlertPresenter - implements(Types::Notes::NoteableType) + implements(Types::Notes::NoteableInterface) authorize :read_alert_management_alert diff --git a/app/graphql/types/alert_management/integration_type.rb b/app/graphql/types/alert_management/integration_type.rb index d26d7348765..6cbc17cdbfb 100644 --- a/app/graphql/types/alert_management/integration_type.rb +++ b/app/graphql/types/alert_management/integration_type.rb @@ -43,7 +43,7 @@ module Types definition_methods do def resolve_type(object, context) - if object.is_a?(::PrometheusService) + if object.is_a?(::Integrations::Prometheus) Types::AlertManagement::PrometheusIntegrationType else Types::AlertManagement::HttpIntegrationType diff --git a/app/graphql/types/alert_management/prometheus_integration_type.rb b/app/graphql/types/alert_management/prometheus_integration_type.rb index 79f265f2f1e..27e4832d8f6 100644 --- a/app/graphql/types/alert_management/prometheus_integration_type.rb +++ b/app/graphql/types/alert_management/prometheus_integration_type.rb @@ -12,10 +12,10 @@ module Types authorize :admin_project - alias_method :prometheus_service, :object + alias_method :prometheus_integration, :object def name - prometheus_service.title + prometheus_integration.title end def type @@ -23,15 +23,15 @@ module Types end def token - prometheus_service.project&.alerting_setting&.token + prometheus_integration.project&.alerting_setting&.token end def url - prometheus_service.project && notify_project_prometheus_alerts_url(prometheus_service.project, format: :json) + prometheus_integration.project && notify_project_prometheus_alerts_url(prometheus_integration.project, format: :json) end def active - prometheus_service.manual_configuration? + prometheus_integration.manual_configuration? end end end |