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
0dfe7d74
Commit
0dfe7d74
authored
Aug 10, 2021
by
NataliaTepluhina
Committed by
Natalia Tepluhina
Aug 10, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added cloneDeep to prevent mutating cache
Changelog: changed
parent
9ea25a71
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
ee/app/assets/javascripts/burndown_chart/components/burn_charts.vue
...ets/javascripts/burndown_chart/components/burn_charts.vue
+4
-1
ee/app/assets/javascripts/burndown_chart/index.js
ee/app/assets/javascripts/burndown_chart/index.js
+1
-1
No files found.
ee/app/assets/javascripts/burndown_chart/components/burn_charts.vue
View file @
0dfe7d74
<
script
>
import
{
GlAlert
,
GlButton
,
GlButtonGroup
}
from
'
@gitlab/ui
'
;
import
dateFormat
from
'
dateformat
'
;
import
{
cloneDeep
}
from
'
lodash
'
;
import
BurnupQuery
from
'
shared_queries/burndown_chart/burnup.query.graphql
'
;
import
createFlash
from
'
~/flash
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
...
...
@@ -200,10 +201,12 @@ export default {
setIssueSelected
(
selected
)
{
this
.
issuesSelected
=
selected
;
},
padSparseBurnupData
(
sparseBurnupD
ata
)
{
padSparseBurnupData
(
d
ata
)
{
// if we don't have data for the startDate, we still want to draw a point at 0
// on the chart, so add an item to the start of the array
const
sparseBurnupData
=
cloneDeep
(
data
);
const
hasDataForStartDate
=
sparseBurnupData
.
find
((
d
)
=>
d
.
date
===
this
.
startDate
);
if
(
!
hasDataForStartDate
)
{
sparseBurnupData
.
unshift
({
date
:
this
.
startDate
,
...
...
ee/app/assets/javascripts/burndown_chart/index.js
View file @
0dfe7d74
...
...
@@ -9,7 +9,7 @@ import BurnCharts from './components/burn_charts.vue';
Vue
.
use
(
VueApollo
);
const
apolloProvider
=
new
VueApollo
({
defaultClient
:
createDefaultClient
(),
defaultClient
:
createDefaultClient
(
{},
{
assumeImmutableResults
:
true
}
),
});
export
default
()
=>
{
...
...
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