Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
d654255d
Unverified
Commit
d654255d
authored
Apr 25, 2020
by
Dominik Prokop
Committed by
GitHub
Apr 25, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NewPanelEditor: adjust panel menu items (#23888)
parent
ff4d199c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
15 deletions
+19
-15
public/app/features/dashboard/utils/getPanelMenu.ts
+19
-15
No files found.
public/app/features/dashboard/utils/getPanelMenu.ts
View file @
d654255d
...
@@ -84,14 +84,16 @@ export function getPanelMenu(
...
@@ -84,14 +84,16 @@ export function getPanelMenu(
const
menu
:
PanelMenuItem
[]
=
[];
const
menu
:
PanelMenuItem
[]
=
[];
menu
.
push
({
if
(
!
panel
.
isEditing
)
{
text
:
'View'
,
menu
.
push
({
iconClassName
:
'eye'
,
text
:
'View'
,
onClick
:
onViewPanel
,
iconClassName
:
'eye'
,
shortcut
:
'v'
,
onClick
:
onViewPanel
,
});
shortcut
:
'v'
,
});
}
if
(
dashboard
.
canEditPanel
(
panel
))
{
if
(
dashboard
.
canEditPanel
(
panel
)
&&
!
panel
.
isEditing
)
{
menu
.
push
({
menu
.
push
({
text
:
'Edit'
,
text
:
'Edit'
,
iconClassName
:
'edit'
,
iconClassName
:
'edit'
,
...
@@ -185,15 +187,17 @@ export function getPanelMenu(
...
@@ -185,15 +187,17 @@ export function getPanelMenu(
}
}
}
}
menu
.
push
({
if
(
!
panel
.
isEditing
)
{
type
:
'submenu'
,
menu
.
push
({
text
:
'More...'
,
type
:
'submenu'
,
iconClassName
:
'cube'
,
text
:
'More...'
,
subMenu
:
subMenu
,
iconClassName
:
'cube'
,
onClick
:
onMore
,
subMenu
:
subMenu
,
});
onClick
:
onMore
,
});
}
if
(
dashboard
.
canEditPanel
(
panel
))
{
if
(
dashboard
.
canEditPanel
(
panel
)
&&
!
panel
.
isEditing
)
{
menu
.
push
({
type
:
'divider'
});
menu
.
push
({
type
:
'divider'
});
menu
.
push
({
menu
.
push
({
...
...
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