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
3f4990b2
Commit
3f4990b2
authored
Dec 03, 2019
by
Miguel Rincon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove panel via vuex in dashboard
parent
4bdf016e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
10 deletions
+5
-10
app/assets/javascripts/monitoring/components/dashboard.vue
app/assets/javascripts/monitoring/components/dashboard.vue
+5
-10
No files found.
app/assets/javascripts/monitoring/components/dashboard.vue
View file @
3f4990b2
...
...
@@ -252,23 +252,18 @@ export default {
'
setEndpoints
'
,
'
setPanelGroupMetrics
'
,
]),
update
Metric
s
(
key
,
panels
)
{
update
Panel
s
(
key
,
panels
)
{
this
.
setPanelGroupMetrics
({
panels
,
key
,
});
},
remove
Metric
(
key
,
metric
s
,
graphIndex
)
{
remove
Panel
(
key
,
panel
s
,
graphIndex
)
{
this
.
setPanelGroupMetrics
({
metrics
:
metric
s
.
filter
((
v
,
i
)
=>
i
!==
graphIndex
),
panels
:
panel
s
.
filter
((
v
,
i
)
=>
i
!==
graphIndex
),
key
,
});
},
removeGraph
(
metrics
,
graphIndex
)
{
// At present graphs will not be removed, they should removed using the vuex store
// See https://gitlab.com/gitlab-org/gitlab/issues/27835
metrics
.
splice
(
graphIndex
,
1
);
},
showInvalidDateError
()
{
createFlash
(
s__
(
'
Metrics|Link contains an invalid time window.
'
));
},
...
...
@@ -463,7 +458,7 @@ export default {
group=
"metrics-dashboard"
:component-data=
"{ attrs: { class: 'row mx-0 w-100' } }"
:disabled=
"!isRearrangingPanels"
@
input=
"update
Metric
s(groupData.key, $event)"
@
input=
"update
Panel
s(groupData.key, $event)"
>
<div
v-for=
"(graphData, graphIndex) in groupData.panels"
...
...
@@ -475,7 +470,7 @@ export default {
<div
v-if=
"isRearrangingPanels"
class=
"draggable-remove js-draggable-remove p-2 w-100 position-absolute d-flex justify-content-end"
@
click=
"remove
Graph(
groupData.panels, graphIndex)"
@
click=
"remove
Panel(groupData.key,
groupData.panels, graphIndex)"
>
<a
class=
"mx-2 p-2 draggable-remove-link"
:aria-label=
"__('Remove')"
><icon
name=
"close"
...
...
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