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
676d9dfb
Commit
676d9dfb
authored
Aug 25, 2020
by
Brandon Labuschagne
Committed by
Kushal Pandya
Aug 25, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add commit count to MR Analytics
This commits adds the commit count to the MR Analytics Throughput table.
parent
ac26955d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
0 deletions
+18
-0
ee/app/assets/javascripts/analytics/merge_request_analytics/components/throughput_table.vue
...s/merge_request_analytics/components/throughput_table.vue
+10
-0
ee/app/assets/javascripts/analytics/merge_request_analytics/constants.js
...avascripts/analytics/merge_request_analytics/constants.js
+1
-0
ee/app/assets/javascripts/analytics/merge_request_analytics/graphql/queries/throughput_table.query.graphql
..._analytics/graphql/queries/throughput_table.query.graphql
+1
-0
ee/spec/frontend/analytics/merge_request_analytics/components/throughput_table_spec.js
...rge_request_analytics/components/throughput_table_spec.js
+4
-0
ee/spec/frontend/analytics/merge_request_analytics/mock_data.js
...c/frontend/analytics/merge_request_analytics/mock_data.js
+2
-0
No files found.
ee/app/assets/javascripts/analytics/merge_request_analytics/components/throughput_table.vue
View file @
676d9dfb
...
...
@@ -69,6 +69,12 @@ export default {
tdClass
:
'
merge-request-analytics-td
'
,
thAttr
:
TH_TEST_ID
,
},
{
key
:
'
commits
'
,
label
:
s__
(
'
Commits
'
),
tdClass
:
'
merge-request-analytics-td
'
,
thAttr
:
TH_TEST_ID
,
},
{
key
:
'
pipelines
'
,
label
:
s__
(
'
MergeRequestAnalytics|Pipelines
'
),
...
...
@@ -228,6 +234,10 @@ export default {
</div>
</
template
>
<
template
#cell(commits)=
"{ item }"
>
<div
:data-testid=
"$options.testIds.COMMITS"
>
{{
item
.
commitCount
}}
</div>
</
template
>
<
template
#cell(pipelines)=
"{ item }"
>
<div
:data-testid=
"$options.testIds.PIPELINES"
>
{{
item
.
pipelines
.
nodes
.
length
}}
</div>
</
template
>
...
...
ee/app/assets/javascripts/analytics/merge_request_analytics/constants.js
View file @
676d9dfb
...
...
@@ -36,6 +36,7 @@ export const THROUGHPUT_TABLE_TEST_IDS = {
PIPELINES
:
'
pipelinesCol
'
,
LINE_CHANGES
:
'
lineChangesCol
'
,
ASSIGNEES
:
'
assigneesCol
'
,
COMMITS
:
'
commitsCol
'
,
};
export
const
PIPELINE_STATUS_ICON_CLASSES
=
{
...
...
ee/app/assets/javascripts/analytics/merge_request_analytics/graphql/queries/throughput_table.query.graphql
View file @
676d9dfb
...
...
@@ -33,6 +33,7 @@ query($fullPath: ID!, $startDate: Time!, $endDate: Time!, $limit: Int!) {
}
}
}
commitCount
}
}
}
...
...
ee/spec/frontend/analytics/merge_request_analytics/components/throughput_table_spec.js
View file @
676d9dfb
...
...
@@ -215,6 +215,10 @@ describe('ThroughputTable', () => {
expect
(
findCol
(
TEST_IDS
.
MILESTONE
).
text
()).
toBe
(
title
);
});
it
(
'
displays the correct commit count
'
,
()
=>
{
expect
(
findCol
(
TEST_IDS
.
COMMITS
).
text
()).
toBe
(
'
1
'
);
});
it
(
'
displays the correct pipeline count
'
,
()
=>
{
expect
(
findCol
(
TEST_IDS
.
PIPELINES
).
text
()).
toBe
(
'
0
'
);
});
...
...
ee/spec/frontend/analytics/merge_request_analytics/mock_data.js
View file @
676d9dfb
...
...
@@ -51,6 +51,7 @@ export const throughputTableHeaders = [
'
Date Merged
'
,
'
Time to merge
'
,
'
Milestone
'
,
'
Commits
'
,
'
Pipelines
'
,
'
Line changes
'
,
'
Assignees
'
,
...
...
@@ -81,5 +82,6 @@ export const throughputTableData = [
pipelines
:
{
nodes
:
[],
},
commitCount
:
1
,
},
];
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