editor.html 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  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="InfluxTargetCtrl"
  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-cog"></i>
  15. </a>
  16. <ul class="dropdown-menu pull-right" role="menu">
  17. <li role="menuitem">
  18. <a tabindex="1" ng-click="duplicate()">Duplicate</a>
  19. <a tabindex="2" ng-click="showQuery()" ng-hide="target.rawQuery">Show Query</a>
  20. <a tabindex="2" ng-click="hideQuery()" ng-show="target.rawQuery">Hide Query</a>
  21. </li>
  22. </ul>
  23. </li>
  24. <li>
  25. <a class="pointer" tabindex="1" ng-click="removeTarget(target)">
  26. <i class="icon-remove"></i>
  27. </a>
  28. </li>
  29. </ul>
  30. <ul class="grafana-target-controls-left">
  31. <li>
  32. <a class="grafana-target-segment"
  33. ng-click="target.hide = !target.hide; get_data();"
  34. role="menuitem">
  35. <i class="icon-eye-open"></i>
  36. </a>
  37. </li>
  38. </ul>
  39. <input type="text"
  40. class="grafana-target-text-input span10"
  41. ng-model="target.query"
  42. placeholder="select ..."
  43. focus-me="target.rawQuery"
  44. spellcheck='false'
  45. data-min-length=0 data-items=100
  46. ng-model-onblur
  47. ng-blur="get_data()"
  48. ng-show="target.rawQuery">
  49. <ul class="grafana-segment-list" role="menu" ng-hide="target.rawQuery">
  50. <li class="grafana-target-segment">
  51. from series
  52. </li>
  53. <li>
  54. <input type="text"
  55. class="input-small grafana-target-segment-input"
  56. ng-model="target.series"
  57. spellcheck='false'
  58. bs-typeahead="listSeries"
  59. placeholder="series name"
  60. data-min-length=0 data-items=100
  61. ng-blur="seriesBlur()">
  62. </li>
  63. <li class="grafana-target-segment">
  64. select
  65. </li>
  66. <li>
  67. <input type="text"
  68. class="input-small grafana-target-segment-input"
  69. ng-model="target.column"
  70. placeholder="value"
  71. spellcheck='false'
  72. bs-typeahead="listColumns"
  73. data-min-length=0
  74. ng-blur="get_data()">
  75. </li>
  76. <li class="grafana-target-segment">
  77. function
  78. </li>
  79. <li>
  80. <select class="input-small grafana-target-segment-input"
  81. ng-change="get_data()"
  82. ng-model="target.function"
  83. ng-options="f for f in functions" ></select>
  84. </li>
  85. <li>
  86. <a class="grafana-target-segment"
  87. ng-click="target.condition_filter = !target.condition_filter; get_data();"
  88. role="menuitem">
  89. <i class="icon-filter"></i>
  90. </a>
  91. </li>
  92. <li ng-show="target.condition_filter">
  93. <select class="input-small grafana-target-segment-input"
  94. ng-change="get_data()"
  95. ng-model="target.condition_add"
  96. ng-options="f for f in ['and', 'or']" ></select>
  97. <input type="text"
  98. class="input-small grafana-target-segment-input"
  99. ng-model="target.condition_key"
  100. placeholder="key"
  101. spellcheck='false'
  102. bs-typeahead="listColumns"
  103. data-min-length=0
  104. ng-blur="get_data()">
  105. <select class="input-mini grafana-target-segment-input"
  106. ng-change="get_data()"
  107. ng-model="target.condition_op"
  108. ng-options="f for f in operators" ></select>
  109. <input type="text"
  110. class="input-small grafana-target-segment-input"
  111. ng-model="target.condition_value"
  112. placeholder="value"
  113. spellcheck='false'
  114. data-min-length=0
  115. ng-blur="get_data()">
  116. </li>
  117. <li class="grafana-target-segment">
  118. group by time
  119. </li>
  120. <li>
  121. <input type="text"
  122. class="input-mini grafana-target-segment-input"
  123. ng-model="target.interval"
  124. placeholder="{{interval}}"
  125. bs-tooltip="'Leave blank for auto handling based on time range and panel width'"
  126. spellcheck='false'
  127. ng-model-onblur ng-change="get_data()" >
  128. </li>
  129. <li>
  130. <a class="grafana-target-segment"
  131. ng-click="target.groupby_field_add = !target.groupby_field_add; get_data();"
  132. role="menuitem">
  133. <i class="icon-plus"></i>
  134. </a>
  135. </li>
  136. <li ng-show="target.groupby_field_add">
  137. <input type="text"
  138. class="input-small grafana-target-segment-input"
  139. ng-model="target.groupby_field"
  140. placeholder="column"
  141. spellcheck="false"
  142. bs-typeahead="listColumns"
  143. data-min-length=0
  144. ng-blur="get_data()">
  145. </li>
  146. <li class="grafana-target-segment">
  147. alias as
  148. </li>
  149. <li>
  150. <input type="text"
  151. class="input-small grafana-target-segment-input"
  152. ng-model="target.alias"
  153. spellcheck='false'
  154. placeholder="alias"
  155. ng-blur="seriesBlur()">
  156. </li>
  157. </ul>
  158. <div class="clearfix"></div>
  159. </div>
  160. </div>
  161. </div>
  162. </div>