editor.html 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <h3 class="dashboard-settings__header">Annotations</h3>
  2. <div ng-controller="AnnotationsEditorCtrl">
  3. <!-- <div class="tabbed&#45;view&#45;header"> -->
  4. <!-- <h2 class="tabbed&#45;view&#45;title"> -->
  5. <!-- Annotations -->
  6. <!-- </h2> -->
  7. <!-- -->
  8. <!-- <ul class="gf&#45;tabs"> -->
  9. <!-- <li class="gf&#45;tabs&#45;item" > -->
  10. <!-- <a class="gf&#45;tabs&#45;link" ng&#45;click="ctrl.mode = 'list';" ng&#45;class="{active: ctrl.mode === 'list'}"> -->
  11. <!-- Queries -->
  12. <!-- </a> -->
  13. <!-- </li> -->
  14. <!-- <li class="gf&#45;tabs&#45;item" ng&#45;show="ctrl.mode === 'edit'"> -->
  15. <!-- <a class="gf&#45;tabs&#45;link" ng&#45;class="{active: ctrl.mode === 'edit'}"> -->
  16. <!-- Edit Query -->
  17. <!-- </a> -->
  18. <!-- </li> -->
  19. <!-- <li class="gf&#45;tabs&#45;item" ng&#45;show="ctrl.mode === 'new'"> -->
  20. <!-- <span class="active gf&#45;tabs&#45;link">New Query</span> -->
  21. <!-- </li> -->
  22. <!-- -->
  23. <!-- <li class="gf&#45;tabs&#45;item" > -->
  24. <!-- <a class="gf&#45;tabs&#45;link" ng&#45;click="ctrl.mode = 'help';" ng&#45;class="{active: ctrl.mode === 'help'}"> -->
  25. <!-- Help -->
  26. <!-- </a> -->
  27. <!-- </li> -->
  28. <!-- </ul> -->
  29. <!-- -->
  30. <!-- <button class="tabbed&#45;view&#45;close&#45;btn" ng&#45;click="dismiss();"> -->
  31. <!-- <i class="fa fa&#45;remove"></i> -->
  32. <!-- </button> -->
  33. <!-- </div> -->
  34. <!-- <div ng&#45;show="ctrl.mode === 'help'"> -->
  35. <!-- <div class="grafana&#45;info&#45;box col&#45;lg&#45;8"> -->
  36. <!-- <h5>What are Annotations?</h5> -->
  37. <!-- <p> -->
  38. <!-- Annotations provide a way to integrate event data into your graphs. They are visualized as vertical lines and icons -->
  39. <!-- on all graph panels. When you hover over an annotation icon you can get title, tags, and text information for the event. -->
  40. <!-- In the <i>Queries</i> tab you can add queries that return annotation events. -->
  41. <!-- </p> -->
  42. <!-- <p> -->
  43. <!-- You can add annotations directly from grafana by holding CTRL or CMD + click on graph (or drag region). These will be stored in Grafana's annotation database. -->
  44. <!-- </p> -->
  45. <!-- Checkout the <a class="external&#45;link" target="_blank" href="http://docs.grafana.org/reference/annotations/">Annotations documentation</a> for more information. -->
  46. <!-- </div> -->
  47. <!-- </div> -->
  48. <div class="editor-row row">
  49. <div ng-if="ctrl.annotations.length === 0">
  50. <em>No annotation queries defined</em>
  51. </div>
  52. <table class="grafana-options-table">
  53. <tr ng-repeat="annotation in ctrl.annotations">
  54. <td style="width:90%" ng-hide="annotation.builtIn">
  55. <i class="fa fa-comment" style="color:{{annotation.iconColor}}"></i> &nbsp;
  56. {{annotation.name}}
  57. </td>
  58. <td style="width:90%" ng-show="annotation.builtIn">
  59. <i class="fa fa-comment"></i> &nbsp;
  60. <em class="muted">{{annotation.name}} (Built-in)</em>
  61. </td>
  62. <td style="width: 1%"><i ng-click="_.move(ctrl.annotations,$index,$index-1)" ng-hide="$first" class="pointer fa fa-arrow-up"></i></td>
  63. <td style="width: 1%"><i ng-click="_.move(ctrl.annotations,$index,$index+1)" ng-hide="$last" class="pointer fa fa-arrow-down"></i></td>
  64. <td style="width: 1%">
  65. <a ng-click="ctrl.edit(annotation)" class="btn btn-inverse btn-mini">
  66. <i class="fa fa-edit"></i>
  67. Edit
  68. </a>
  69. </td>
  70. <td style="width: 1%">
  71. <a ng-click="ctrl.removeAnnotation(annotation)" class="btn btn-danger btn-mini" ng-hide="annotation.builtIn">
  72. <i class="fa fa-remove"></i>
  73. </a>
  74. </td>
  75. </tr>
  76. </table>
  77. </div>
  78. <div class="gf-form">
  79. <div class="gf-form-button-row">
  80. <a type="button" class="btn gf-form-button btn-success" ng-click="ctrl.setupNew()"><i class="fa fa-plus" ></i>&nbsp;&nbsp;New</a>
  81. </div>
  82. </div>
  83. <!-- <div class="annotations&#45;basic&#45;settings" ng&#45;if="ctrl.mode === 'edit' || ctrl.mode === 'new'"> -->
  84. <!-- <div> -->
  85. <!-- <div class="gf&#45;form&#45;group"> -->
  86. <!-- <h5 class="section&#45;heading">General</h5> -->
  87. <!-- <div class="gf&#45;form&#45;inline"> -->
  88. <!-- <div class="gf&#45;form"> -->
  89. <!-- <span class="gf&#45;form&#45;label width&#45;7">Name</span> -->
  90. <!-- <input type="text" class="gf&#45;form&#45;input width&#45;20" ng&#45;model='ctrl.currentAnnotation.name' placeholder="name"></input> -->
  91. <!-- </div> -->
  92. <!-- <div class="gf&#45;form"> -->
  93. <!-- <span class="gf&#45;form&#45;label width&#45;7">Data source</span> -->
  94. <!-- <div class="gf&#45;form&#45;select&#45;wrapper"> -->
  95. <!-- <select class="gf&#45;form&#45;input" ng&#45;model="ctrl.currentAnnotation.datasource" ng&#45;options="f.name as f.name for f in ctrl.datasources" ng&#45;change="ctrl.datasourceChanged()"></select> -->
  96. <!-- </div> -->
  97. <!-- </div> -->
  98. <!-- </div> -->
  99. <!-- </div> -->
  100. <!-- -->
  101. <!-- <div class="gf&#45;form&#45;group"> -->
  102. <!-- <div class="gf&#45;form&#45;inline"> -->
  103. <!-- <gf&#45;form&#45;switch class="gf&#45;form" -->
  104. <!-- label="Enabled" -->
  105. <!-- checked="ctrl.currentAnnotation.enable" -->
  106. <!-- on&#45;change="ctrl.annotationEnabledChange()" -->
  107. <!-- label&#45;class="width&#45;7"> -->
  108. <!-- </gf&#45;form&#45;switch> -->
  109. <!-- <gf&#45;form&#45;switch class="gf&#45;form" -->
  110. <!-- label="Hidden" -->
  111. <!-- tooltip="Hides the annotation query toggle from showing at the top of the dashboard" -->
  112. <!-- checked="ctrl.currentAnnotation.hide" -->
  113. <!-- on&#45;change="ctrl.annotationHiddenChanged()" -->
  114. <!-- label&#45;class="width&#45;7"> -->
  115. <!-- </gf&#45;form&#45;switch> -->
  116. <!-- <div class="gf&#45;form"> -->
  117. <!-- <label class="gf&#45;form&#45;label width&#45;9">Color</label> -->
  118. <!-- <span class="gf&#45;form&#45;label"> -->
  119. <!-- <color&#45;picker color="ctrl.currentAnnotation.iconColor" onChange="ctrl.onColorChange"></color&#45;picker> -->
  120. <!-- </span> -->
  121. <!-- </div> -->
  122. <!-- </div> -->
  123. <!-- </div> -->
  124. <!-- </div> -->
  125. <!-- -->
  126. <!-- <h5 class="section&#45;heading">Query</h5> -->
  127. <!-- <rebuild&#45;on&#45;change property="ctrl.currentDatasource"> -->
  128. <!-- <plugin&#45;component type="annotations&#45;query&#45;ctrl"> -->
  129. <!-- </plugin&#45;component> -->
  130. <!-- </rebuild&#45;on&#45;change> -->
  131. <!-- -->
  132. <!-- <div class="gf&#45;form"> -->
  133. <!-- <div class="gf&#45;form&#45;button&#45;row p&#45;y&#45;0"> -->
  134. <!-- <button ng&#45;show="ctrl.mode === 'new'" type="button" class="btn gf&#45;form&#45;button btn&#45;success" ng&#45;click="ctrl.add()">Add</button> -->
  135. <!-- <button ng&#45;show="ctrl.mode === 'edit'" type="button" class="btn btn&#45;success pull&#45;left" ng&#45;click="ctrl.update()">Update</button> -->
  136. <!-- </div> -->
  137. <!-- </div> -->
  138. <!-- </div> -->
  139. <!-- </div> -->
  140. <!-- </div> -->