summaryrefslogtreecommitdiff
path: root/app/views/ci/variables/_variable_row.html.haml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/ci/variables/_variable_row.html.haml')
-rw-r--r--app/views/ci/variables/_variable_row.html.haml27
1 files changed, 0 insertions, 27 deletions
diff --git a/app/views/ci/variables/_variable_row.html.haml b/app/views/ci/variables/_variable_row.html.haml
index 3a7f7a241ac..483c767d029 100644
--- a/app/views/ci/variables/_variable_row.html.haml
+++ b/app/views/ci/variables/_variable_row.html.haml
@@ -1,23 +1,16 @@
- form_field = local_assigns.fetch(:form_field, nil)
- variable = local_assigns.fetch(:variable, nil)
-- only_key_value = local_assigns.fetch(:only_key_value, false)
- id = variable&.id
- variable_type = variable&.variable_type
- key = variable&.key
- value = variable&.value
-- is_protected_default = ci_variable_protected_by_default?
-- is_protected = ci_variable_protected?(variable, only_key_value)
-- is_masked_default = false
-- is_masked = ci_variable_masked?(variable, only_key_value)
- id_input_name = "#{form_field}[variables_attributes][][id]"
- destroy_input_name = "#{form_field}[variables_attributes][][_destroy]"
- variable_type_input_name = "#{form_field}[variables_attributes][][variable_type]"
- key_input_name = "#{form_field}[variables_attributes][][key]"
- value_input_name = "#{form_field}[variables_attributes][][secret_value]"
-- protected_input_name = "#{form_field}[variables_attributes][][protected]"
-- masked_input_name = "#{form_field}[variables_attributes][][masked]"
%li.js-row.ci-variable-row{ data: { is_persisted: "#{!id.nil?}" } }
.ci-variable-row-body.border-bottom
@@ -40,25 +33,5 @@
%p.masking-validation-error.gl-field-error.hide
= s_("CiVariables|Cannot use Masked Variable with current value")
= link_to sprite_icon('question-o'), help_page_path('ci/variables/index', anchor: 'mask-a-cicd-variable'), target: '_blank', rel: 'noopener noreferrer'
- - unless only_key_value
- .ci-variable-body-item.ci-variable-protected-item.table-section.section-20.mr-0.border-top-0
- .gl-mr-3
- = s_("CiVariable|Protected")
- = render "shared/buttons/project_feature_toggle", is_checked: is_protected, label: s_("CiVariable|Toggle protected") do
- %input{ type: "hidden",
- class: 'js-ci-variable-input-protected js-project-feature-toggle-input',
- name: protected_input_name,
- value: is_protected,
- data: { default: is_protected_default.to_s } }
- .ci-variable-body-item.ci-variable-masked-item.table-section.section-20.mr-0.border-top-0
- .gl-mr-3
- = s_("CiVariable|Masked")
- = render "shared/buttons/project_feature_toggle", is_checked: is_masked, label: s_("CiVariable|Toggle masked"), class_list: "js-project-feature-toggle project-feature-toggle qa-variable-masked" do
- %input{ type: "hidden",
- class: 'js-ci-variable-input-masked js-project-feature-toggle-input',
- name: masked_input_name,
- value: is_masked,
- data: { default: is_masked_default.to_s } }
- = render_if_exists 'ci/variables/environment_scope', form_field: form_field, variable: variable
%button.gl-button.btn.btn-default.btn-icon.js-row-remove-button.ci-variable-row-remove-button.table-section{ type: 'button', 'aria-label': s_('CiVariables|Remove variable row') }
= sprite_icon('close')