editor.html 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. <div class="editor-row">
  2. <div class="section gf-form-group">
  3. <div class="gf-form-inline">
  4. <div class="gf-form">
  5. <label class="gf-form-label width-6"><strong>Big value</strong></label>
  6. </div>
  7. <div class="gf-form max-width-11">
  8. <label class="gf-form-label width-4">Prefix</label>
  9. <input type="text" class="gf-form-input" ng-model="ctrl.panel.prefix" ng-change="ctrl.render()" ng-model-onblur>
  10. </div>
  11. <div class="gf-form max-width-10">
  12. <label class="gf-form-label width-4">Value</label>
  13. <div class="gf-form-select-wrapper max-width-15">
  14. <select class="gf-form-input"
  15. ng-model="ctrl.panel.valueName"
  16. ng-options="f for f in ctrl.valueNameOptions"
  17. ng-change="ctrl.render()"></select>
  18. </div>
  19. </div>
  20. <div class="gf-form max-width-12">
  21. <label class="gf-form-label width-5">Postfix</label>
  22. <input type="text" class="gf-form-input last" ng-model="ctrl.panel.postfix" ng-change="ctrl.render()" ng-model-onblur>
  23. </div>
  24. </div>
  25. <div class="gf-form-inline">
  26. <div class="gf-form">
  27. <label class="gf-form-label width-6"><strong>Font size</strong></label>
  28. </div>
  29. <div class="gf-form max-width-11">
  30. <label class="gf-form-label width-4">Prefix</label>
  31. <div class="gf-form-select-wrapper max-width-15">
  32. <select class="gf-form-input"
  33. ng-model="ctrl.panel.prefixFontSize"
  34. ng-options="f for f in ctrl.fontSizes"
  35. ng-change="ctrl.render()"></select>
  36. </div>
  37. </div>
  38. <div class="gf-form max-width-10">
  39. <label class="gf-form-label width-4">Value</label>
  40. <div class="gf-form-select-wrapper max-width-15">
  41. <select class="gf-form-input"
  42. ng-model="ctrl.panel.valueFontSize"
  43. ng-options="f for f in ctrl.fontSizes"
  44. ng-change="ctrl.render()"></select>
  45. </div>
  46. </div>
  47. <div class="gf-form max-width-12">
  48. <label class="gf-form-label width-5">Postfix</label>
  49. <div class="gf-form-select-wrapper max-width-15">
  50. <select class="input-small gf-form-input last"
  51. ng-model="ctrl.panel.postfixFontSize"
  52. ng-options="f for f in ctrl.fontSizes"
  53. ng-change="ctrl.render()"></select>
  54. </div>
  55. </div>
  56. </div>
  57. <div class="gf-form-inline">
  58. <div class="gf-form">
  59. <label class="gf-form-label width-6"><strong>Unit</strong></label>
  60. </div>
  61. <div class="gf-form max-width-15">
  62. <div class="gf-form-dropdown-typeahead max-width-19"
  63. ng-model="ctrl.panel.format"
  64. dropdown-typeahead2="ctrl.unitFormats"
  65. dropdown-typeahead-on-select="ctrl.setUnitFormat($subItem)">
  66. </div>
  67. </div>
  68. <div class="gf-form max-width-11">
  69. <label class="gf-form-label width-6">Decimals</label>
  70. <input type="number" class="gf-form-input"
  71. placeholder="auto" data-placement="right"
  72. bs-tooltip="'Override automatic decimal precision for legend and tooltips'"
  73. ng-model="ctrl.panel.decimals"
  74. ng-change="ctrl.refresh()"
  75. ng-model-onblur>
  76. </div>
  77. </div>
  78. </div>
  79. </div>
  80. <div class="editor-row">
  81. <h5 class="section-heading">Coloring</h5>
  82. <div class="section gf-form-group">
  83. <div class="gf-form-inline">
  84. <gf-form-switch class="gf-form" label-class="width-8"
  85. label="Background"
  86. checked="ctrl.panel.colorBackground"
  87. on-change="ctrl.render()"></gf-form-switch>
  88. <gf-form-switch class="gf-form" label-class="width-4"
  89. label="Value"
  90. checked="ctrl.panel.colorValue"
  91. on-change="ctrl.render()"></gf-form-switch>
  92. </div>
  93. <div class="gf-form-inline">
  94. <div class="gf-form max-width-21">
  95. <label class="gf-form-label width-8">Thresholds
  96. <tip>Define two threshold values&lt;br /&gt; 50,80 will produce: &lt;50 = Green, 50:80 = Yellow, &gt;80 = Red</tip>
  97. </label>
  98. <input type="text" class="gf-form-input" ng-model="ctrl.panel.thresholds" ng-blur="ctrl.render()" placeholder="50,80"></input>
  99. </div>
  100. <div class="gf-form">
  101. <label class="gf-form-label width-5">Colors</label>
  102. <span class="gf-form-label">
  103. <spectrum-picker ng-model="ctrl.panel.colors[0]" ng-change="ctrl.render()" ></spectrum-picker>
  104. </span>
  105. <span class="gf-form-label">
  106. <spectrum-picker ng-model="ctrl.panel.colors[1]" ng-change="ctrl.render()" ></spectrum-picker>
  107. </span>
  108. <span class="gf-form-label">
  109. <spectrum-picker ng-model="ctrl.panel.colors[2]" ng-change="ctrl.render()" ></spectrum-picker>
  110. </span>
  111. <div class="gf-form-button">
  112. <button class="btn btn-inverse" ng-click="ctrl.invertColorOrder()">
  113. invert order
  114. </button>
  115. </div>
  116. </div>
  117. </div>
  118. </div>
  119. </div>
  120. <div class="editor-row">
  121. <h5 class="section-heading">Spark lines</h5>
  122. <div class="section gf-form-group">
  123. <div class="gf-form-inline">
  124. <gf-form-switch class="gf-form" label-class="width-4"
  125. label="Show"
  126. checked="ctrl.panel.sparkline.show"
  127. on-change="ctrl.render()"></gf-form-switch>
  128. <gf-form-switch class="gf-form" label-class="width-10"
  129. label="Background mode"
  130. checked="ctrl.panel.sparkline.full"
  131. on-change="ctrl.render()"></gf-form-switch>
  132. <div class="gf-form">
  133. <label class="gf-form-label width-6">Line Color</label>
  134. <span class="gf-form-label">
  135. <spectrum-picker ng-model="ctrl.panel.sparkline.lineColor" ng-change="ctrl.render()" ></spectrum-picker>
  136. </span>
  137. </div>
  138. <div class="gf-form">
  139. <label class="gf-form-label width-6">Fill Color</label>
  140. <span class="gf-form-label">
  141. <spectrum-picker ng-model="ctrl.panel.sparkline.fillColor" ng-change="ctrl.render()" ></spectrum-picker>
  142. </span>
  143. </div>
  144. </div>
  145. </div>
  146. </div>
  147. <div class="editor-row">
  148. <h5 class="section-heading">Gauge</h5>
  149. <div class="section gf-form-group">
  150. <div class="gf-form-inline">
  151. <gf-form-switch class="gf-form" label-class="width-4"
  152. label="Show"
  153. checked="ctrl.panel.gauge.show"
  154. on-change="ctrl.render()"></gf-form-switch>
  155. <div class="gf-form max-width-11">
  156. <label class="gf-form-label width-4">Min</label>
  157. <input type="number" class="gf-form-input"
  158. placeholder="0" data-placement="right"
  159. ng-model="ctrl.panel.gauge.minValue"
  160. ng-change="ctrl.refresh()"
  161. ng-model-onblur>
  162. </div>
  163. <div class="gf-form max-width-11">
  164. <label class="gf-form-label width-4">Max</label>
  165. <input type="number" class="gf-form-input"
  166. placeholder="0" data-placement="right"
  167. ng-model="ctrl.panel.gauge.maxValue"
  168. ng-change="ctrl.refresh()"
  169. ng-model-onblur>
  170. </div>
  171. <div class="gf-form" ng-show="ctrl.invalidGaugeRange">
  172. <label class="gf-form-label alert-state-critical">
  173. &nbsp; <i class="fa fa-warning"></i>
  174. Min value is bigger than max.
  175. </label>
  176. </div>
  177. </div>
  178. <div class="gf-form-inline">
  179. <gf-form-switch class="gf-form" label-class="width-10"
  180. label="Threshold labels"
  181. checked="ctrl.panel.gauge.thresholdLabels"
  182. on-change="ctrl.render()"></gf-form-switch>
  183. <gf-form-switch class="gf-form" label-class="width-11"
  184. label="Threshold markers"
  185. checked="ctrl.panel.gauge.thresholdMarkers"
  186. on-change="ctrl.render()"></gf-form-switch>
  187. </div>
  188. </div>
  189. </div>