editor.html 6.6 KB

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