debian-mirror-gitlab/app/views/projects/variables/show.html.haml

43 lines
1.4 KiB
Text
Raw Normal View History

2015-11-26 14:37:03 +05:30
- page_title "Variables"
2015-09-25 12:07:36 +05:30
%h3.page-title
Secret Variables
2015-10-24 18:46:33 +05:30
%p.light
2016-04-02 18:10:28 +05:30
These variables will be set to environment by the runner.
2015-09-25 12:07:36 +05:30
%br
2015-10-24 18:46:33 +05:30
So you can use them for passwords, secret keys or whatever you want.
2016-04-02 18:10:28 +05:30
%br
The value of the variable can be visible in build log if explicitly asked to do so.
2015-09-25 12:07:36 +05:30
%hr
2015-12-23 02:04:40 +05:30
= nested_form_for @project, url: url_for(controller: 'projects/variables', action: 'update'), html: { class: 'form-horizontal' } do |f|
2015-09-25 12:07:36 +05:30
- if @project.errors.any?
#error_explanation
2015-12-23 02:04:40 +05:30
%p.lead= "#{pluralize(@project.errors.count, "error")} prohibited this project from being saved:"
2015-09-25 12:07:36 +05:30
.alert.alert-error
%ul
2015-12-23 02:04:40 +05:30
- @project.errors.full_messages.each do |msg|
2015-09-25 12:07:36 +05:30
%li= msg
= f.fields_for :variables do |variable_form|
.form-group
= variable_form.label :key, 'Key', class: 'control-label'
.col-sm-10
= variable_form.text_field :key, class: 'form-control', placeholder: "PROJECT_VARIABLE"
.form-group
= variable_form.label :value, 'Value', class: 'control-label'
.col-sm-10
= variable_form.text_area :value, class: 'form-control', rows: 2, placeholder: ""
= variable_form.link_to_remove "Remove this variable", class: 'btn btn-danger pull-right prepend-top-10'
%hr
%p
.clearfix
= f.link_to_add "Add a variable", :variables, class: 'btn btn-success pull-right'
.form-actions
= f.submit 'Save changes', class: 'btn btn-save', return_to: request.original_url