axisEditor.html 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <div class="editor-row gf-form-group">
  2. <div class="section" 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">
  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>
  37. </div>
  38. <div class="section gf-form-group">
  39. <h5 class="section-heading">Thresholds</h5>
  40. <div class="gf-form-inline">
  41. <div class="gf-form">
  42. <label class="gf-form-label width-5">Level 1</label>
  43. <input type="number" class="gf-form-input max-width-5" ng-model="ctrl.panel.grid.threshold1" ng-change="ctrl.render()" ng-model-onblur>
  44. </div>
  45. <div class="gf-form">
  46. <label class="gf-form-label width-5">Color</label>
  47. <div class="gf-form-label">
  48. <spectrum-picker ng-model="ctrl.panel.grid.threshold1Color" ng-change="ctrl.render()" ></spectrum-picker>
  49. </div>
  50. </div>
  51. <div class="gf-form">
  52. <label class="gf-form-label width-5">Level 2</label>
  53. <input type="number" class="gf-form-input max-width-5" ng-model="ctrl.panel.grid.threshold2" ng-change="ctrl.render()" ng-model-onblur>
  54. </div>
  55. <div class="gf-form">
  56. <label class="gf-form-label width-5">Color</label>
  57. <div class="gf-form-label">
  58. <spectrum-picker ng-model="ctrl.panel.grid.threshold2Color" ng-change="ctrl.render()" ></spectrum-picker>
  59. </div>
  60. </div>
  61. <!-- <li class="tight&#45;form&#45;item"> -->
  62. <!-- Level 2 -->
  63. <!-- </li> -->
  64. <!-- <li> -->
  65. <!-- <input type="number" class="input&#45;small tight&#45;form&#45;input" -->
  66. <!-- ng&#45;model="ctrl.panel.grid.threshold2" ng&#45;change="ctrl.render()" ng&#45;model&#45;onblur> -->
  67. <!-- </li> -->
  68. <!-- <li class="tight&#45;form&#45;item"> -->
  69. <!-- <spectrum&#45;picker ng&#45;model="ctrl.panel.grid.threshold2Color" ng&#45;change="ctrl.render()" ></spectrum&#45;picker> -->
  70. <!-- </li> -->
  71. <!-- <li class="tight&#45;form&#45;item last"> -->
  72. <!-- <editor&#45;checkbox text="Line mode" model="ctrl.panel.grid.thresholdLine" change="ctrl.render()"></editor&#45;checkbox> -->
  73. <!-- </li> -->
  74. <!-- </ul> -->
  75. <!-- <div class="clearfix"></div> -->
  76. <!-- </div> -->
  77. </div>
  78. </div>
  79. <div class="editor-row">
  80. <div class="section">
  81. <div class="tight-form">
  82. <ul class="tight-form-list">
  83. <li class="tight-form-item" style="width: 80px">
  84. Legend
  85. </li>
  86. <li class="tight-form-item">
  87. <editor-checkbox text="Show" model="ctrl.panel.legend.show" change="ctrl.refresh()"></editor-checkbox>
  88. </li>
  89. <li class="tight-form-item">
  90. <editor-checkbox text="Table" model="ctrl.panel.legend.alignAsTable" change="ctrl.render()"></editor-checkbox>
  91. </li>
  92. <li class="tight-form-item">
  93. <editor-checkbox text="Right side" model="ctrl.panel.legend.rightSide" change="ctrl.render()"></editor-checkbox>
  94. </li>
  95. <li ng-if="ctrl.panel.legend.rightSide" class="tight-form-item">
  96. Side width
  97. </li>
  98. <li ng-if="ctrl.panel.legend.rightSide" style="width: 105px">
  99. <input type="number" class="input-small tight-form-input" placeholder="250" bs-tooltip="'Set a min-width for the legend side table/block'" data-placement="right"
  100. ng-model="ctrl.panel.legend.sideWidth" ng-change="ctrl.render()" ng-model-onblur>
  101. </li>
  102. </ul>
  103. <div class="clearfix"></div>
  104. </div>
  105. <div class="tight-form">
  106. <ul class="tight-form-list">
  107. <li class="tight-form-item" style="width: 80px">
  108. Hide series
  109. </li>
  110. <li class="tight-form-item">
  111. <editor-checkbox text="With only nulls" model="ctrl.panel.legend.hideEmpty" change="ctrl.render()"></editor-checkbox>
  112. </li>
  113. <li class="tight-form-item last">
  114. <editor-checkbox text="With only zeroes" model="ctrl.panel.legend.hideZero" change="ctrl.render()"></editor-checkbox>
  115. </li>
  116. </ul>
  117. <div class="clearfix"></div>
  118. </div>
  119. <div class="tight-form last">
  120. <ul class="tight-form-list">
  121. <li class="tight-form-item" style="width: 80px">
  122. Values
  123. </li>
  124. <li class="tight-form-item">
  125. <editor-checkbox text="Min" model="ctrl.panel.legend.min" change="ctrl.legendValuesOptionChanged()"></editor-checkbox>
  126. </li>
  127. <li class="tight-form-item">
  128. <editor-checkbox text="Max" model="ctrl.panel.legend.max" change="ctrl.legendValuesOptionChanged()"></editor-checkbox>
  129. </li>
  130. <li class="tight-form-item">
  131. <editor-checkbox text="Avg" model="ctrl.panel.legend.avg" change="ctrl.legendValuesOptionChanged()"></editor-checkbox>
  132. </li>
  133. <li class="tight-form-item">
  134. <editor-checkbox text="Current" model="ctrl.panel.legend.current" change="ctrl.legendValuesOptionChanged()"></editor-checkbox>
  135. </li>
  136. <li class="tight-form-item">
  137. <editor-checkbox text="Total" model="ctrl.panel.legend.total" change="ctrl.legendValuesOptionChanged()"></editor-checkbox>
  138. </li>
  139. <li class="tight-form-item">
  140. Decimals
  141. </li>
  142. <li style="width: 105px">
  143. <input type="number" class="input-small tight-form-input" placeholder="auto" bs-tooltip="'Override automatic decimal precision for legend and tooltips'" data-placement="right"
  144. ng-model="ctrl.panel.decimals" ng-change="ctrl.render()" ng-model-onblur>
  145. </li>
  146. </ul>
  147. <div class="clearfix"></div>
  148. </div>
  149. </div>
  150. </div>