axes_editor.html 4.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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>
  12. <div class="gf-form">
  13. <label class="gf-form-label width-6">Scale</label>
  14. <div class="gf-form-select-wrapper max-width-20">
  15. <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>
  16. </div>
  17. </div>
  18. <div class="gf-form-inline">
  19. <div class="gf-form">
  20. <label class="gf-form-label width-6">Y-Min</label>
  21. <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>
  22. </div>
  23. <div class="gf-form">
  24. <label class="gf-form-label width-6">Y-Max</label>
  25. <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>
  26. </div>
  27. </div>
  28. <div ng-if="yaxis.show">
  29. <div class="gf-form">
  30. <label class="gf-form-label width-6">Decimals</label>
  31. <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>
  32. </div>
  33. <div class="gf-form">
  34. <label class="gf-form-label width-6">Label</label>
  35. <input type="text" class="gf-form-input max-width-20" ng-model="yaxis.label" ng-change="ctrl.render()" ng-model-onblur>
  36. </div>
  37. </div>
  38. </div>
  39. <div class="section gf-form-group">
  40. <h5 class="section-heading">X-Axis</h5>
  41. <gf-form-switch class="gf-form" label="Show" label-class="width-6" checked="ctrl.panel.xaxis.show" on-change="ctrl.render()"></gf-form-switch>
  42. <div class="gf-form">
  43. <label class="gf-form-label width-6">Mode</label>
  44. <div class="gf-form-select-wrapper max-width-15">
  45. <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>
  46. </div>
  47. </div>
  48. <!-- Series mode -->
  49. <div class="gf-form" ng-if="ctrl.panel.xaxis.mode === 'series'">
  50. <label class="gf-form-label width-6">Value</label>
  51. <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>
  52. </div>
  53. <!-- Histogram mode -->
  54. <div class="gf-form" ng-if="ctrl.panel.xaxis.mode === 'histogram'">
  55. <label class="gf-form-label width-6">Buckets</label>
  56. <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">
  57. </div>
  58. <div class="gf-form-inline" ng-if="ctrl.panel.xaxis.mode === 'histogram'">
  59. <div class="gf-form">
  60. <label class="gf-form-label width-6">X-Min</label>
  61. <input type="number" class="gf-form-input width-5" placeholder="auto" empty-to-null ng-model="ctrl.panel.xaxis.min" ng-change="ctrl.render()" ng-model-onblur>
  62. </div>
  63. <div class="gf-form">
  64. <label class="gf-form-label width-6">X-Max</label>
  65. <input type="number" class="gf-form-input width-5" placeholder="auto" empty-to-null ng-model="ctrl.panel.xaxis.max" ng-change="ctrl.render()" ng-model-onblur>
  66. </div>
  67. </div>
  68. <div>
  69. <br/>
  70. <h5 class="section-heading">Y-Axes</h5>
  71. <gf-form-switch class="gf-form" label="Align" tooltip="Align left and right Y-axes" label-class="width-6" switch-class="width-5" checked="ctrl.panel.yaxis.align" on-change="ctrl.render()"></gf-form-switch>
  72. <div class="gf-form" ng-show="ctrl.panel.yaxis.align">
  73. <label class="gf-form-label width-6">
  74. Level
  75. </label>
  76. <input type="number" class="gf-form-input width-5" placeholder="0" ng-model="ctrl.panel.yaxis.alignLevel" ng-change="ctrl.render()" ng-model-onblur bs-tooltip="'Alignment of Y-axes are based on this value, starting from Y=0'" data-placement="right">
  77. </div>
  78. </div>
  79. </div>
  80. </div>