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
cbd28cd2
Unverified
Commit
cbd28cd2
authored
Nov 11, 2020
by
Torkel Ödegaard
Committed by
GitHub
Nov 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Annotations: Fixes error when trying to create annotation when dashboard is unsaved (#29013)
parent
28383bcf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
public/app/features/annotations/event_editor.ts
+3
-1
public/app/plugins/panel/graph/graph.ts
+7
-1
No files found.
public/app/features/annotations/event_editor.ts
View file @
cbd28cd2
...
@@ -14,7 +14,9 @@ export class EventEditorCtrl {
...
@@ -14,7 +14,9 @@ export class EventEditorCtrl {
timeFormated
:
string
;
timeFormated
:
string
;
/** @ngInject */
/** @ngInject */
constructor
(
private
annotationsSrv
:
AnnotationsSrv
)
{
constructor
(
private
annotationsSrv
:
AnnotationsSrv
)
{}
$onInit
()
{
this
.
event
.
panelId
=
this
.
panelCtrl
.
panel
.
id
;
this
.
event
.
panelId
=
this
.
panelCtrl
.
panel
.
id
;
this
.
event
.
dashboardId
=
this
.
panelCtrl
.
dashboard
.
id
;
this
.
event
.
dashboardId
=
this
.
panelCtrl
.
dashboard
.
id
;
...
...
public/app/plugins/panel/graph/graph.ts
View file @
cbd28cd2
...
@@ -243,11 +243,17 @@ class GraphElement {
...
@@ -243,11 +243,17 @@ class GraphElement {
return
;
return
;
}
}
if
(
(
pos
.
ctrlKey
||
pos
.
metaKey
)
&&
(
this
.
dashboard
.
meta
.
canEdit
||
this
.
dashboard
.
meta
.
canMakeEditable
)
)
{
if
(
pos
.
ctrlKey
||
pos
.
metaKey
)
{
// Skip if range selected (added in "plotselected" event handler)
// Skip if range selected (added in "plotselected" event handler)
if
(
pos
.
x
!==
pos
.
x1
)
{
if
(
pos
.
x
!==
pos
.
x1
)
{
return
;
return
;
}
}
// skip if dashboard is not saved yet (exists in db) or user cannot edit
if
(
!
this
.
dashboard
.
id
||
(
!
this
.
dashboard
.
meta
.
canEdit
&&
!
this
.
dashboard
.
meta
.
canMakeEditable
))
{
return
;
}
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
eventManager
.
updateTime
({
from
:
pos
.
x
,
to
:
null
});
this
.
eventManager
.
updateTime
({
from
:
pos
.
x
,
to
:
null
});
},
100
);
},
100
);
...
...
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