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
406885a2
Commit
406885a2
authored
Feb 11, 2020
by
Brandon Labuschagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wrap chart in ResizableChartContainer
parent
d495c43d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
8 deletions
+22
-8
app/assets/javascripts/projects/pipelines/charts/components/pipelines_area_chart.vue
...ects/pipelines/charts/components/pipelines_area_chart.vue
+9
-5
locale/gitlab.pot
locale/gitlab.pot
+6
-0
spec/frontend/projects/pipelines/charts/components/__snapshots__/pipelines_area_chart_spec.js.snap
...omponents/__snapshots__/pipelines_area_chart_spec.js.snap
+2
-1
spec/frontend/projects/pipelines/charts/components/pipelines_area_chart_spec.js
.../pipelines/charts/components/pipelines_area_chart_spec.js
+5
-2
No files found.
app/assets/javascripts/projects/pipelines/charts/components/pipelines_area_chart.vue
View file @
406885a2
<
script
>
import
{
GlAreaChart
}
from
'
@gitlab/ui/dist/charts
'
;
import
{
__
}
from
'
~/locale
'
;
import
{
s__
}
from
'
~/locale
'
;
import
ResizableChartContainer
from
'
~/vue_shared/components/resizable_chart/resizable_chart_container.vue
'
;
import
{
CHART_CONTAINER_HEIGHT
}
from
'
../constants
'
;
export
default
{
components
:
{
GlAreaChart
,
ResizableChartContainer
,
},
props
:
{
chartData
:
{
...
...
@@ -15,11 +17,11 @@ export default {
},
areaChartOptions
:
{
xAxis
:
{
name
:
__
(
'
Date
'
),
name
:
s__
(
'
Pipeline|
Date
'
),
type
:
'
category
'
,
},
yAxis
:
{
name
:
__
(
'
Pipelines
'
),
name
:
s__
(
'
Pipeline|
Pipelines
'
),
},
},
chartContainerHeight
:
CHART_CONTAINER_HEIGHT
,
...
...
@@ -30,13 +32,15 @@ export default {
<p>
<slot></slot>
</p>
<
div
>
<
resizable-chart-container
>
<gl-area-chart
slot-scope=
"
{ width }"
:width="width"
:height="$options.chartContainerHeight"
:data="chartData"
:include-legend-avg-max="false"
:option="$options.areaChartOptions"
/>
</
div
>
</
resizable-chart-container
>
</div>
</
template
>
locale/gitlab.pot
View file @
406885a2
...
...
@@ -13741,6 +13741,9 @@ msgstr ""
msgid "Pipeline|Coverage"
msgstr ""
msgid "Pipeline|Date"
msgstr ""
msgid "Pipeline|Detached merge request pipeline"
msgstr ""
...
...
@@ -13762,6 +13765,9 @@ msgstr ""
msgid "Pipeline|Pipeline"
msgstr ""
msgid "Pipeline|Pipelines"
msgstr ""
msgid "Pipeline|Run Pipeline"
msgstr ""
...
...
spec/frontend/projects/pipelines/charts/components/__snapshots__/pipelines_area_chart_spec.js.snap
View file @
406885a2
...
...
@@ -9,13 +9,14 @@ exports[`PipelinesAreaChart matches the snapshot 1`] = `
</p>
<div>
<gl
-area-
chart-stub
<gl
area
chart-stub
data="[object Object],[object Object]"
height="300"
legendaveragetext="Avg"
legendmaxtext="Max"
option="[object Object]"
thresholds=""
width="0"
/>
</div>
</div>
...
...
spec/frontend/projects/pipelines/charts/components/pipelines_area_chart_spec.js
View file @
406885a2
import
{
shallowM
ount
}
from
'
@vue/test-utils
'
;
import
{
m
ount
}
from
'
@vue/test-utils
'
;
import
Component
from
'
~/projects/pipelines/charts/components/pipelines_area_chart.vue
'
;
import
{
transformedAreaChartData
}
from
'
../mock_data
'
;
...
...
@@ -6,13 +6,16 @@ describe('PipelinesAreaChart', () => {
let
wrapper
;
beforeEach
(()
=>
{
wrapper
=
shallowM
ount
(
Component
,
{
wrapper
=
m
ount
(
Component
,
{
propsData
:
{
chartData
:
transformedAreaChartData
,
},
slots
:
{
default
:
'
Some title
'
,
},
stubs
:
{
GlAreaChart
:
true
,
},
});
});
...
...
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