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
75d3a2b6
Commit
75d3a2b6
authored
Jun 15, 2020
by
Michael Lunøe
Committed by
Phil Hughes
Jun 15, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Feat(analytics/insights): load charts individually
parent
0d9f0596
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
10 deletions
+29
-10
ee/app/assets/javascripts/insights/components/insights_chart.vue
...assets/javascripts/insights/components/insights_chart.vue
+7
-4
ee/app/assets/javascripts/insights/components/insights_page.vue
.../assets/javascripts/insights/components/insights_page.vue
+2
-2
ee/changelogs/unreleased/219742-load-each-chart-separately-on-insights-page.yml
...ed/219742-load-each-chart-separately-on-insights-page.yml
+6
-0
ee/spec/frontend/insights/components/insights_page_spec.js
ee/spec/frontend/insights/components/insights_page_spec.js
+14
-4
No files found.
ee/app/assets/javascripts/insights/components/insights_chart.vue
View file @
75d3a2b6
...
...
@@ -20,11 +20,13 @@ export default {
props
:
{
loaded
:
{
type
:
Boolean
,
required
:
true
,
required
:
false
,
default
:
false
,
},
type
:
{
type
:
String
,
required
:
true
,
required
:
false
,
default
:
null
,
},
title
:
{
type
:
String
,
...
...
@@ -38,7 +40,8 @@ export default {
},
data
:
{
type
:
Object
,
required
:
true
,
required
:
false
,
default
:
null
,
},
error
:
{
type
:
String
,
...
...
@@ -150,7 +153,7 @@ export default {
@
created=
"onChartCreated"
/>
</resizable-chart-container>
<div
v-else
class=
"insights-chart"
>
<div
v-else
-if=
"error"
class=
"insights-chart"
>
<insights-chart-error
:chart-name=
"title"
:title=
"__('This chart could not be displayed')"
...
...
ee/app/assets/javascripts/insights/components/insights_page.vue
View file @
75d3a2b6
...
...
@@ -74,7 +74,7 @@ export default {
<div
class=
"insights-page"
data-qa-selector=
"insights_page"
>
<div
v-if=
"hasChartsConfigured"
class=
"js-insights-page-container"
>
<h4
class=
"text-center"
>
{{
pageConfig
.
title
}}
</h4>
<div
v-if=
"!pageLoading"
class=
"insights-charts"
data-qa-selector=
"insights_charts"
>
<div
class=
"insights-charts"
data-qa-selector=
"insights_charts"
>
<insights-chart
v-for=
"(
{ loaded, type, description, data, error }, key, index) in chartData"
:key="index"
...
...
@@ -86,7 +86,7 @@ export default {
:error="error"
/>
</div>
<div
v-
else
class=
"insights-chart-loading text-center
"
>
<div
v-
if=
"pageLoading"
class=
"insights-chart-loading text-center p-5
"
>
<gl-loading-icon
:inline=
"true"
size=
"lg"
/>
</div>
</div>
...
...
ee/changelogs/unreleased/219742-load-each-chart-separately-on-insights-page.yml
0 → 100644
View file @
75d3a2b6
---
title
:
'
Analytics
Insights
page:
Load
charts
individually,
instead
of
waiting
for
all
data
to
load
before
displaying
the
page'
merge_request
:
34290
author
:
type
:
changed
ee/spec/frontend/insights/components/insights_page_spec.js
View file @
75d3a2b6
...
...
@@ -65,11 +65,21 @@ describe('Insights page component', () => {
});
});
it
(
'
does
not
display chart area
'
,
()
=>
{
it
(
'
does display chart area
'
,
()
=>
{
return
component
.
$nextTick
(()
=>
{
expect
(
component
.
$el
.
querySelector
(
'
.js-insights-page-container .insights-charts
'
)).
toBe
(
null
,
);
expect
(
component
.
$el
.
querySelector
(
'
.js-insights-page-container .insights-charts
'
),
).
not
.
toBe
(
null
);
});
});
it
(
'
does not display chart
'
,
()
=>
{
return
component
.
$nextTick
(()
=>
{
expect
(
component
.
$el
.
querySelector
(
'
.js-insights-page-container .insights-charts .insights-chart
'
,
),
).
toBe
(
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