Открыть боковую панель
nt_test133
nt_project_uxpg8lvcuq8w
Коммиты
fc795d6e
Коммит
fc795d6e
создал
Окт 05, 2015
по автору
Kamil Trzcinski
Просмотр файлов
Fix graphical glitches
владелец
e5e6c846
Изменения
3
Скрыть пробелы
Построчно
Рядом
app/controllers/ci/projects_controller.rb
Просмотр файла @
fc795d6e
...
...
@@ -14,9 +14,11 @@ class ProjectsController < Ci::ApplicationController
def
show
@ref
=
params
[
:ref
]
@commits
=
@project
.
commits
.
reverse_order
# TODO: this is broken
# @commits = @commits.where(ref: @ref) if @ref
@commits
=
@project
.
commits
.
group
(
:sha
).
reverse_order
if
@ref
builds
=
@project
.
builds
.
where
(
ref:
@ref
).
select
(
:commit_id
).
distinct
@commits
=
@commits
.
where
(
id:
builds
)
end
@commits
=
@commits
.
page
(
params
[
:page
]).
per
(
20
)
end
...
...
app/views/ci/commits/_commit.html.haml
Просмотр файла @
fc795d6e
...
...
@@ -16,7 +16,8 @@
%td
.build-branch
-
unless
@ref
%span
=
link_to
truncate
(
commit
.
last_ref
,
length:
25
),
ci_project_path
(
@project
,
ref:
commit
.
last_ref
)
-
commit
.
refs
.
each
do
|
ref
|
=
link_to
truncate
(
ref
,
length:
25
),
ci_project_path
(
@project
,
ref:
ref
)
%td
.duration
-
if
commit
.
duration
>
0
...
...
app/views/ci/commits/show.html.haml
Просмотр файла @
fc795d6e
...
...
@@ -4,14 +4,22 @@
.gray-content-block.middle-block
%pre
.commit-message
#{
@commit
.
git_commit_message
}
-
if
@commit
.
git_commit_message
#{
@commit
.
git_commit_message
}
-
else
No commit message
.gray-content-block.second-block
.row
.col-sm-6
%p
%span
.attr-name
Commit:
#{
gitlab_commit_link
(
@project
,
@commit
.
sha
)
}
%p
%span
.attr-name
Commit:
#{
gitlab_commit_link
(
@project
,
@commit
.
sha
)
}
%p
-
if
@commit
.
refs
.
present?
%span
.attr-name
Refs:
-
@commit
.
refs
.
each
do
|
ref
|
#{
gitlab_ref_link
(
@project
,
ref
)
}
.col-sm-6
-
if
@commit
.
git_author_name
||
@commit
.
git_author_email
%p
...
...
@@ -22,10 +30,10 @@
%span
.attr-name
Created at:
#{
@commit
.
created_at
.
to_s
(
:short
)
}
-
if
current_user
&&
can?
(
current_user
,
:manage_builds
,
gl_project
)
.pull-right
-
if
@commit
.
builds
.
running_or_pending
.
any?
=
link_to
"Cancel"
,
cancel_ci_project_commits_path
(
@project
,
@commit
),
class:
'btn btn-sm btn-danger'
-
if
current_user
&&
can?
(
current_user
,
:manage_builds
,
gl_project
)
-
if
@commit
.
builds
.
running_or_pending
.
any?
.pull-right
=
link_to
"Cancel"
,
cancel_ci_project_commits_path
(
@project
,
@commit
),
class:
'btn btn-sm btn-danger'
-
if
@commit
.
yaml_errors
.
present?
...
...
@@ -41,7 +49,7 @@
-
@commit
.
refs
.
each
do
|
ref
|
%h3
Builds for
#{
ref
}
Builds for
#{
gitlab_ref_link
(
@project
,
ref
)
}
-
if
@commit
.
duration_for_ref
(
ref
)
>
0
%small
.pull-right
%i
.fa.fa-time
...
...
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать