Class: AlertManagement::HttpIntegration

Inherits:
ApplicationRecord show all
Includes:
Gitlab::Routing
Defined in:
app/models/alert_management/http_integration.rb

Constant Summary collapse

LEGACY_IDENTIFIER =
'legacy'
DEFAULT_NAME_SLUG =
'http-endpoint'

Constants inherited from ApplicationRecord

ApplicationRecord::MAX_PLUCK

Instance Method Summary collapse

Methods included from Gitlab::Routing

add_helpers, includes_helpers, redirect_legacy_paths, url_helpers

Methods inherited from ApplicationRecord

cached_column_list, #create_or_load_association, declarative_enum, default_select_columns, id_in, id_not_in, iid_in, pluck_primary_key, primary_key_in, #readable_by?, safe_ensure_unique, safe_find_or_create_by, safe_find_or_create_by!, #to_ability_name, underscore, where_exists, where_not_exists, with_fast_read_statement_timeout, without_order

Methods included from SensitiveSerializableHash

#serializable_hash

Instance Method Details

#urlObject


36
37
38
39
40
# File 'app/models/alert_management/http_integration.rb', line 36

def url
  return project_alerts_notify_url(project, format: :json) if legacy?

  project_alert_http_integration_url(project, name_slug, endpoint_identifier, format: :json)
end