Class: Types::AlertManagement::PrometheusIntegrationType
- Inherits:
-
BaseObject
- Object
- GraphQL::Schema::Object
- BaseObject
- Types::AlertManagement::PrometheusIntegrationType
show all
- Includes:
- Gitlab::Routing
- Defined in:
- app/graphql/types/alert_management/prometheus_integration_type.rb
Instance Method Summary
collapse
includes_helpers, redirect_legacy_paths, url_helpers
Methods inherited from BaseObject
accepts, assignable?, authorization, authorization_scopes, authorize, authorized?, #current_user, #id
#present, #unpresented
Instance Method Details
#active ⇒ Object
33
34
35
|
# File 'app/graphql/types/alert_management/prometheus_integration_type.rb', line 33
def active
prometheus_integration.manual_configuration?
end
|
#name ⇒ Object
17
18
19
|
# File 'app/graphql/types/alert_management/prometheus_integration_type.rb', line 17
def name
prometheus_integration.title
end
|
#token ⇒ Object
25
26
27
|
# File 'app/graphql/types/alert_management/prometheus_integration_type.rb', line 25
def token
prometheus_integration.project&.alerting_setting&.token
end
|
#type ⇒ Object
21
22
23
|
# File 'app/graphql/types/alert_management/prometheus_integration_type.rb', line 21
def type
:prometheus
end
|
#url ⇒ Object
29
30
31
|
# File 'app/graphql/types/alert_management/prometheus_integration_type.rb', line 29
def url
prometheus_integration.project && notify_project_prometheus_alerts_url(prometheus_integration.project, format: :json)
end
|