File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
public/app/plugins/panel/graph Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ ///<reference path="../../../headers/common.d.ts" />
2
+
3
+ import 'jquery.flot' ;
4
+ import $ from 'jquery' ;
5
+
6
+ var options = { } ;
7
+
8
+ function getHandleTemplate ( type ) {
9
+ return `
10
+ <div class="alert-handle" style="position: absolute; top: 100px; right: -50px;">
11
+ <i class="icon-gf icon-gf-${ type } alert-icon-${ type } "></i>
12
+ > 100
13
+ </div>
14
+ ` ;
15
+ }
16
+
17
+ function drawAlertHandles ( plot , canvascontext ) {
18
+ var $warnHandle = $ ( getHandleTemplate ( 'warn' ) ) ;
19
+
20
+ var $placeholder = plot . getPlaceholder ( ) ;
21
+ $placeholder . find ( ".alert-warn-handle" ) . remove ( ) ;
22
+ $placeholder . append ( $warnHandle ) ;
23
+ }
24
+
25
+ function shutdown ( ) {
26
+ }
27
+
28
+ function init ( plot , classes ) {
29
+ plot . hooks . draw . push ( drawAlertHandles ) ;
30
+ plot . hooks . shutdown . push ( shutdown ) ;
31
+ }
32
+
33
+ $ . plot . plugins . push ( {
34
+ init : init ,
35
+ options : options ,
36
+ name : 'navigationControl' ,
37
+ version : '1.4'
38
+ } ) ;
39
+
You can’t perform that action at this time.
0 commit comments