query.editor.html 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. <div class="tight-form">
  2. <ul class="tight-form-list pull-right">
  3. <li ng-show="parserError" class="tight-form-item">
  4. <a bs-tooltip="parserError" style="color: rgb(229, 189, 28)" role="menuitem">
  5. <i class="fa fa-warning"></i>
  6. </a>
  7. </li>
  8. <li class="tight-form-item">
  9. <a class="pointer" tabindex="1" ng-click="toggleEditorMode()">
  10. <i class="fa fa-pencil"></i>
  11. </a>
  12. </li>
  13. <li class="tight-form-item">
  14. <div class="dropdown">
  15. <a class="pointer dropdown-toggle"
  16. data-toggle="dropdown"
  17. tabindex="1">
  18. <i class="fa fa-bars"></i>
  19. </a>
  20. <ul class="dropdown-menu pull-right" role="menu">
  21. <li role="menuitem">
  22. <a tabindex="1"
  23. ng-click="duplicate()">
  24. Duplicate
  25. </a>
  26. </li>
  27. <li role="menuitem">
  28. <a tabindex="1"
  29. ng-click="moveMetricQuery($index, $index-1)">
  30. Move up
  31. </a>
  32. </li>
  33. <li role="menuitem">
  34. <a tabindex="1"
  35. ng-click="moveMetricQuery($index, $index+1)">
  36. Move down
  37. </a>
  38. </li>
  39. </ul>
  40. </div>
  41. </li>
  42. <li class="tight-form-item last">
  43. <a class="pointer" tabindex="1" ng-click="removeDataQuery(target)">
  44. <i class="fa fa-remove"></i>
  45. </a>
  46. </li>
  47. </ul>
  48. <ul class="tight-form-list">
  49. <li class="tight-form-item" style="min-width: 15px; text-align: center">
  50. {{targetLetters[$index]}}
  51. </li>
  52. <li>
  53. <a class="tight-form-item"
  54. ng-click="target.hide = !target.hide; get_data();"
  55. role="menuitem">
  56. <i class="fa fa-eye"></i>
  57. </a>
  58. </li>
  59. </ul>
  60. <input type="text" class="tight-form-clear-input span10"
  61. ng-model="target.target"
  62. give-focus="target.textEditor"
  63. spellcheck='false'
  64. ng-model-onblur ng-change="get_data()"
  65. ng-show="target.textEditor" />
  66. <ul class="tight-form-list" role="menu" ng-hide="target.textEditor">
  67. <li ng-repeat="segment in segments" role="menuitem">
  68. <metric-segment segment="segment" get-alt-segments="getAltSegments($index)" on-value-changed="segmentValueChanged(segment, $index)"></metric-segment>
  69. </li>
  70. <li ng-repeat="func in functions">
  71. <span graphite-func-editor class="tight-form-item tight-form-func">
  72. </span>
  73. </li>
  74. <li class="dropdown" graphite-add-func>
  75. </li>
  76. </ul>
  77. <div class="clearfix"></div>
  78. </div>
  79. </div>
  80. <!-- <section class="grafana&#45;metric&#45;options"> -->
  81. <!-- <div class="tight&#45;form"> -->
  82. <!-- <ul class="tight&#45;form&#45;list"> -->
  83. <!-- <li class="tight&#45;form&#45;item tight&#45;form&#45;item&#45;icon"> -->
  84. <!-- <i class="fa fa&#45;wrench"></i> -->
  85. <!-- </li> -->
  86. <!-- <li class="tight&#45;form&#45;item"> -->
  87. <!-- Cache timeout -->
  88. <!-- </li> -->
  89. <!-- <li> -->
  90. <!-- <input type="text" -->
  91. <!-- class="input&#45;mini tight&#45;form&#45;input" -->
  92. <!-- ng&#45;model="panel.cacheTimeout" -->
  93. <!-- bs&#45;tooltip="'Graphite parameter to override memcache default timeout (unit is seconds)'" -->
  94. <!-- data&#45;placement="right" -->
  95. <!-- spellcheck='false' -->
  96. <!-- placeholder="60"> -->
  97. <!-- </li> -->
  98. <!-- <li class="tight&#45;form&#45;item"> -->
  99. <!-- Max data points -->
  100. <!-- </li> -->
  101. <!-- <li> -->
  102. <!-- <input type="text" -->
  103. <!-- class="input&#45;mini tight&#45;form&#45;input" -->
  104. <!-- ng&#45;model="panel.maxDataPoints" -->
  105. <!-- bs&#45;tooltip="'Override max data points, automatically set to graph width in pixels.'" -->
  106. <!-- data&#45;placement="right" -->
  107. <!-- ng&#45;model&#45;onblur ng&#45;change="get_data()" -->
  108. <!-- spellcheck='false' -->
  109. <!-- placeholder="auto"> -->
  110. <!-- </li> -->
  111. <!-- </ul> -->
  112. <!-- <div class="clearfix"></div> -->
  113. <!-- </div> -->
  114. <!-- <div class="tight&#45;form"> -->
  115. <!-- <ul class="tight&#45;form&#45;list"> -->
  116. <!-- <li class="tight&#45;form&#45;item tight&#45;form&#45;item&#45;icon"> -->
  117. <!-- <i class="fa fa&#45;info&#45;circle"></i> -->
  118. <!-- </li> -->
  119. <!-- <li class="tight&#45;form&#45;item"> -->
  120. <!-- <a ng&#45;click="toggleEditorHelp(1);" bs&#45;tooltip="'click to show helpful info'" data&#45;placement="bottom"> -->
  121. <!-- shorter legend names -->
  122. <!-- </a> -->
  123. <!-- </li> -->
  124. <!-- <li class="tight&#45;form&#45;item"> -->
  125. <!-- <a ng&#45;click="toggleEditorHelp(2);" bs&#45;tooltip="'click to show helpful info'" data&#45;placement="bottom"> -->
  126. <!-- series as parameters -->
  127. <!-- </a> -->
  128. <!-- </li> -->
  129. <!-- <li class="tight&#45;form&#45;item"> -->
  130. <!-- <a ng&#45;click="toggleEditorHelp(3)" bs&#45;tooltip="'click to show helpful info'" data&#45;placement="bottom"> -->
  131. <!-- stacking -->
  132. <!-- </a> -->
  133. <!-- </li> -->
  134. <!-- <li class="tight&#45;form&#45;item"> -->
  135. <!-- <a ng&#45;click="toggleEditorHelp(4)" bs&#45;tooltip="'click to show helpful info'" data&#45;placement="bottom"> -->
  136. <!-- templating -->
  137. <!-- </a> -->
  138. <!-- </li> -->
  139. <!-- <li class="tight&#45;form&#45;item"> -->
  140. <!-- <a ng&#45;click="toggleEditorHelp(5)" bs&#45;tooltip="'click to show helpful info'" data&#45;placement="bottom"> -->
  141. <!-- max data points -->
  142. <!-- </a> -->
  143. <!-- </li> -->
  144. <!-- </ul> -->
  145. <!-- <div class="clearfix"></div> -->
  146. <!-- </div> -->
  147. <!-- </section> -->
  148. <!-- -->
  149. <!-- <div class="editor&#45;row"> -->
  150. <!-- <div class="pull&#45;left" style="margin&#45;top: 30px;"> -->
  151. <!-- -->
  152. <!-- <div class="grafana&#45;info&#45;box span8" ng&#45;if="editorHelpIndex === 1"> -->
  153. <!-- <h5>Shorter legend names</h5> -->
  154. <!-- <ul> -->
  155. <!-- <li>alias() function to specify a custom series name</li> -->
  156. <!-- <li>aliasByNode(2) to alias by a specific part of your metric path</li> -->
  157. <!-- <li>aliasByNode(2, &#45;1) you can add multiple segment paths, and use negative index</li> -->
  158. <!-- <li>groupByNode(2, 'sum') is useful if you have 2 wildcards in your metric path and want to sumSeries and group by</li> -->
  159. <!-- </ul> -->
  160. <!-- </div> -->
  161. <!-- -->
  162. <!-- <div class="grafana&#45;info&#45;box span8" ng&#45;if="editorHelpIndex === 2"> -->
  163. <!-- <h5>Series as parameter</h5> -->
  164. <!-- <ul> -->
  165. <!-- <li>Some graphite functions allow you to have many series arguments</li> -->
  166. <!-- <li>Use #[A&#45;Z] to use a graphite query as parameter to a function</li> -->
  167. <!-- <li> -->
  168. <!-- Examples: -->
  169. <!-- <ul> -->
  170. <!-- <li>asPercent(#A, #B)</li> -->
  171. <!-- <li>prod.srv&#45;01.counters.count &#45; asPercent(#A) : percentage of count in comparison with A query</li> -->
  172. <!-- <li>prod.srv&#45;01.counters.count &#45; sumSeries(#A) : sum count and series A </li> -->
  173. <!-- <li>divideSeries(#A, #B)</li> -->
  174. <!-- </ul> -->
  175. <!-- </li> -->
  176. <!-- <li>If a query is added only to be used as a parameter, hide it from the graph with the eye icon</li> -->
  177. <!-- </ul> -->
  178. <!-- </div> -->
  179. <!-- -->
  180. <!-- <div class="grafana&#45;info&#45;box span6" ng&#45;if="editorHelpIndex === 3"> -->
  181. <!-- <h5>Stacking</h5> -->
  182. <!-- <ul> -->
  183. <!-- <li>You find the stacking option under Display Styles tab</li> -->
  184. <!-- <li>When stacking is enabled make sure null point mode is set to 'null as zero'</li> -->
  185. <!-- </ul> -->
  186. <!-- </div> -->
  187. <!-- -->
  188. <!-- <div class="grafana&#45;info&#45;box span6" ng&#45;if="editorHelpIndex === 4"> -->
  189. <!-- <h5>Templating</h5> -->
  190. <!-- <ul> -->
  191. <!-- <li>You can use a template variable in place of metric names</li> -->
  192. <!-- <li>You can use a template variable in place of function parameters</li> -->
  193. <!-- <li>You enable the templating feature in Dashboard settings / Feature toggles </li> -->
  194. <!-- </ul> -->
  195. <!-- </div> -->
  196. <!-- -->
  197. <!-- <div class="grafana&#45;info&#45;box span6" ng&#45;if="editorHelpIndex === 5"> -->
  198. <!-- <h5>Max data points</h5> -->
  199. <!-- <ul> -->
  200. <!-- <li>Every graphite request is issued with a maxDataPoints parameter</li> -->
  201. <!-- <li>Graphite uses this parameter to consolidate the real number of values down to this number</li> -->
  202. <!-- <li>If there are more real values, then by default they will be consolidated using averages</li> -->
  203. <!-- <li>This could hide real peaks and max values in your series</li> -->
  204. <!-- <li>You can change how point consolidation is made using the consolidateBy graphite function</li> -->
  205. <!-- <li>Point consolidation will effect series legend values (min,max,total,current)</li> -->
  206. <!-- <li>If you override maxDataPoint and set a high value performance can be severely effected</li> -->
  207. <!-- </ul> -->
  208. <!-- </div> -->
  209. <!-- -->
  210. <!-- </div> -->
  211. <!-- </div> -->