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
9fc42a55
Commit
9fc42a55
authored
Aug 11, 2020
by
Martin Wortschack
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace bs-callout with GlAlert component
parent
a3083700
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
9 deletions
+20
-9
changelogs/unreleased/235471-follow-up-from-improve-productivity-analytics-error-when-query-tak.yml
...m-improve-productivity-analytics-error-when-query-tak.yml
+5
-0
ee/app/assets/javascripts/analytics/productivity_analytics/components/metric_chart.vue
...lytics/productivity_analytics/components/metric_chart.vue
+4
-3
ee/spec/frontend/analytics/productivity_analytics/components/__snapshots__/metric_chart_spec.js.snap
...lytics/components/__snapshots__/metric_chart_spec.js.snap
+9
-4
ee/spec/frontend/analytics/productivity_analytics/components/metric_chart_spec.js
...cs/productivity_analytics/components/metric_chart_spec.js
+2
-2
No files found.
changelogs/unreleased/235471-follow-up-from-improve-productivity-analytics-error-when-query-tak.yml
0 → 100644
View file @
9fc42a55
---
title
:
'
Productivity
Analytics:
Replace
bs-callout
with
GlAlert
component'
merge_request
:
39207
author
:
type
:
changed
ee/app/assets/javascripts/analytics/productivity_analytics/components/metric_chart.vue
View file @
9fc42a55
<
script
>
import
{
isEmpty
}
from
'
lodash
'
;
import
{
GlDeprecatedDropdown
,
GlDeprecatedDropdownItem
,
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
{
GlDeprecatedDropdown
,
GlDeprecatedDropdownItem
,
GlLoadingIcon
,
GlAlert
}
from
'
@gitlab/ui
'
;
import
{
s__
}
from
'
~/locale
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
import
httpStatusCodes
from
'
~/lib/utils/http_status
'
;
...
...
@@ -11,6 +11,7 @@ export default {
GlDeprecatedDropdown
,
GlDeprecatedDropdownItem
,
GlLoadingIcon
,
GlAlert
,
Icon
,
},
props
:
{
...
...
@@ -88,9 +89,9 @@ export default {
<h5
v-if=
"title"
>
{{
title
}}
</h5>
<gl-loading-icon
v-if=
"isLoading"
size=
"md"
class=
"my-4 py-4"
/>
<template
v-else
>
<
div
v-if=
"infoMessage"
data-testid=
"infoMessage"
class=
"bs-callout bs-callout-info
"
>
<
gl-alert
v-if=
"infoMessage"
:dismissible=
"false
"
>
{{
infoMessage
}}
</
div
>
</
gl-alert
>
<template
v-else
>
<gl-deprecated-dropdown
v-if=
"hasMetricTypes"
...
...
ee/spec/frontend/analytics/productivity_analytics/components/__snapshots__/metric_chart_spec.js.snap
View file @
9fc42a55
...
...
@@ -4,14 +4,19 @@ exports[`MetricChart component template when isLoading is false and chart data i
<div>
<!---->
<div
class="bs-callout bs-callout-info"
data-testid="infoMessage"
<gl-alert-stub
dismisslabel="Dismiss"
primarybuttonlink=""
primarybuttontext=""
secondarybuttonlink=""
secondarybuttontext=""
title=""
variant="info"
>
There is no data available. Please change your selection.
</
div
>
</
gl-alert-stub
>
</div>
`;
...
...
ee/spec/frontend/analytics/productivity_analytics/components/metric_chart_spec.js
View file @
9fc42a55
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
MetricChart
from
'
ee/analytics/productivity_analytics/components/metric_chart.vue
'
;
import
{
GlLoadingIcon
,
GlDeprecatedDropdown
,
GlDeprecatedDropdownItem
}
from
'
@gitlab/ui
'
;
import
{
GlLoadingIcon
,
GlDeprecatedDropdown
,
GlDeprecatedDropdownItem
,
GlAlert
}
from
'
@gitlab/ui
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
import
httpStatusCodes
from
'
~/lib/utils/http_status
'
;
...
...
@@ -38,7 +38,7 @@ describe('MetricChart component', () => {
});
const
findLoadingIndicator
=
()
=>
wrapper
.
find
(
GlLoadingIcon
);
const
findInfoMessage
=
()
=>
wrapper
.
find
(
'
[data-testid="infoMessage"]
'
);
const
findInfoMessage
=
()
=>
wrapper
.
find
(
GlAlert
);
const
findMetricDropdown
=
()
=>
wrapper
.
find
(
GlDeprecatedDropdown
);
const
findMetricDropdownItems
=
()
=>
findMetricDropdown
().
findAll
(
GlDeprecatedDropdownItem
);
const
findChartSlot
=
()
=>
wrapper
.
find
({
ref
:
'
chart
'
});
...
...
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