2016-09-08 11:25:45 +02:00
< div ng-controller = "AnnotationsEditorCtrl" >
2016-02-24 11:07:57 +01:00
< div class = "tabbed-view-header" >
< h2 class = "tabbed-view-title" >
2015-02-01 15:45:11 +01:00
Annotations
2016-02-24 11:07:57 +01:00
< / h2 >
2015-09-08 16:59:39 +02:00
2016-02-24 11:07:57 +01:00
< ul class = "gf-tabs" >
< li class = "gf-tabs-item" >
2016-09-08 11:25:45 +02:00
< a class = "gf-tabs-link" ng-click = "ctrl.mode = 'list';" ng-class = "{active: ctrl.mode === 'list'}" >
2016-02-24 11:07:57 +01:00
List
< / a >
< / li >
2016-09-08 11:25:45 +02:00
< li class = "gf-tabs-item" ng-show = "ctrl.mode === 'edit'" >
< a class = "gf-tabs-link" ng-class = "{active: ctrl.mode === 'edit'}" >
2016-02-24 11:07:57 +01:00
{{currentAnnotation.name}}
< / a >
< / li >
2016-09-08 11:25:45 +02:00
< li class = "gf-tabs-item" ng-show = "ctrl.mode === 'new'" >
2016-02-24 15:18:08 +01:00
< span class = "active gf-tabs-link" > New< / span >
< / li >
2016-02-24 11:07:57 +01:00
< / ul >
2015-09-08 16:59:39 +02:00
2016-02-24 11:07:57 +01:00
< button class = "tabbed-view-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 >
2016-02-24 11:07:57 +01:00
< div class = "tabbed-view-body" >
2016-09-08 11:25:45 +02:00
< div class = "editor-row row" ng-if = "ctrl.mode === 'list'" >
< div ng-if = "ctrl.annotations.length === 0" >
2016-02-24 11:56:45 +01:00
< em > No annotations defined< / em >
2014-08-28 16:44:16 +02:00
< / div >
2016-02-24 11:56:45 +01:00
< table class = "grafana-options-table" >
2016-09-08 11:25:45 +02:00
< tr ng-repeat = "annotation in ctrl.annotations" >
2016-02-24 11:56:45 +01:00
< td style = "width:90%" >
< i class = "fa fa-bolt" style = "color:{{annotation.iconColor}}" > < / i >
{{annotation.name}}
< / td >
2016-09-08 11:25:45 +02:00
< td style = "width: 1%" > < i ng-click = "_.move(ctrl.annotations,$index,$index-1)" ng-hide = "$first" class = "pointer fa fa-arrow-up" > < / i > < / td >
< td style = "width: 1%" > < i ng-click = "_.move(ctrl.annotations,$index,$index+1)" ng-hide = "$last" class = "pointer fa fa-arrow-down" > < / i > < / td >
2016-02-24 11:56:45 +01:00
< td style = "width: 1%" >
< a ng-click = "edit(annotation)" class = "btn btn-inverse btn-mini" >
< i class = "fa fa-edit" > < / i >
Edit
< / a >
< / td >
< td style = "width: 1%" >
2016-09-08 11:25:45 +02:00
< a ng-click = "ctrl.removeAnnotation(annotation)" class = "btn btn-danger btn-mini" >
2016-02-24 11:56:45 +01:00
< i class = "fa fa-remove" > < / i >
< / a >
< / td >
< / tr >
< / table >
2014-08-26 09:32:30 +02:00
< / div >
2014-02-18 20:41:56 +01:00
2016-09-08 11:25:45 +02:00
< div class = "gf-form" ng-show = "ctrl.mode === 'list'" >
2016-02-24 15:07:34 +01:00
< div class = "gf-form-button-row" >
2016-09-08 11:25:45 +02:00
< a type = "button" class = "btn gf-form-button btn-success" ng-click = "ctrl.mode = 'new';" > < i class = "fa fa-plus" > < / i > New< / a >
2016-02-24 15:07:34 +01:00
< / div >
< / div >
2016-09-08 11:25:45 +02:00
< div class = "annotations-basic-settings" ng-if = "ctrl.mode === 'edit' || ctrl.mode === 'new'" >
2016-02-22 10:21:22 +01:00
< div class = "gf-form-group" >
< div class = "gf-form-inline" >
< div class = "gf-form gf-size-max-xxl" >
2016-02-23 08:22:00 +01:00
< span class = "gf-form-label" > Name< / span >
2016-09-08 11:25:45 +02:00
< input type = "text" class = "gf-form-input" ng-model = 'ctrl.currentAnnotation.name' placeholder = "name" > < / input >
2016-02-22 10:21:22 +01:00
< / div >
< div class = "gf-form" >
< span class = "gf-form-label max-width-10" > Datasource< / span >
2016-02-22 11:39:11 -05:00
< div class = "gf-form-select-wrapper" >
2016-09-08 11:25:45 +02:00
< select class = "gf-form-input gf-size-auto" ng-model = "ctrl.currentAnnotation.datasource" ng-options = "f.name as f.name for f in ctrl.datasources" ng-change = "ctrl.datasourceChanged()" > < / select >
2016-02-22 11:39:11 -05:00
< / div >
2016-02-22 10:21:22 +01:00
< / div >
2016-02-22 14:54:19 +01:00
< div class = "gf-form" >
< label class = "gf-form-label" >
2016-02-23 08:22:00 +01:00
< span > Color< / span >
2016-02-22 14:54:19 +01:00
< / label >
2016-09-08 11:25:45 +02:00
< spectrum-picker class = "gf-form-input" ng-model = "ctrl.currentAnnotation.iconColor" > < / spectrum-picker >
2016-02-22 10:21:22 +01:00
< / div >
2014-08-26 09:32:30 +02:00
< / div >
< / div >
2016-09-08 11:25:45 +02:00
< rebuild-on-change property = "ctrl.currentDatasource" >
2016-02-02 18:16:30 +01:00
< 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" >
2016-02-24 17:49:08 +01:00
< div class = "gf-form-button-row p-y-0" >
2016-09-08 11:25:45 +02:00
< button ng-show = "ctrl.mode === 'new'" type = "button" class = "btn gf-form-button btn-success" ng-click = "ctrl.add()" > Add< / button >
< button ng-show = "ctrl.mode === 'edit'" type = "button" class = "btn btn-success pull-left" ng-click = "ctrl.update()" > Update< / button >
2016-02-22 10:21:22 +01:00
< / div >
2016-02-19 16:01:02 +01:00
< / div >
2014-08-26 09:32:30 +02:00
< / div >
2016-02-24 15:07:34 +01:00
2014-08-26 09:32:30 +02:00
< / div >
2014-07-16 18:47:20 +02:00
< / div >