Открыть боковую панель
nt_test121
nt_project_9da4a5yt9x4b
Коммиты
1c4eedd5
Коммит
1c4eedd5
создал
Окт 29, 2018
по автору
Takuya Noguchi
Зафиксировано автором
Nick Thomas
Окт 29, 2018
Просмотр файлов
Remove all tables from Pipeline page when there is no job for the Pipeline
владелец
43463869
Изменения
6
Скрыть пробелы
Построчно
Рядом
app/assets/javascripts/ide/components/pipelines/list.vue
Просмотр файла @
1c4eedd5
...
...
@@ -25,7 +25,7 @@ export default {
...
mapState
(
'
pipelines
'
,
[
'
isLoadingPipeline
'
,
'
latestPipeline
'
,
'
stages
'
,
'
isLoadingJobs
'
]),
ciLintText
()
{
return
sprintf
(
__
(
'
You can
also
test your .gitlab-ci.yml in
the
%{linkStart}Lint%{linkEnd}
'
),
__
(
'
You can test your .gitlab-ci.yml in %{linkStart}
CI
Lint%{linkEnd}
.
'
),
{
linkStart
:
`<a href="
${
_
.
escape
(
this
.
currentProject
.
web_url
)}
/-/ci/lint">`
,
linkEnd
:
'
</a>
'
,
...
...
app/views/projects/pipelines/_with_tabs.html.haml
Просмотр файла @
1c4eedd5
...
...
@@ -19,30 +19,23 @@
#js-pipeline-graph-vue
#js-tab-builds
.tab-pane
-
if
pipeline
.
yaml_errors
.
present?
.bs-callout.bs-callout-danger
%h4
Found errors in your .gitlab-ci.yml:
%ul
-
pipeline
.
yaml_errors
.
split
(
","
).
each
do
|
error
|
%li
=
error
You can also test your .gitlab-ci.yml in the
#{
link_to
"Lint"
,
project_ci_lint_path
(
@project
)
}
-
if
pipeline
.
legacy_stages
.
present?
.table-holder.pipeline-holder
%table
.table.ci-table.pipeline
%thead
%tr
%th
Status
%th
Job ID
%th
Name
%th
%th
Coverage
%th
=
render
partial:
"projects/stage/stage"
,
collection:
pipeline
.
legacy_stages
,
as: :stage
-
if
pipeline
.
project
.
builds_enabled?
&&
!
pipeline
.
ci_yaml_file
-
els
if
pipeline
.
project
.
builds_enabled?
&&
!
pipeline
.
ci_yaml_file
.bs-callout.bs-callout-warning
\.gitlab-ci.yml not found in this commit
.table-holder.pipeline-holder
%table
.table.ci-table.pipeline
%thead
%tr
%th
Status
%th
Job ID
%th
Name
%th
%th
Coverage
%th
=
render
partial:
"projects/stage/stage"
,
collection:
pipeline
.
legacy_stages
,
as: :stage
-
if
@pipeline
.
failed_builds
.
present?
#js-tab-failures
.build-failures.tab-pane.build-page
%table
.table.responsive-table.ci-table.responsive-table-sm-rounded
...
...
app/views/projects/pipelines/show.html.haml
Просмотр файла @
1c4eedd5
...
...
@@ -9,6 +9,14 @@
-
if
@pipeline
.
commit
.
present?
=
render
"projects/pipelines/info"
,
commit:
@pipeline
.
commit
=
render
"projects/pipelines/with_tabs"
,
pipeline:
@pipeline
-
if
@pipeline
.
builds
.
empty?
&&
@pipeline
.
yaml_errors
.
present?
.bs-callout.bs-callout-danger
%h4
Found errors in your .gitlab-ci.yml:
%ul
-
@pipeline
.
yaml_errors
.
split
(
","
).
each
do
|
error
|
%li
=
error
You can test your .gitlab-ci.yml in
#{
link_to
"CI Lint"
,
project_ci_lint_path
(
@project
)
}
.
-
else
=
render
"projects/pipelines/with_tabs"
,
pipeline:
@pipeline
.js-pipeline-details-vue
{
data:
{
endpoint:
project_pipeline_path
(
@project
,
@pipeline
,
format: :json
)
}
}
changelogs/unreleased/45669-table-in-jobs-on-pipeline.yml
0 → 100644
Просмотр файла @
1c4eedd5
---
title
:
Hide all tables on Pipeline when no Jobs for the Pipeline
merge_request
:
18540
author
:
Takuya Noguchi
type
:
fixed
locale/gitlab.pot
Просмотр файла @
1c4eedd5
...
...
@@ -7014,9 +7014,6 @@ msgstr ""
msgid "You can also star a label to make it a priority label."
msgstr ""
msgid "You can also test your .gitlab-ci.yml in the %{linkStart}Lint%{linkEnd}"
msgstr ""
msgid "You can easily contribute to them by requesting to join these groups."
msgstr ""
...
...
@@ -7038,6 +7035,9 @@ msgstr ""
msgid "You can set up jobs to only use Runners with specific tags. Separate tags with commas."
msgstr ""
msgid "You can test your .gitlab-ci.yml in %{linkStart}CI Lint%{linkEnd}."
msgstr ""
msgid "You cannot write to this read-only GitLab instance."
msgstr ""
...
...
spec/features/commits_spec.rb
Просмотр файла @
1c4eedd5
...
...
@@ -114,33 +114,6 @@
expect
(
page
).
to
have_content
'canceled'
end
end
describe
'.gitlab-ci.yml not found warning'
do
context
'ci builds enabled'
do
it
"does not show warning"
do
visit
pipeline_path
(
pipeline
)
expect
(
page
).
not_to
have_content
'.gitlab-ci.yml not found in this commit'
end
it
'shows warning'
do
stub_ci_pipeline_yaml_file
(
nil
)
visit
pipeline_path
(
pipeline
)
expect
(
page
).
to
have_content
'.gitlab-ci.yml not found in this commit'
end
end
context
'ci builds disabled'
do
before
do
stub_ci_builds_disabled
stub_ci_pipeline_yaml_file
(
nil
)
visit
pipeline_path
(
pipeline
)
end
it
'does not show warning'
do
expect
(
page
).
not_to
have_content
'.gitlab-ci.yml not found in this commit'
end
end
end
end
context
"when logged as reporter"
do
...
...
@@ -182,6 +155,39 @@
end
end
end
describe
'.gitlab-ci.yml not found warning'
do
before
do
project
.
add_reporter
(
user
)
end
context
'ci builds enabled'
do
it
'does not show warning'
do
visit
pipeline_path
(
pipeline
)
expect
(
page
).
not_to
have_content
'.gitlab-ci.yml not found in this commit'
end
it
'shows warning'
do
stub_ci_pipeline_yaml_file
(
nil
)
visit
pipeline_path
(
pipeline
)
expect
(
page
).
to
have_content
'.gitlab-ci.yml not found in this commit'
end
end
context
'ci builds disabled'
do
it
'does not show warning'
do
stub_ci_builds_disabled
stub_ci_pipeline_yaml_file
(
nil
)
visit
pipeline_path
(
pipeline
)
expect
(
page
).
not_to
have_content
'.gitlab-ci.yml not found in this commit'
end
end
end
end
context
'viewing commits for a branch'
do
...
...
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать