| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- <div ng-controller="AnnotationsEditorCtrl" ng-init="init()">
- <div class="gf-box-header">
- <div class="gf-box-title">
- <i class="fa fa-bolt"></i>
- Annotations
- </div>
- <div ng-model="editor.index" bs-tabs style="text-transform:capitalize;">
- <div ng-repeat="tab in ['Overview', 'Add', 'Edit']" data-title="{{tab}}">
- </div>
- </div>
- <button class="gf-box-header-close-btn" ng-click="dismiss();">
- <i class="fa fa-remove"></i>
- </button>
- </div>
- <div class="gf-box-body">
- <div class="editor-row row" ng-if="editor.index == 0">
- <div class="span6">
- <div ng-if="annotations.length === 0">
- <em>No annotations defined</em>
- </div>
- <table class="grafana-options-table">
- <tr ng-repeat="annotation in annotations">
- <td style="width:90%">
- <i class="fa fa-bolt"></i>
- {{annotation.name}}
- </td>
- <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">
- <i class="fa fa-edit"></i>
- Edit
- </a>
- </td>
- <td style="width: 1%" class="nobg">
- <a ng-click="removeAnnotation(annotation)" class="btn btn-danger btn-mini">
- <i class="fa fa-remove"></i>
- </a>
- </td>
- </tr>
- </table>
- </div>
- </div>
- <div ng-if="editor.index == 1 || (editor.index == 2 && !currentIsNew)">
- <div class="editor-row">
- <div class="editor-option">
- <label class="small">Name</label>
- <input type="text" class="input-medium" ng-model='currentAnnotation.name' placeholder="name"></input>
- </div>
- <div class="editor-option">
- <label class="small">Datasource</label>
- <select ng-model="currentAnnotation.datasource" ng-options="f.name as f.name for f in datasources" ng-change="datasourceChanged()"></select>
- </div>
- <div class="editor-option text-center">
- <label class="small">Icon color</label>
- <spectrum-picker ng-model="currentAnnotation.iconColor"></spectrum-picker>
- </div>
- <div class="editor-option">
- <label class="small">Icon size</label>
- <select class="input-mini" ng-model="currentAnnotation.iconSize" ng-options="f for f in [7,8,9,10,13,15,17,20,25,30]"></select>
- </div>
- <editor-opt-bool text="Grid line" model="currentAnnotation.showLine"></editor-opt-bool>
- <div class="editor-option text-center">
- <label class="small">Line color</label>
- <spectrum-picker ng-model="currentAnnotation.lineColor"></spectrum-picker>
- </div>
- </div>
- <datasource-editor-view datasource="currentAnnotation.datasource" name="annotations-query-editor"></datasource-editor-view>
- <br>
- <button ng-show="editor.index === 1" type="button" class="btn btn-success" ng-click="add()">Add</button>
- <button ng-show="editor.index === 2" type="button" class="btn btn-success pull-left" ng-click="update();">Update</button>
- <br>
- <br>
- </div>
- </div>
- </div>
|