annotations_editor.html 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <div ng-controller="AnnotationsEditorCtrl" ng-init="init()">
  2. <div class="dashboard-editor-header">
  3. <div class="dashboard-editor-title">
  4. <i class="icon icon-bolt"></i>
  5. Annotations
  6. </div>
  7. <div ng-model="editor.index" bs-tabs style="text-transform:capitalize;">
  8. <div ng-repeat="tab in ['Overview', 'Add', 'Edit']" data-title="{{tab}}">
  9. </div>
  10. </div>
  11. </div>
  12. <div class="dashboard-editor-body">
  13. <div class="editor-row" ng-if="editor.index == 0">
  14. <table class="table table-striped annotation-editor-table" style="width: 700px">
  15. <tr ng-repeat="annotation in annotations">
  16. <td style="width:90%">
  17. <a ng-click="edit(annotation)" bs-tooltip="'Click to edit'" data-placement="right">
  18. <i class="icon-bolt"></i>
  19. {{annotation.name}}
  20. </a>
  21. </td>
  22. <td><i ng-click="_.move(annotations,$index,$index-1)" ng-hide="$first" class="pointer icon-arrow-up"></i></td>
  23. <td><i ng-click="_.move(annotations,$index,$index+1)" ng-hide="$last" class="pointer icon-arrow-down"></i></td>
  24. <td><i ng-click="removeAnnotation(annotation)" class="pointer icon-remove"></i></td>
  25. </tr>
  26. </table>
  27. </div>
  28. <div ng-if="editor.index == 1 || (editor.index == 2 && !currentIsNew)">
  29. <div class="editor-row">
  30. <div class="editor-option">
  31. <label class="small">Name</label>
  32. <input type="text" class="input-medium" ng-model='currentAnnotation.name' placeholder="name"></input>
  33. </div>
  34. <div class="editor-option">
  35. <label class="small">Datasource</label>
  36. <select ng-model="currentDatasource" ng-options="f.name for f in datasources" ng-change="setDatasource()"></select>
  37. </div>
  38. <div class="editor-option">
  39. <label class="small">Icon color</label>
  40. <spectrum-picker ng-model="currentAnnotation.iconColor"></spectrum-picker>
  41. </div>
  42. <div class="editor-option">
  43. <label class="small">Icon size</label>
  44. <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>
  45. </div>
  46. <div class="editor-option">
  47. <label class="small">Grid line</label>
  48. <input type="checkbox" ng-model="currentAnnotation.showLine" ng-checked="currentAnnotation.showLine">
  49. </div>
  50. <div class="editor-option">
  51. <label class="small">Line color</label>
  52. <spectrum-picker ng-model="currentAnnotation.lineColor"></spectrum-picker>
  53. </div>
  54. </div>
  55. <div ng-include src="currentDatasource.editorSrc">
  56. </div>
  57. <button ng-show="currentIsNew" type="button" class="btn btn-success" ng-click="add()">Add annotation</button>
  58. </div>
  59. </div>
  60. <div class="dashboard-editor-footer">
  61. <button type="button" class="btn btn-success pull-right" ng-click="close_edit();dismiss();dashboard.refresh();">Close</button>
  62. </div>
  63. </div>