axes_editor.html 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <div class="editor-row">
  2. <div class="section gf-form-group" ng-repeat="yaxis in ctrl.panel.yaxes">
  3. <h5 class="section-heading" ng-show="$index === 0">Left Y</h5>
  4. <h5 class="section-heading" ng-show="$index === 1">Right Y</h5>
  5. <gf-form-switch class="gf-form" label="Show" label-class="width-6" checked="yaxis.show" on-change="ctrl.render()"></gf-form-switch>
  6. <div ng-if="yaxis.show">
  7. <div class="gf-form">
  8. <label class="gf-form-label width-6">Unit</label>
  9. <div class="gf-form-dropdown-typeahead max-width-20" ng-model="yaxis.format" dropdown-typeahead2="ctrl.unitFormats" dropdown-typeahead-on-select="ctrl.setUnitFormat(yaxis, $subItem)"></div>
  10. </div>
  11. <div class="gf-form">
  12. <label class="gf-form-label width-6">Scale</label>
  13. <div class="gf-form-select-wrapper max-width-20">
  14. <select class="gf-form-input" ng-model="yaxis.logBase" ng-options="v as k for (k, v) in ctrl.logScales" ng-change="ctrl.render()"></select>
  15. </div>
  16. </div>
  17. <div class="gf-form-inline">
  18. <div class="gf-form">
  19. <label class="gf-form-label width-6">Y-Min</label>
  20. <input type="text" class="gf-form-input width-5" placeholder="auto" empty-to-null ng-model="yaxis.min" ng-change="ctrl.render()" ng-model-onblur>
  21. </div>
  22. <div class="gf-form">
  23. <label class="gf-form-label width-6">Y-Max</label>
  24. <input type="text" class="gf-form-input width-5" placeholder="auto" empty-to-null ng-model="yaxis.max" ng-change="ctrl.render()" ng-model-onblur>
  25. </div>
  26. </div>
  27. <div class="gf-form">
  28. <label class="gf-form-label width-6">Decimals</label>
  29. <input type="number" class="gf-form-input max-width-20" placeholder="auto" empty-to-null bs-tooltip="'Override automatic decimal precision for y-axis'" data-placement="right" ng-model="yaxis.decimals" ng-change="ctrl.render()" ng-model-onblur>
  30. </div>
  31. <div class="gf-form">
  32. <label class="gf-form-label width-6">Label</label>
  33. <input type="text" class="gf-form-input max-width-20" ng-model="yaxis.label" ng-change="ctrl.render()" ng-model-onblur>
  34. </div>
  35. </div>
  36. </div>
  37. <div class="section gf-form-group">
  38. <h5 class="section-heading">X-Axis</h5>
  39. <gf-form-switch class="gf-form" label="Show" label-class="width-6" checked="ctrl.panel.xaxis.show" on-change="ctrl.render()"></gf-form-switch>
  40. <div class="gf-form">
  41. <label class="gf-form-label width-6">Mode</label>
  42. <div class="gf-form-select-wrapper max-width-15">
  43. <select class="gf-form-input" ng-model="ctrl.panel.xaxis.mode" ng-options="v as k for (k, v) in ctrl.xAxisModes" ng-change="ctrl.xAxisModeChanged()"> </select>
  44. </div>
  45. </div>
  46. <!-- Series mode -->
  47. <div class="gf-form" ng-if="ctrl.panel.xaxis.mode === 'series'">
  48. <label class="gf-form-label width-6">Value</label>
  49. <metric-segment-model property="ctrl.panel.xaxis.values[0]" options="ctrl.xAxisStatOptions" on-change="ctrl.xAxisValueChanged()" custom="false" css-class="width-10" select-mode="true"></metric-segment-model>
  50. </div>
  51. <!-- Histogram mode -->
  52. <div class="gf-form" ng-if="ctrl.panel.xaxis.mode === 'histogram'">
  53. <label class="gf-form-label width-6">Buckets</label>
  54. <input type="number" class="gf-form-input max-width-8" ng-model="ctrl.panel.xaxis.buckets" placeholder="auto" ng-change="ctrl.render()" ng-model-onblur bs-tooltip="'Number of buckets'" data-placement="right">
  55. </div>
  56. </div>
  57. </div>