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
42ac344a
Commit
42ac344a
authored
Nov 22, 2021
by
indigane
Committed by
Jacques Erasmus
Nov 22, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix ambiguous dates in commit graph
parent
d800938c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
app/assets/javascripts/network/branch_graph.js
app/assets/javascripts/network/branch_graph.js
+4
-6
app/views/projects/network/show.json.erb
app/views/projects/network/show.json.erb
+1
-1
No files found.
app/assets/javascripts/network/branch_graph.js
View file @
42ac344a
...
...
@@ -98,6 +98,7 @@ export default class BranchGraph {
let
len
=
0
;
let
cuday
=
0
;
let
cumonth
=
''
;
let
cuyear
=
''
;
const
{
r
}
=
this
;
r
.
rect
(
0
,
0
,
40
,
this
.
barHeight
).
attr
({
fill
:
'
#222
'
,
...
...
@@ -108,24 +109,21 @@ export default class BranchGraph {
const
ref
=
this
.
days
;
for
(
mm
=
0
,
len
=
ref
.
length
;
mm
<
len
;
mm
+=
1
)
{
const
day
=
ref
[
mm
];
if
(
cuday
!==
day
[
0
]
||
cumonth
!==
day
[
1
])
{
if
(
cuday
!==
day
[
0
]
||
cumonth
!==
day
[
1
]
||
cuyear
!==
day
[
2
]
)
{
// Dates
r
.
text
(
55
,
this
.
offsetY
+
this
.
unitTime
*
mm
,
day
[
0
]).
attr
({
font
:
'
12px Monaco, monospace
'
,
fill
:
'
#BBB
'
,
});
[
cuday
]
=
day
;
}
if
(
cumonth
!==
day
[
1
])
{
if
(
cumonth
!==
day
[
1
]
||
cuyear
!==
day
[
2
]
)
{
// Months
r
.
text
(
20
,
this
.
offsetY
+
this
.
unitTime
*
mm
,
day
[
1
]).
attr
({
font
:
'
12px Monaco, monospace
'
,
fill
:
'
#EEE
'
,
});
// eslint-disable-next-line prefer-destructuring
cumonth
=
day
[
1
];
}
[
cuday
,
cumonth
,
cuyear
]
=
day
;
}
this
.
renderPartialGraph
();
return
this
.
bindEvents
();
...
...
app/views/projects/network/show.json.erb
View file @
42ac344a
...
...
@@ -2,7 +2,7 @@
<%=
raw
(
{
days:
@graph
.
days
.
compact
.
map
{
|
d
|
[
d
.
day
,
d
.
strftime
(
"%b"
)]
},
days:
@graph
.
days
.
compact
.
map
{
|
d
|
[
d
.
day
,
d
.
strftime
(
"%b"
)
,
d
.
year
]
},
commits:
@graph
.
commits
.
map
do
|
c
|
{
parents:
parents_zip_spaces
(
c
.
parents
(
@graph
.
map
),
c
.
parent_spaces
),
...
...
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