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
160f397b
Commit
160f397b
authored
Feb 02, 2022
by
indigane
Committed by
Phil Hughes
Feb 02, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add date to graph commit tooltip
parent
a4cb0770
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
app/assets/javascripts/network/raphael.js
app/assets/javascripts/network/raphael.js
+8
-3
No files found.
app/assets/javascripts/network/raphael.js
View file @
160f397b
import
Raphael
from
'
raphael/raphael
'
;
import
{
formatDate
}
from
'
~/lib/utils/datetime_utility
'
;
Raphael
.
prototype
.
commitTooltip
=
function
commitTooltip
(
x
,
y
,
commit
)
{
const
boxWidth
=
300
;
const
icon
=
this
.
image
(
gon
.
relative_url_root
+
commit
.
author
.
icon
,
x
,
y
,
20
,
20
);
const
nameText
=
this
.
text
(
x
+
25
,
y
+
10
,
commit
.
author
.
name
);
const
idText
=
this
.
text
(
x
,
y
+
35
,
commit
.
id
);
const
messageText
=
this
.
text
(
x
,
y
+
50
,
commit
.
message
.
replace
(
/
\r?\n
/g
,
'
\n
'
));
const
textSet
=
this
.
set
(
icon
,
nameText
,
idText
,
messageText
).
attr
({
const
dateText
=
this
.
text
(
x
,
y
+
35
,
formatDate
(
commit
.
date
));
const
idText
=
this
.
text
(
x
,
y
+
55
,
commit
.
id
);
const
messageText
=
this
.
text
(
x
,
y
+
70
,
commit
.
message
.
replace
(
/
\r?\n
/g
,
'
\n
'
));
const
textSet
=
this
.
set
(
icon
,
nameText
,
dateText
,
idText
,
messageText
).
attr
({
'
text-anchor
'
:
'
start
'
,
font
:
'
12px Monaco, monospace
'
,
});
...
...
@@ -14,6 +16,9 @@ Raphael.prototype.commitTooltip = function commitTooltip(x, y, commit) {
font
:
'
14px Arial
'
,
'
font-weight
'
:
'
bold
'
,
});
dateText
.
attr
({
fill
:
'
#666
'
,
});
idText
.
attr
({
fill
:
'
#AAA
'
,
});
...
...
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