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
c566f186
Commit
c566f186
authored
Mar 04, 2021
by
Kushal Pandya
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'blame-performance' into 'master'
Refactor blame view See merge request gitlab-org/gitlab!55488
parents
2d2878d6
3030d4d4
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
45 deletions
+50
-45
app/views/projects/blame/_age_map_legend.html.haml
app/views/projects/blame/_age_map_legend.html.haml
+0
-12
app/views/projects/blame/_blame_group.html.haml
app/views/projects/blame/_blame_group.html.haml
+0
-26
app/views/projects/blame/show.html.haml
app/views/projects/blame/show.html.haml
+45
-7
changelogs/unreleased/blame-performance.yml
changelogs/unreleased/blame-performance.yml
+5
-0
No files found.
app/views/projects/blame/_age_map_legend.html.haml
deleted
100644 → 0
View file @
2d2878d6
%span
.left-label
Newer
%span
.legend-box.legend-box-0
%span
.legend-box.legend-box-1
%span
.legend-box.legend-box-2
%span
.legend-box.legend-box-3
%span
.legend-box.legend-box-4
%span
.legend-box.legend-box-5
%span
.legend-box.legend-box-6
%span
.legend-box.legend-box-7
%span
.legend-box.legend-box-8
%span
.legend-box.legend-box-9
%span
.right-label
Older
app/views/projects/blame/_blame_group.html.haml
deleted
100644 → 0
View file @
2d2878d6
%tr
%td
.blame-commit
{
class:
commit_data
.
age_map_class
}
.commit
=
commit_data
.
author_avatar
.commit-row-title
%span
.item-title.str-truncated-100
=
commit_data
.
commit_link
%span
=
commit_data
.
project_blame_link
.light
=
commit_data
.
commit_author_link
=
_
(
'committed'
)
#{
commit_data
.
time_ago_tooltip
}
%td
.line-numbers
-
line_count
=
blame_group
[
:lines
].
count
-
(
current_line
...
(
current_line
+
line_count
)).
each
do
|
i
|
%a
.diff-line-num
{
href:
"#L#{i}"
,
id:
"L#{i}"
,
'data-line-number'
=>
i
}
=
link_icon
=
i
\
%td
.lines
%pre
.code.highlight
%code
-
blame_group
[
:lines
].
each
do
|
line
|
#{
line
}
app/views/projects/blame/show.html.haml
View file @
c566f186
...
...
@@ -6,18 +6,56 @@
.file-holder
=
render
"projects/blob/header"
,
blob:
@blob
,
blame:
true
.file-blame-legend
=
render
'age_map_legend'
%span
.left-label
Newer
%span
.legend-box.legend-box-0
%span
.legend-box.legend-box-1
%span
.legend-box.legend-box-2
%span
.legend-box.legend-box-3
%span
.legend-box.legend-box-4
%span
.legend-box.legend-box-5
%span
.legend-box.legend-box-6
%span
.legend-box.legend-box-7
%span
.legend-box.legend-box-8
%span
.legend-box.legend-box-9
%span
.right-label
Older
.table-responsive.file-content.blame.code.js-syntax-highlight
%table
-
current_line
=
1
-
@blame
.
groups
.
each
do
|
blame_group
|
-
commit_data
=
@blame
.
commit_data
(
blame_group
[
:commit
])
-
line_count
=
blame_group
[
:lines
].
count
%tr
%td
.blame-commit
{
class:
commit_data
.
age_map_class
}
.commit
=
commit_data
.
author_avatar
.commit-row-title
%span
.item-title.str-truncated-100
=
commit_data
.
commit_link
%span
=
commit_data
.
project_blame_link
.light
=
commit_data
.
commit_author_link
=
_
(
'committed'
)
#{
commit_data
.
time_ago_tooltip
}
%td
.line-numbers
-
(
current_line
...
(
current_line
+
line_count
)).
each
do
|
i
|
%a
.diff-line-num
{
href:
"#L#{i}"
,
id:
"L#{i}"
,
'data-line-number'
=>
i
}
=
link_icon
=
i
\
=
render
'blame_group'
,
blame_group:
blame_group
,
current_line:
current_line
,
link_icon:
link_icon
,
commit_data:
commit_data
%td
.lines
%pre
.code.highlight
%code
-
blame_group
[
:lines
].
each
do
|
line
|
#{
line
}
-
current_line
+=
blame_group
[
:lines
].
count
-
current_line
+=
line_
count
changelogs/unreleased/blame-performance.yml
0 → 100644
View file @
c566f186
---
title
:
Refactor blame view
merge_request
:
55488
author
:
type
:
performance
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