query.editor.html 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <query-editor-row query-ctrl="ctrl" can-collapse="false">
  2. <div class="gf-form-inline">
  3. <div class="gf-form gf-form--grow">
  4. <label class="gf-form-label width-8">Query</label>
  5. <input type="text" class="gf-form-input" ng-model="ctrl.target.expr" spellcheck='false' placeholder="query expression" data-min-length=0 data-items=100 ng-model-onblur ng-change="ctrl.refreshMetricData()">
  6. </div>
  7. <div class="gf-form max-width-22">
  8. <label class="gf-form-label">Metric lookup</label>
  9. <input type="text" class="gf-form-input" ng-model="ctrl.target.metric" spellcheck='false' bs-typeahead="ctrl.suggestMetrics" placeholder="metric name" data-min-length=0 data-items=100>
  10. </div>
  11. </div>
  12. <div class="gf-form-inline">
  13. <div class="gf-form max-width-26">
  14. <label class="gf-form-label width-8">Legend format</label>
  15. <input type="text" class="gf-form-input" ng-model="ctrl.target.legendFormat"
  16. spellcheck='false' placeholder="legend format" data-min-length=0 data-items=1000
  17. ng-model-onblur ng-change="ctrl.refreshMetricData()">
  18. </input>
  19. </div>
  20. <div class="gf-form">
  21. <label class="gf-form-label width-5">Step</label>
  22. <input type="text" class="gf-form-input max-width-5" ng-model="ctrl.target.interval"
  23. data-placement="right"
  24. spellcheck='false'
  25. placeholder="{{ctrl.panelCtrl.interval}}"
  26. data-min-length=0 data-items=100
  27. ng-model-onblur
  28. ng-change="ctrl.refreshMetricData()"/>
  29. <info-popover mode="right-absolute">
  30. Leave blank for auto handling based on time range and panel width
  31. </info-popover>
  32. </div>
  33. <div class="gf-form">
  34. <label class="gf-form-label">Resolution</label>
  35. <div class="gf-form-select-wrapper max-width-15">
  36. <select ng-model="ctrl.target.intervalFactor" class="gf-form-input"
  37. ng-options="r.factor as r.label for r in ctrl.resolutions"
  38. ng-change="ctrl.refreshMetricData()">
  39. </select>
  40. </div>
  41. <label class="gf-form-label">
  42. <a href="{{ctrl.linkToPrometheus}}" target="_blank" bs-tooltip="'Link to Graph in Prometheus'">
  43. <i class="fa fa-share-square-o"></i>
  44. </a>
  45. </label>
  46. </div>
  47. <div class="gf-form gf-form--grow">
  48. <div class="gf-form-label gf-form-label--grow"></div>
  49. </div>
  50. </div>
  51. </query-editor-row>