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
15aaa722
Commit
15aaa722
authored
Jul 31, 2020
by
Ezekiel Kigbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address review comments
Address reviewer comments on the MR including replacing utility classes
parent
9ee7ca27
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
12 deletions
+14
-12
ee/app/assets/javascripts/analytics/cycle_analytics/components/base.vue
...javascripts/analytics/cycle_analytics/components/base.vue
+3
-3
ee/app/assets/javascripts/analytics/cycle_analytics/store/actions.js
...ts/javascripts/analytics/cycle_analytics/store/actions.js
+2
-2
ee/spec/frontend/api_spec.js
ee/spec/frontend/api_spec.js
+9
-7
No files found.
ee/app/assets/javascripts/analytics/cycle_analytics/components/base.vue
View file @
15aaa722
...
@@ -225,9 +225,9 @@ export default {
...
@@ -225,9 +225,9 @@ export default {
class=
"gl-align-self-start gl-sm-align-self-start gl-mt-0 gl-sm-mt-5"
class=
"gl-align-self-start gl-sm-align-self-start gl-mt-0 gl-sm-mt-5"
/>
/>
</div>
</div>
<div
class=
"
mw-100
"
>
<div
class=
"
gl-max-w-full
"
>
<div
class=
"
mt-3 py-2
px-3 bg-gray-light border-top border-bottom"
>
<div
class=
"
gl-mt-3 gl-py-2 gl-
px-3 bg-gray-light border-top border-bottom"
>
<div
v-if=
"shouldDisplayPathNavigation"
class=
"
w-100
pb-2"
>
<div
v-if=
"shouldDisplayPathNavigation"
class=
"
gl-w-full gl-
pb-2"
>
<path-navigation
<path-navigation
class=
"js-path-navigation"
class=
"js-path-navigation"
:loading=
"isLoading"
:loading=
"isLoading"
...
...
ee/app/assets/javascripts/analytics/cycle_analytics/store/actions.js
View file @
15aaa722
...
@@ -217,7 +217,7 @@ export const updateStage = ({ dispatch, getters }, { id, ...params }) => {
...
@@ -217,7 +217,7 @@ export const updateStage = ({ dispatch, getters }, { id, ...params }) => {
return
Api
.
cycleAnalyticsUpdateStage
(
currentGroupPath
,
currentValueStreamId
,
id
,
params
)
return
Api
.
cycleAnalyticsUpdateStage
(
currentGroupPath
,
currentValueStreamId
,
id
,
params
)
.
then
(({
data
})
=>
dispatch
(
'
receiveUpdateStageSuccess
'
,
data
))
.
then
(({
data
})
=>
dispatch
(
'
receiveUpdateStageSuccess
'
,
data
))
.
catch
(({
response
:
{
status
=
400
,
data
:
responseData
}
=
{}
})
=>
.
catch
(({
response
:
{
status
=
httpStatus
.
BAD_REQUEST
,
data
:
responseData
}
=
{}
})
=>
dispatch
(
'
receiveUpdateStageError
'
,
{
status
,
responseData
,
data
:
{
id
,
...
params
}
}),
dispatch
(
'
receiveUpdateStageError
'
,
{
status
,
responseData
,
data
:
{
id
,
...
params
}
}),
);
);
};
};
...
@@ -289,7 +289,7 @@ export const reorderStage = ({ dispatch, getters }, initialData) => {
...
@@ -289,7 +289,7 @@ export const reorderStage = ({ dispatch, getters }, initialData) => {
return
Api
.
cycleAnalyticsUpdateStage
(
currentGroupPath
,
currentValueStreamId
,
id
,
params
)
return
Api
.
cycleAnalyticsUpdateStage
(
currentGroupPath
,
currentValueStreamId
,
id
,
params
)
.
then
(({
data
})
=>
dispatch
(
'
receiveReorderStageSuccess
'
,
data
))
.
then
(({
data
})
=>
dispatch
(
'
receiveReorderStageSuccess
'
,
data
))
.
catch
(({
response
:
{
status
=
400
,
data
:
responseData
}
=
{}
})
=>
.
catch
(({
response
:
{
status
=
httpStatus
.
BAD_REQUEST
,
data
:
responseData
}
=
{}
})
=>
dispatch
(
'
receiveReorderStageError
'
,
{
status
,
responseData
}),
dispatch
(
'
receiveReorderStageError
'
,
{
status
,
responseData
}),
);
);
};
};
...
...
ee/spec/frontend/api_spec.js
View file @
15aaa722
import
MockAdapter
from
'
axios-mock-adapter
'
;
import
MockAdapter
from
'
axios-mock-adapter
'
;
import
Api
from
'
ee/api
'
;
import
Api
from
'
ee/api
'
;
import
*
as
cycle
AnalyticsConstants
from
'
ee/analytics/cycle_analytics/constants
'
;
import
*
as
valueStream
AnalyticsConstants
from
'
ee/analytics/cycle_analytics/constants
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
httpStatus
from
'
~/lib/utils/http_status
'
;
import
httpStatus
from
'
~/lib/utils/http_status
'
;
import
*
as
analyticsMockData
from
'
ee_jest/analytics/cycle_analytics/mock_data
'
;
import
*
as
analyticsMockData
from
'
ee_jest/analytics/cycle_analytics/mock_data
'
;
...
@@ -206,13 +206,15 @@ describe('Api', () => {
...
@@ -206,13 +206,15 @@ describe('Api', () => {
const
groupId
=
'
counting-54321
'
;
const
groupId
=
'
counting-54321
'
;
const
stageId
=
'
thursday
'
;
const
stageId
=
'
thursday
'
;
const
valueStreamId
=
'
a-city-by-the-light-divided
'
;
const
valueStreamId
=
'
a-city-by-the-light-divided
'
;
const
dummy
Cycle
AnalyticsUrlRoot
=
`
${
dummyUrlRoot
}
/groups/
${
groupId
}
/-/analytics/value_stream_analytics`
;
const
dummy
ValueStream
AnalyticsUrlRoot
=
`
${
dummyUrlRoot
}
/groups/
${
groupId
}
/-/analytics/value_stream_analytics`
;
const
defaultParams
=
{
const
defaultParams
=
{
created_after
:
createdAfter
,
created_after
:
createdAfter
,
created_before
:
createdBefore
,
created_before
:
createdBefore
,
};
};
const
valueStreamBaseUrl
=
({
resource
=
''
,
id
=
null
})
=>
const
valueStreamBaseUrl
=
({
resource
=
''
,
id
=
null
})
=>
[
dummyCycleAnalyticsUrlRoot
,
id
?
`value_streams/
${
id
}
/
${
resource
}
`
:
resource
].
join
(
'
/
'
);
[
dummyValueStreamAnalyticsUrlRoot
,
id
?
`value_streams/
${
id
}
/
${
resource
}
`
:
resource
].
join
(
'
/
'
,
);
const
expectRequestWithCorrectParameters
=
(
responseObj
,
{
params
,
expectedUrl
,
response
})
=>
{
const
expectRequestWithCorrectParameters
=
(
responseObj
,
{
params
,
expectedUrl
,
response
})
=>
{
const
{
const
{
...
@@ -247,7 +249,7 @@ describe('Api', () => {
...
@@ -247,7 +249,7 @@ describe('Api', () => {
const
params
=
{
const
params
=
{
...
defaultParams
,
...
defaultParams
,
project_ids
:
null
,
project_ids
:
null
,
subject
:
cycle
AnalyticsConstants
.
TASKS_BY_TYPE_SUBJECT_ISSUE
,
subject
:
valueStream
AnalyticsConstants
.
TASKS_BY_TYPE_SUBJECT_ISSUE
,
label_ids
:
labelIds
,
label_ids
:
labelIds
,
};
};
const
expectedUrl
=
analyticsMockData
.
endpoints
.
tasksByTypeData
;
const
expectedUrl
=
analyticsMockData
.
endpoints
.
tasksByTypeData
;
...
@@ -270,7 +272,7 @@ describe('Api', () => {
...
@@ -270,7 +272,7 @@ describe('Api', () => {
const
params
=
{
const
params
=
{
...
defaultParams
,
...
defaultParams
,
project_ids
:
null
,
project_ids
:
null
,
subject
:
cycle
AnalyticsConstants
.
TASKS_BY_TYPE_SUBJECT_ISSUE
,
subject
:
valueStream
AnalyticsConstants
.
TASKS_BY_TYPE_SUBJECT_ISSUE
,
label_ids
:
labelIds
,
label_ids
:
labelIds
,
};
};
...
@@ -292,7 +294,7 @@ describe('Api', () => {
...
@@ -292,7 +294,7 @@ describe('Api', () => {
it
(
'
fetches value stream analytics summary data
'
,
done
=>
{
it
(
'
fetches value stream analytics summary data
'
,
done
=>
{
const
response
=
[{
value
:
0
,
title
:
'
New Issues
'
},
{
value
:
0
,
title
:
'
Deploys
'
}];
const
response
=
[{
value
:
0
,
title
:
'
New Issues
'
},
{
value
:
0
,
title
:
'
Deploys
'
}];
const
params
=
{
...
defaultParams
};
const
params
=
{
...
defaultParams
};
const
expectedUrl
=
`
${
dummy
Cycle
AnalyticsUrlRoot
}
/summary`
;
const
expectedUrl
=
`
${
dummy
ValueStream
AnalyticsUrlRoot
}
/summary`
;
mock
.
onGet
(
expectedUrl
).
reply
(
httpStatus
.
OK
,
response
);
mock
.
onGet
(
expectedUrl
).
reply
(
httpStatus
.
OK
,
response
);
Api
.
cycleAnalyticsSummaryData
(
groupId
,
params
)
Api
.
cycleAnalyticsSummaryData
(
groupId
,
params
)
...
@@ -316,7 +318,7 @@ describe('Api', () => {
...
@@ -316,7 +318,7 @@ describe('Api', () => {
];
];
const
params
=
{
...
defaultParams
};
const
params
=
{
...
defaultParams
};
const
expectedUrl
=
`
${
dummy
Cycle
AnalyticsUrlRoot
}
/time_summary`
;
const
expectedUrl
=
`
${
dummy
ValueStream
AnalyticsUrlRoot
}
/time_summary`
;
mock
.
onGet
(
expectedUrl
).
reply
(
httpStatus
.
OK
,
response
);
mock
.
onGet
(
expectedUrl
).
reply
(
httpStatus
.
OK
,
response
);
Api
.
cycleAnalyticsTimeSummaryData
(
groupId
,
params
)
Api
.
cycleAnalyticsTimeSummaryData
(
groupId
,
params
)
...
...
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