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
9b9aab27
Commit
9b9aab27
authored
Feb 22, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Graphs now update/refresh when you edit annotations, Fixes #1430
parent
31e52719
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
9 deletions
+13
-9
src/app/features/annotations/editorCtrl.js
+3
-0
src/app/features/annotations/partials/editor.html
+2
-1
src/app/features/dashboard/dashboardCtrl.js
+4
-0
src/app/features/dashboard/dashboardSrv.js
+1
-5
src/app/features/dashboard/keybindings.js
+2
-2
src/app/features/dashboard/viewStateSrv.js
+1
-1
No files found.
src/app/features/annotations/editorCtrl.js
View file @
9b9aab27
...
...
@@ -58,6 +58,7 @@ function (angular, _, $) {
$scope
.
update
=
function
()
{
$scope
.
reset
();
$scope
.
editor
.
index
=
0
;
$scope
.
broadcastRefresh
();
};
$scope
.
add
=
function
()
{
...
...
@@ -65,12 +66,14 @@ function (angular, _, $) {
$scope
.
reset
();
$scope
.
editor
.
index
=
0
;
$scope
.
updateSubmenuVisibility
();
$scope
.
broadcastRefresh
();
};
$scope
.
removeAnnotation
=
function
(
annotation
)
{
var
index
=
_
.
indexOf
(
$scope
.
annotations
,
annotation
);
$scope
.
annotations
.
splice
(
index
,
1
);
$scope
.
updateSubmenuVisibility
();
$scope
.
broadcastRefresh
();
};
});
...
...
src/app/features/annotations/partials/editor.html
View file @
9b9aab27
...
...
@@ -10,7 +10,8 @@
<div
ng-repeat=
"tab in ['Overview', 'Add', 'Edit']"
data-title=
"{{tab}}"
>
</div>
</div>
<button
class=
"gf-box-header-close-btn"
ng-click=
"dismiss();dashboard.refresh();"
>
<button
class=
"gf-box-header-close-btn"
ng-click=
"dismiss();"
>
<i
class=
"fa fa-remove"
></i>
</button>
</div>
...
...
src/app/features/dashboard/dashboardCtrl.js
View file @
9b9aab27
...
...
@@ -72,6 +72,10 @@ function (angular, $, config) {
$scope
.
contextSrv
.
lightTheme
=
$scope
.
dashboard
.
style
===
'light'
;
};
$scope
.
broadcastRefresh
=
function
()
{
$rootScope
.
$broadcast
(
'refresh'
);
};
$scope
.
add_row
=
function
(
dash
,
row
)
{
dash
.
rows
.
push
(
row
);
};
...
...
src/app/features/dashboard/dashboardSrv.js
View file @
9b9aab27
...
...
@@ -10,7 +10,7 @@ function (angular, $, kbn, _, moment) {
var
module
=
angular
.
module
(
'grafana.services'
);
module
.
factory
(
'dashboardSrv'
,
function
(
$rootScope
)
{
module
.
factory
(
'dashboardSrv'
,
function
()
{
function
DashboardModel
(
data
)
{
...
...
@@ -132,10 +132,6 @@ function (angular, $, kbn, _, moment) {
moment
.
utc
(
date
).
format
(
format
);
};
p
.
emit_refresh
=
function
()
{
$rootScope
.
$broadcast
(
'refresh'
);
};
p
.
_updateSchema
=
function
(
old
)
{
var
i
,
j
,
k
;
var
oldVersion
=
this
.
version
;
...
...
src/app/features/dashboard/keybindings.js
View file @
9b9aab27
...
...
@@ -40,7 +40,7 @@ function(angular, $) {
keyboardManager
.
bind
(
'ctrl+o'
,
function
()
{
var
current
=
scope
.
dashboard
.
sharedCrosshair
;
scope
.
dashboard
.
sharedCrosshair
=
!
current
;
scope
.
dashboard
.
emit_refresh
(
'refresh'
);
scope
.
broadcastRefresh
(
);
},
{
inputDisabled
:
true
});
keyboardManager
.
bind
(
'ctrl+l'
,
function
()
{
...
...
@@ -57,7 +57,7 @@ function(angular, $) {
},
{
inputDisabled
:
true
});
keyboardManager
.
bind
(
'ctrl+r'
,
function
()
{
scope
.
dashboard
.
emit_r
efresh
();
scope
.
broadcastR
efresh
();
},
{
inputDisabled
:
true
});
keyboardManager
.
bind
(
'ctrl+z'
,
function
(
evt
)
{
...
...
src/app/features/dashboard/viewStateSrv.js
View file @
9b9aab27
...
...
@@ -115,7 +115,7 @@ function (angular, _, $) {
$timeout
(
function
()
{
if
(
self
.
oldTimeRange
!==
self
.
fullscreenPanel
.
range
)
{
self
.
$scope
.
dashboard
.
emit_r
efresh
();
self
.
$scope
.
broadcastR
efresh
();
}
else
{
self
.
fullscreenPanel
.
$broadcast
(
'render'
);
...
...
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