Class: Ci::GroupVariable

Inherits:
ApplicationRecord show all
Includes:
HasVariable, Maskable, RawVariable, HasEnvironmentScope, Limitable, Presentable
Defined in:
app/models/ci/group_variable.rb

Constant Summary

Constants included from Limitable

Limitable::GLOBAL_SCOPE

Constants included from Maskable

Maskable::MASK_AND_RAW_REGEX, Maskable::REGEX

Constants inherited from ApplicationRecord

ApplicationRecord::MAX_PLUCK

Constants included from ResetOnUnionError

ResetOnUnionError::MAX_RESET_PERIOD

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Presentable

#present

Methods included from Limitable

#exceeds_limits?

Methods included from Maskable

#masked_and_expanded?, #masked_and_raw?, #to_runner_variable

Methods included from HasVariable

#to_runner_variable

Methods included from HasEnvironmentScope

#environment_scope=

Methods inherited from ApplicationRecord

model_name, table_name_prefix

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

Class Method Details

.sort_by_attribute(method) ⇒ Object



61
62
63
64
65
66
67
68
# File 'app/models/ci/group_variable.rb', line 61

def self.sort_by_attribute(method)
  case method.to_s
  when 'created_at_asc' then order_created_asc
  when 'created_at_desc' then order_created_desc
  when 'key_asc' then order_key_asc
  when 'key_desc' then order_key_desc
  end
end

Instance Method Details

#audit_detailsObject



49
50
51
# File 'app/models/ci/group_variable.rb', line 49

def audit_details
  key
end

#group_ci_cd_settings_pathObject



57
58
59
# File 'app/models/ci/group_variable.rb', line 57

def group_ci_cd_settings_path
  Gitlab::Routing.url_helpers.group_settings_ci_cd_path(group)
end

#group_nameObject



53
54
55
# File 'app/models/ci/group_variable.rb', line 53

def group_name
  group.name
end