Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
9d4c063f
Commit
9d4c063f
authored
Apr 30, 2018
by
Jose
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add variables table to the new pipeline form
parent
49cc945b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
4 deletions
+20
-4
app/assets/javascripts/pages/projects/pipelines/new/index.js
app/assets/javascripts/pages/projects/pipelines/new/index.js
+6
-0
app/views/projects/pipelines/new.html.haml
app/views/projects/pipelines/new.html.haml
+14
-4
No files found.
app/assets/javascripts/pages/projects/pipelines/new/index.js
View file @
9d4c063f
import
$
from
'
jquery
'
;
import
$
from
'
jquery
'
;
import
NewBranchForm
from
'
~/new_branch_form
'
;
import
NewBranchForm
from
'
~/new_branch_form
'
;
import
setupNativeFormVariableList
from
'
~/ci_variable_list/native_form_variable_list
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
new
NewBranchForm
(
$
(
'
.js-new-pipeline-form
'
));
// eslint-disable-line no-new
new
NewBranchForm
(
$
(
'
.js-new-pipeline-form
'
));
// eslint-disable-line no-new
setupNativeFormVariableList
({
container
:
$
(
'
.js-ci-variable-list-section
'
),
formField
:
'
variables_attributes
'
,
});
});
});
app/views/projects/pipelines/new.html.haml
View file @
9d4c063f
-
breadcrumb_title
"Pipelines"
-
breadcrumb_title
"Pipelines"
-
page_title
=
s_
(
"Pipeline|Run Pipeline"
)
-
page_title
=
s_
(
"Pipeline|Run Pipeline"
)
-
settings_link
=
link_to
_
(
'CI/CD settings'
),
project_settings_ci_cd_path
(
@project
)
%h3
.page-title
%h3
.page-title
=
s_
(
"Pipeline|Run Pipeline"
)
=
s_
(
"Pipeline|Run Pipeline"
)
...
@@ -8,17 +9,26 @@
...
@@ -8,17 +9,26 @@
=
form_for
@pipeline
,
as: :pipeline
,
url:
project_pipelines_path
(
@project
),
html:
{
id:
"new-pipeline-form"
,
class:
"form-horizontal js-new-pipeline-form js-requires-input"
}
do
|
f
|
=
form_for
@pipeline
,
as: :pipeline
,
url:
project_pipelines_path
(
@project
),
html:
{
id:
"new-pipeline-form"
,
class:
"form-horizontal js-new-pipeline-form js-requires-input"
}
do
|
f
|
=
form_errors
(
@pipeline
)
=
form_errors
(
@pipeline
)
.form-group
.form-group
=
f
.
label
:ref
,
s_
(
'Pipeline|Run on'
),
class:
'control-label'
.col-sm-12
.col-sm-10
=
f
.
label
:ref
,
s_
(
'Pipeline|Create for'
)
=
hidden_field_tag
'pipeline[ref]'
,
params
[
:ref
]
||
@project
.
default_branch
=
hidden_field_tag
'pipeline[ref]'
,
params
[
:ref
]
||
@project
.
default_branch
=
dropdown_tag
(
params
[
:ref
]
||
@project
.
default_branch
,
=
dropdown_tag
(
params
[
:ref
]
||
@project
.
default_branch
,
options:
{
toggle_class:
'js-branch-select wide git-revision-dropdown-toggle'
,
options:
{
toggle_class:
'js-branch-select wide git-revision-dropdown-toggle'
,
filter:
true
,
dropdown_class:
"dropdown-menu-selectable git-revision-dropdown"
,
placeholder:
s_
(
"Pipeline|Search branches"
),
filter:
true
,
dropdown_class:
"dropdown-menu-selectable git-revision-dropdown"
,
placeholder:
s_
(
"Pipeline|Search branches"
),
data:
{
selected:
params
[
:ref
]
||
@project
.
default_branch
,
field_name:
'pipeline[ref]'
}
})
data:
{
selected:
params
[
:ref
]
||
@project
.
default_branch
,
field_name:
'pipeline[ref]'
}
})
.help-block
.help-block
=
s_
(
"Pipeline|Existing branch name, tag"
)
=
s_
(
"Pipeline|Existing branch name or tag"
)
.col-sm-12.prepend-top-10.js-ci-variable-list-section
%label
.label-light
=
s_
(
'Pipeline|Variables'
)
.help-block
=
(
s_
(
"Pipeline|Specify variable values to be used in this run. The values specified in %{settings_link} will be used by default"
)
%
{
settings_link:
settings_link
}).
html_safe
%ul
.ci-variable-list
=
render
'ci/variables/variable_row'
,
form_field:
'pipeline'
,
only_key_value:
true
.form-actions
.form-actions
=
f
.
submit
s_
(
'Pipeline|
Run pipeline'
),
class:
'btn btn-success
'
,
tabindex:
3
=
f
.
submit
s_
(
'Pipeline|
Create pipeline'
),
class:
'btn btn-success js-variables-save-button
'
,
tabindex:
3
=
link_to
'Cancel'
,
project_pipelines_path
(
@project
),
class:
'btn btn-default pull-right'
=
link_to
'Cancel'
,
project_pipelines_path
(
@project
),
class:
'btn btn-default pull-right'
-# haml-lint:disable InlineJavaScript
-# haml-lint:disable InlineJavaScript
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment