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
8bdc47b5
Commit
8bdc47b5
authored
Jun 02, 2021
by
Nathan Friend
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restructure error handling in lead time charts
parent
e35b4ce3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
13 deletions
+10
-13
ee/app/assets/javascripts/dora/components/lead_time_charts.vue
...p/assets/javascripts/dora/components/lead_time_charts.vue
+10
-13
No files found.
ee/app/assets/javascripts/dora/components/lead_time_charts.vue
View file @
8bdc47b5
...
@@ -55,28 +55,25 @@ export default {
...
@@ -55,28 +55,25 @@ export default {
async
mounted
()
{
async
mounted
()
{
const
results
=
await
Promise
.
allSettled
(
const
results
=
await
Promise
.
allSettled
(
allChartDefinitions
.
map
(
async
({
id
,
requestParams
,
startDate
,
endDate
})
=>
{
allChartDefinitions
.
map
(
async
({
id
,
requestParams
,
startDate
,
endDate
})
=>
{
let
apiData
;
if
(
this
.
projectPath
&&
this
.
groupPath
)
{
if
(
this
.
projectPath
&&
this
.
groupPath
)
{
throw
new
Error
(
'
Both projectPath and groupPath were provided
'
);
throw
new
Error
(
'
Both projectPath and groupPath were provided
'
);
}
else
if
(
this
.
projectPath
)
{
}
apiData
=
(
await
DoraApi
.
getProjectDoraMetrics
(
if
(
!
this
.
projectPath
&&
!
this
.
groupPath
)
{
throw
new
Error
(
'
Either projectPath or groupPath must be provided
'
);
}
const
{
data
:
apiData
}
=
this
.
projectPath
?
await
DoraApi
.
getProjectDoraMetrics
(
this
.
projectPath
,
this
.
projectPath
,
DoraApi
.
LEAD_TIME_FOR_CHANGES
,
DoraApi
.
LEAD_TIME_FOR_CHANGES
,
requestParams
,
requestParams
,
)
)
).
data
;
:
await
DoraApi
.
getGroupDoraMetrics
(
}
else
if
(
this
.
groupPath
)
{
apiData
=
(
await
DoraApi
.
getGroupDoraMetrics
(
this
.
groupPath
,
this
.
groupPath
,
DoraApi
.
LEAD_TIME_FOR_CHANGES
,
DoraApi
.
LEAD_TIME_FOR_CHANGES
,
requestParams
,
requestParams
,
)
);
).
data
;
}
else
{
throw
new
Error
(
'
Either projectPath or groupPath must be provided
'
);
}
this
.
chartData
[
id
]
=
buildNullSeriesForLeadTimeChart
(
this
.
chartData
[
id
]
=
buildNullSeriesForLeadTimeChart
(
apiDataToChartSeries
(
apiData
,
startDate
,
endDate
,
CHART_TITLE
,
null
),
apiDataToChartSeries
(
apiData
,
startDate
,
endDate
,
CHART_TITLE
,
null
),
...
...
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