tab_axes.html 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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-5" 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-5">Unit</label>
  9. <div class="gf-form-dropdown-typeahead max-width-15" 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-5">Scale</label>
  13. <div class="gf-form-select-wrapper max-width-15">
  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 max-width-10">
  19. <label class="gf-form-label width-5">Y-Min</label>
  20. <input type="number" class="gf-form-input" placeholder="auto" empty-to-null ng-model="yaxis.min" ng-change="ctrl.render()" ng-model-onblur>
  21. </div>
  22. <div class="gf-form max-width-10">
  23. <label class="gf-form-label width-5">Y-Max</label>
  24. <input type="number" class="gf-form-input" 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-5">Label</label>
  29. <input type="text" class="gf-form-input max-width-20" ng-model="yaxis.label" ng-change="ctrl.render()" ng-model-onblur>
  30. </div>
  31. </div>
  32. </div>
  33. <div class="section gf-form-group">
  34. <h5 class="section-heading">X-Axis</h5>
  35. <gf-form-switch class="gf-form" label="Show" label-class="width-5" checked="ctrl.panel.xaxis.show" on-change="ctrl.render()"></gf-form-switch>
  36. <div class="gf-form">
  37. <label class="gf-form-label width-5">Mode</label>
  38. <div class="gf-form-select-wrapper max-width-15">
  39. <select class="gf-form-input"
  40. ng-model="ctrl.panel.xaxis.mode"
  41. ng-options="v as k for (k, v) in ctrl.xAxisModes"
  42. ng-change="ctrl.refresh()">
  43. </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-5">Value</label>
  49. <div class="gf-form-select-wrapper max-width-15">
  50. <select class="gf-form-input"
  51. ng-model="ctrl.panel.xaxis.seriesValue"
  52. ng-options="v for v in ctrl.xAxisSeriesValues"
  53. ng-change="ctrl.render()">
  54. </select>
  55. </div>
  56. </div>
  57. <!-- Table mode -->
  58. <div class="gf-form" ng-if="ctrl.panel.xaxis.mode === 'table'">
  59. <label class="gf-form-label width-5">Column</label>
  60. <div class="gf-form-select-wrapper max-width-15">
  61. <select class="gf-form-input"
  62. ng-model="ctrl.panel.xaxis.columnIndex"
  63. ng-options="col.index as col.text for col in ctrl.xAxisColumns"
  64. ng-change="ctrl.refresh()">
  65. </select>
  66. </div>
  67. </div>
  68. <div class="gf-form" ng-if="ctrl.panel.xaxis.mode === 'table'">
  69. <label class="gf-form-label width-5">Value</label>
  70. <div class="gf-form-select-wrapper max-width-15">
  71. <select class="gf-form-input"
  72. ng-model="ctrl.panel.xaxis.valueColumnIndex"
  73. ng-options="col.index as col.text for col in ctrl.xAxisColumns"
  74. ng-change="ctrl.refresh()">
  75. </select>
  76. </div>
  77. </div>
  78. <!-- Elastic Raw Document mode -->
  79. <div class="gf-form" ng-if="ctrl.panel.xaxis.mode === 'elastic'">
  80. <label class="gf-form-label width-5">Column</label>
  81. <div class="gf-form-select-wrapper max-width-15">
  82. <select class="gf-form-input"
  83. ng-model="ctrl.panel.xaxis.esField"
  84. ng-options="field for field in ctrl.xAxisColumns"
  85. ng-change="ctrl.refresh()">
  86. </select>
  87. </div>
  88. </div>
  89. <div class="gf-form" ng-if="ctrl.panel.xaxis.mode === 'elastic'">
  90. <label class="gf-form-label width-5">Value</label>
  91. <div class="gf-form-select-wrapper max-width-15">
  92. <select class="gf-form-input"
  93. ng-model="ctrl.panel.xaxis.esValueField"
  94. ng-options="field for field in ctrl.xAxisColumns"
  95. ng-change="ctrl.refresh()">
  96. </select>
  97. </div>
  98. </div>
  99. </div>
  100. </div>