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
a579bba2
Commit
a579bba2
authored
Aug 06, 2019
by
Simon Knox
Committed by
Kushal Pandya
Aug 06, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add actions dropdown to metrics charts
Added as EE backport
parent
d1ea2aba
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
79 additions
and
19 deletions
+79
-19
app/assets/javascripts/monitoring/components/dashboard.vue
app/assets/javascripts/monitoring/components/dashboard.vue
+40
-11
app/assets/javascripts/monitoring/components/panel_type.vue
app/assets/javascripts/monitoring/components/panel_type.vue
+33
-8
locale/gitlab.pot
locale/gitlab.pot
+6
-0
No files found.
app/assets/javascripts/monitoring/components/dashboard.vue
View file @
a579bba2
<
script
>
<
script
>
import
{
GlButton
,
GlDropdown
,
GlDropdownItem
,
GlModal
,
GlModalDirective
}
from
'
@gitlab/ui
'
;
import
{
GlButton
,
GlDropdown
,
GlDropdownItem
,
GlModal
,
GlModalDirective
,
GlTooltipDirective
,
}
from
'
@gitlab/ui
'
;
import
_
from
'
underscore
'
;
import
_
from
'
underscore
'
;
import
{
mapActions
,
mapState
}
from
'
vuex
'
;
import
{
mapActions
,
mapState
}
from
'
vuex
'
;
import
{
s__
}
from
'
~/locale
'
;
import
{
s__
}
from
'
~/locale
'
;
...
@@ -30,7 +37,8 @@ export default {
...
@@ -30,7 +37,8 @@ export default {
GlModal
,
GlModal
,
},
},
directives
:
{
directives
:
{
GlModalDirective
,
GlModal
:
GlModalDirective
,
GlTooltip
:
GlTooltipDirective
,
},
},
props
:
{
props
:
{
externalDashboardUrl
:
{
externalDashboardUrl
:
{
...
@@ -328,7 +336,7 @@ export default {
...
@@ -328,7 +336,7 @@ export default {
<div
class=
"d-flex"
>
<div
class=
"d-flex"
>
<div
v-if=
"addingMetricsAvailable"
>
<div
v-if=
"addingMetricsAvailable"
>
<gl-button
<gl-button
v-gl-modal
-directive
=
"$options.addMetric.modalId"
v-gl-modal=
"$options.addMetric.modalId"
class=
"js-add-metric-button text-success border-success"
class=
"js-add-metric-button text-success border-success"
>
{{
$options
.
addMetric
.
title
}}
</gl-button
>
{{
$options
.
addMetric
.
title
}}
</gl-button
>
>
...
@@ -395,14 +403,35 @@ export default {
...
@@ -395,14 +403,35 @@ export default {
:project-path=
"projectPath"
:project-path=
"projectPath"
group-id=
"monitor-area-chart"
group-id=
"monitor-area-chart"
>
>
<div
class=
"d-flex align-items-center"
>
<alert-widget
<alert-widget
v-if=
"alertWidgetAvailable && graphData"
v-if=
"alertWidgetAvailable && graphData"
:modal-id=
"`alert-modal-$
{index}-${graphIndex}`"
:alerts-endpoint="alertsEndpoint"
:alerts-endpoint="alertsEndpoint"
:relevant-queries="graphData.queries"
:relevant-queries="graphData.queries"
:alerts-to-manage="getGraphAlerts(graphData.queries)"
:alerts-to-manage="getGraphAlerts(graphData.queries)"
:modal-id=
"`alert-modal-$
{index}-${graphIndex}`"
@setAlerts="setAlerts"
@setAlerts="setAlerts"
/>
/>
<gl-dropdown
v-if=
"alertWidgetAvailable"
v-gl-tooltip
class=
"mx-2"
toggle-class=
"btn btn-transparent border-0"
:right=
"true"
:no-caret=
"true"
:title=
"__('More actions')"
>
<template
slot=
"button-content"
>
<icon
name=
"ellipsis_v"
class=
"text-secondary"
/>
</
template
>
<gl-dropdown-item
v-if=
"alertWidgetAvailable"
v-gl-modal=
"`alert-modal-${index}-${graphIndex}`"
>
{{ __('Alerts') }}
</gl-dropdown-item>
</gl-dropdown>
</div>
</monitor-area-chart>
</monitor-area-chart>
</template>
</template>
</graph-group>
</graph-group>
...
...
app/assets/javascripts/monitoring/components/panel_type.vue
View file @
a579bba2
<
script
>
<
script
>
import
{
mapState
}
from
'
vuex
'
;
import
{
mapState
}
from
'
vuex
'
;
import
_
from
'
underscore
'
;
import
_
from
'
underscore
'
;
import
{
GlDropdown
,
GlDropdownItem
,
GlModal
,
GlModalDirective
}
from
'
@gitlab/ui
'
;
import
MonitorAreaChart
from
'
./charts/area.vue
'
;
import
MonitorAreaChart
from
'
./charts/area.vue
'
;
import
MonitorSingleStatChart
from
'
./charts/single_stat.vue
'
;
import
MonitorSingleStatChart
from
'
./charts/single_stat.vue
'
;
import
MonitorEmptyChart
from
'
./charts/empty_chart.vue
'
;
import
MonitorEmptyChart
from
'
./charts/empty_chart.vue
'
;
...
@@ -10,6 +11,12 @@ export default {
...
@@ -10,6 +11,12 @@ export default {
MonitorAreaChart
,
MonitorAreaChart
,
MonitorSingleStatChart
,
MonitorSingleStatChart
,
MonitorEmptyChart
,
MonitorEmptyChart
,
GlDropdown
,
GlDropdownItem
,
GlModal
,
},
directives
:
{
GlModal
:
GlModalDirective
,
},
},
props
:
{
props
:
{
graphData
:
{
graphData
:
{
...
@@ -64,14 +71,32 @@ export default {
...
@@ -64,14 +71,32 @@ export default {
:container-width=
"dashboardWidth"
:container-width=
"dashboardWidth"
group-id=
"monitor-area-chart"
group-id=
"monitor-area-chart"
>
>
<div
class=
"d-flex align-items-center"
>
<alert-widget
<alert-widget
v-if=
"alertWidgetAvailable"
v-if=
"alertWidgetAvailable && graphData"
:modal-id=
"`alert-modal-$
{index}`"
:alerts-endpoint="alertsEndpoint"
:alerts-endpoint="alertsEndpoint"
:relevant-queries="graphData.queries"
:relevant-queries="graphData.queries"
:alerts-to-manage="getGraphAlerts(graphData.queries)"
:alerts-to-manage="getGraphAlerts(graphData.queries)"
:modal-id=
"`alert-modal-$
{index}`"
@setAlerts="setAlerts"
@setAlerts="setAlerts"
/>
/>
<gl-dropdown
v-if=
"alertWidgetAvailable"
v-gl-tooltip
class=
"mx-2"
toggle-class=
"btn btn-transparent border-0"
:right=
"true"
:no-caret=
"true"
:title=
"__('More actions')"
>
<template
slot=
"button-content"
>
<icon
name=
"ellipsis_v"
class=
"text-secondary"
/>
</
template
>
<gl-dropdown-item
v-if=
"alertWidgetAvailable"
v-gl-modal=
"`alert-modal-${index}`"
>
{{ __('Alerts') }}
</gl-dropdown-item>
</gl-dropdown>
</div>
</monitor-area-chart>
</monitor-area-chart>
<monitor-empty-chart
v-else
:graph-title=
"graphData.title"
/>
<monitor-empty-chart
v-else
:graph-title=
"graphData.title"
/>
</template>
</template>
locale/gitlab.pot
View file @
a579bba2
...
@@ -900,6 +900,9 @@ msgstr ""
...
@@ -900,6 +900,9 @@ msgstr ""
msgid "After a successful password update, you will be redirected to the login page where you can log in with your new password."
msgid "After a successful password update, you will be redirected to the login page where you can log in with your new password."
msgstr ""
msgstr ""
msgid "Alerts"
msgstr ""
msgid "All"
msgid "All"
msgstr ""
msgstr ""
...
@@ -6868,6 +6871,9 @@ msgstr ""
...
@@ -6868,6 +6871,9 @@ msgstr ""
msgid "More"
msgid "More"
msgstr ""
msgstr ""
msgid "More actions"
msgstr ""
msgid "More information"
msgid "More information"
msgstr ""
msgstr ""
...
...
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