2014-07-16 18:47:20 +02:00
< div ng-controller = "AnnotationsEditorCtrl" ng-init = "init()" >
2014-02-18 20:41:56 +01:00
2015-01-31 18:00:26 +01:00
< div class = "gf-box-header" >
2015-02-01 15:45:11 +01:00
< div class = "gf-box-title" >
< i class = "fa fa-bolt" > < / i >
Annotations
< / div >
2015-09-08 16:59:39 +02:00
< div class = "tabs" >
< ul class = "nav nav-tabs" >
< li ng-class = "{active: mode === 'list'}" >
< a ng-click = "mode = 'list';" >
List
< / a >
< / li >
< li ng-class = "{active: mode === 'edit'}" ng-show = "mode === 'edit'" >
< a >
{{currentAnnotation.name}}
< / a >
< / li >
< li ng-class = "{active: mode === 'new'}" >
< a ng-click = "mode = 'new';" >
< i class = "fa fa-plus" > < / i >
New
< / a >
< / li >
< / ul >
2014-08-26 09:32:30 +02:00
< / div >
2015-02-22 08:09:58 +01:00
< button class = "gf-box-header-close-btn" ng-click = "dismiss();" >
2015-01-31 18:00:26 +01:00
< i class = "fa fa-remove" > < / i >
< / button >
2014-08-26 09:32:30 +02:00
< / div >
2015-01-31 18:00:26 +01:00
< div class = "gf-box-body" >
2015-09-08 16:59:39 +02:00
< div class = "editor-row row" ng-if = "mode === 'list'" >
2014-08-28 16:44:16 +02:00
< div class = "span6" >
2014-12-16 15:47:10 +01:00
< div ng-if = "annotations.length === 0" >
2014-09-09 08:50:01 +02:00
< em > No annotations defined< / em >
< / div >
2014-08-28 16:44:16 +02:00
< table class = "grafana-options-table" >
< tr ng-repeat = "annotation in annotations" >
< td style = "width:90%" >
2016-01-09 18:20:43 +01:00
< i class = "fa fa-bolt" style = "color:{{annotation.iconColor}}" > < / i >
2014-08-26 09:32:30 +02:00
{{annotation.name}}
2014-08-28 16:44:16 +02:00
< / td >
2015-02-07 22:00:33 +01:00
< td style = "width: 1%" > < i ng-click = "_.move(annotations,$index,$index-1)" ng-hide = "$first" class = "pointer fa fa-arrow-up" > < / i > < / td >
< td style = "width: 1%" > < i ng-click = "_.move(annotations,$index,$index+1)" ng-hide = "$last" class = "pointer fa fa-arrow-down" > < / i > < / td >
< td style = "width: 1%" class = "nobg" >
< a ng-click = "edit(annotation)" class = "btn btn-inverse btn-mini" >
2015-01-08 11:03:27 +01:00
< i class = "fa fa-edit" > < / i >
2014-08-28 16:44:16 +02:00
Edit
< / a >
< / td >
2015-02-07 22:00:33 +01:00
< td style = "width: 1%" class = "nobg" >
< a ng-click = "removeAnnotation(annotation)" class = "btn btn-danger btn-mini" >
2015-01-08 11:03:27 +01:00
< i class = "fa fa-remove" > < / i >
2014-08-28 16:44:16 +02:00
< / a >
< / td >
< / tr >
< / table >
< / div >
2014-08-26 09:32:30 +02:00
< / div >
2014-02-18 20:41:56 +01:00
2016-02-22 10:21:22 +01:00
< div class = "annotations-basic-settings" ng-if = "mode === 'edit' || mode === 'new'" >
< div class = "gf-form-group" >
< div class = "gf-form-inline" >
< div class = "gf-form gf-size-max-xxl" >
< span class = "gf-form-label width-10" > Name< / span >
< input type = "text" class = "gf-form-input" ng-model = 'currentAnnotation.name' placeholder = "name" > < / input >
< / div >
< div class = "gf-form" >
< span class = "gf-form-label max-width-10" > Datasource< / span >
< select class = "gf-form-input gf-size-auto" ng-model = "currentAnnotation.datasource" ng-options = "f.name as f.name for f in datasources" ng-change = "datasourceChanged()" > < / select >
< / div >
2014-08-26 09:32:30 +02:00
< / div >
2016-02-22 10:21:22 +01:00
< div class = "gf-form-inline last-row" >
< div class = "gf-form gf-size-max-xl" >
< span class = "gf-form-label width-10" > Icon size< / span >
< select class = "gf-form-input gf-size-md" ng-model = "currentAnnotation.iconSize" ng-options = "f for f in [7,8,9,10,13,15,17,20,25,30]" > < / select >
< / div >
< div class = "gf-form max-width-10" >
< spectrum-picker ng-model = "currentAnnotation.iconColor" > < / spectrum-picker >
< span class = "checkbox-label" > Icon color< / span >
< / div >
< div class = "gf-form max-width-10" >
< editor-checkbox text = "Grid line" model = "currentAnnotation.showLine" > < / editor-checkbox >
< / div >
< div class = "gf-form max-width-10" >
< spectrum-picker ng-model = "currentAnnotation.lineColor" > < / spectrum-picker >
< span class = "checkbox-label" > Line color< / span >
< / div >
2014-08-26 09:32:30 +02:00
< / div >
< / div >
2016-02-02 18:16:30 +01:00
< rebuild-on-change property = "currentAnnotation.datasource" >
< plugin-component type = "annotations-query-ctrl" >
< / plugin-component >
< / rebuild-on-change >
2014-08-26 09:32:30 +02:00
2016-02-22 10:21:22 +01:00
< div class = "gf-form" >
< div class = "gf-form-button-row" >
< button ng-show = "mode === 'new'" type = "button" class = "btn gf-form-button btn-success" ng-click = "add()" > Add< / button >
< button ng-show = "mode === 'edit'" type = "button" class = "btn btn-success pull-left" ng-click = "update();" > Update< / button >
< / div >
2016-02-19 16:01:02 +01:00
< / div >
2014-08-26 09:32:30 +02:00
< / div >
< / div >
2014-07-16 18:47:20 +02:00
< / div >