query.editor.html 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. <div class="editor-row" style="margin-top: 10px;">
  2. <div ng-repeat="target in panel.targets"
  3. class="grafana-target"
  4. ng-class="{'grafana-target-hidden': target.hide}"
  5. ng-controller="OpenTSDBQueryCtrl"
  6. ng-init="init()">
  7. <div class="grafana-target-inner-wrapper">
  8. <div class="grafana-target-inner">
  9. <ul class="grafana-target-controls">
  10. <li class="dropdown">
  11. <a class="pointer dropdown-toggle"
  12. data-toggle="dropdown"
  13. tabindex="1">
  14. <i class="icon icon-cog"></i>
  15. </a>
  16. <ul class="dropdown-menu pull-right" role="menu">
  17. <li role="menuitem">
  18. <a tabindex="1"
  19. ng-click="duplicate()">
  20. Duplicate
  21. </a>
  22. </li>
  23. </ul>
  24. </li>
  25. <li>
  26. <a class="pointer" tabindex="1" ng-click="removeDataQuery(target)">
  27. <i class="icon icon-remove"></i>
  28. </a>
  29. </li>
  30. </ul>
  31. <ul class="grafana-segment-list">
  32. <li>
  33. <a class="grafana-target-segment"
  34. ng-click="target.hide = !target.hide; get_data();"
  35. role="menuitem">
  36. <i class="icon-eye-open"></i>
  37. </a>
  38. </li>
  39. </ul>
  40. <ul class="grafana-segment-list" role="menu">
  41. <li>
  42. <input type="text"
  43. class="grafana-target-segment-input"
  44. ng-model="target.metric"
  45. spellcheck='false'
  46. bs-typeahead="suggestMetrics"
  47. placeholder="metric name"
  48. data-min-length=0 data-items=100
  49. ng-blur="targetBlur()"
  50. >
  51. <a bs-tooltip="target.errors.metric"
  52. style="color: rgb(229, 189, 28)"
  53. ng-show="target.errors.metric">
  54. <i class="icon-warning-sign"></i>
  55. </a>
  56. </li>
  57. <li class="grafana-target-segment">
  58. Aggregator
  59. </li>
  60. <li>
  61. <select ng-model="target.aggregator"
  62. class="grafana-target-segment-input input-small"
  63. ng-options="agg for agg in aggregators"
  64. ng-change="targetBlur()">
  65. </select>
  66. <a bs-tooltip="target.errors.aggregator"
  67. style="color: rgb(229, 189, 28)"
  68. ng-show="target.errors.aggregator">
  69. <i class="icon-warning-sign"></i>
  70. </a>
  71. </li>
  72. <li class="grafana-target-segment">
  73. Rate:
  74. <input type="checkbox"
  75. class="grafana-target-option-checkbox"
  76. ng-model="target.shouldComputeRate"
  77. ng-change="targetBlur()"
  78. >
  79. </li>
  80. <li class="grafana-target-segment" ng-hide="!target.shouldComputeRate">
  81. Counter:
  82. <input type="checkbox"
  83. class="grafana-target-option-checkbox"
  84. ng-disabled="!target.shouldComputeRate"
  85. ng-model="target.isCounter"
  86. ng-change="targetBlur()">
  87. </li>
  88. <li class="grafana-target-segment" ng-hide="!target.isCounter">
  89. Counter Max:
  90. </li>
  91. <li ng-hide="!target.isCounter">
  92. <input type="text"
  93. class="grafana-target-segment-input input-medium"
  94. ng-disabled="!target.shouldComputeRate"
  95. ng-model="target.counterMax"
  96. spellcheck='false'
  97. placeholder="Counter max value"
  98. ng-blur="targetBlur()"
  99. />
  100. </li>
  101. <li class="grafana-target-segment" ng-hide="!target.isCounter">
  102. Counter Reset Value:
  103. </li>
  104. <li ng-hide="!target.isCounter">
  105. <input type="text"
  106. class="grafana-target-segment-input input-medium"
  107. ng-disabled="!target.shouldComputeRate"
  108. ng-model="target.counterResetValue"
  109. spellcheck='false'
  110. placeholder="Counter reset value"
  111. ng-blur="targetBlur()"
  112. />
  113. </li>
  114. <li class="grafana-target-segment">
  115. Alias:
  116. </li>
  117. <li>
  118. <input type="text"
  119. class="grafana-target-segment-input input-medium"
  120. ng-model="target.alias"
  121. spellcheck='false'
  122. placeholder="series alias"
  123. data-min-length=0 data-items=100
  124. ng-blur="targetBlur()"
  125. />
  126. </li>
  127. </ul>
  128. <div class="clearfix"></div>
  129. </div>
  130. <div class="grafana-target-inner">
  131. <ul class="grafana-segment-list" role="menu">
  132. <li class="grafana-target-segment">
  133. Downsample:
  134. <input type="checkbox"
  135. class="grafana-target-option-checkbox"
  136. ng-model="target.shouldDownsample"
  137. ng-change="targetBlur(target)"
  138. >
  139. </li>
  140. <li ng-hide="!target.shouldDownsample">
  141. <input type="text"
  142. class="input-small grafana-target-segment-input"
  143. ng-disabled="!target.shouldDownsample"
  144. ng-model="target.downsampleInterval"
  145. ng-change="targetBlur()"
  146. placeholder="interval"
  147. >
  148. </li>
  149. <li class="grafana-target-segment" ng-hide="!target.shouldDownsample">
  150. Aggregator
  151. </li>
  152. <li ng-hide="!target.shouldDownsample">
  153. <select ng-model="target.downsampleAggregator"
  154. class="grafana-target-segment-input input-small"
  155. ng-options="agg for agg in aggregators"
  156. ng-change="targetBlur()">
  157. </select>
  158. </li>
  159. <li class="grafana-target-segment">
  160. Tags:
  161. </li>
  162. <li ng-repeat="(key, value) in target.tags track by $index" class="grafana-target-segment">
  163. {{key}}&nbsp;=&nbsp;{{value}}
  164. <a ng-click="removeTag(key)">
  165. <i class="icon-remove"></i>
  166. </a>
  167. </li>
  168. <li class="grafana-target-segment" ng-hide="addTagMode">
  169. <a ng-click="addTag()">
  170. <i class="icon-plus-sign"></i>
  171. </a>
  172. </li>
  173. <li ng-show="addTagMode">
  174. <input type="text"
  175. class="input-small grafana-target-segment-input"
  176. spellcheck='false'
  177. bs-typeahead="suggestTagKeys"
  178. data-min-length=0 data-items=100
  179. ng-model="target.currentTagKey"
  180. placeholder="key">
  181. <input type="text"
  182. class="input-small grafana-target-segment-input"
  183. spellcheck='false'
  184. bs-typeahead="suggestTagValues"
  185. data-min-length=0 data-items=100
  186. ng-model="target.currentTagValue"
  187. placeholder="value">
  188. <a ng-click="addTag()">
  189. <i class="icon-plus-sign"></i>
  190. </a>
  191. <a bs-tooltip="target.errors.tags"
  192. style="color: rgb(229, 189, 28)"
  193. ng-show="target.errors.tags">
  194. <i class="icon-warning-sign"></i>
  195. </a>
  196. </li>
  197. </ul>
  198. <div class="clearfix"></div>
  199. </div>
  200. </div>
  201. </div>
  202. </div>