module.html 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <div ng-controller='histogram' ng-init="init()" style="min-height:{{panel.height || row.height}}">
  2. <style>
  3. .histogram-legend {
  4. display:inline-block;
  5. padding-right:5px
  6. }
  7. .histogram-legend-dot {
  8. display:inline-block;
  9. height:10px;
  10. width:10px;
  11. border-radius:5px;
  12. }
  13. .histogram-legend-item {
  14. display:inline-block;
  15. }
  16. .histogram-chart {
  17. position:relative;
  18. }
  19. .histogram-options {
  20. padding: 5px;
  21. margin-right: 15px;
  22. margin-bottom: 0px;
  23. }
  24. .histogram-options label {
  25. margin: 0px 0px 0px 10px !important;
  26. }
  27. .histogram-options span {
  28. white-space: nowrap;
  29. }
  30. /* this is actually should be in bootstrap */
  31. .form-inline .checkbox {
  32. display: inline-block;
  33. }
  34. </style>
  35. <div>
  36. <span ng-show='panel.options'>
  37. <a class="link underline small" ng-show='panel.options' ng-click="options=!options">
  38. <i ng-show="!options" class="icon-caret-right"></i><i ng-show="options" class="icon-caret-down"></i> View
  39. </a> |&nbsp
  40. </span>
  41. <span ng-show='panel.zoomlinks && data'>
  42. <!--<a class='small' ng-click='zoom(0.5)'><i class='icon-zoom-in'></i> Zoom In</a>-->
  43. <a class='small' ng-click='zoom(2)'><i class='icon-zoom-out'></i> Zoom Out</a> |&nbsp
  44. </span>
  45. <span ng-show="panel.legend" ng-repeat='series in legend' class="histogram-legend">
  46. <i class='icon-circle' ng-style="{color: series.query.color}"></i>
  47. <span class='small histogram-legend-item'>
  48. <span ng-if="panel.show_query">{{series.query.alias || series.query.query}}</span>
  49. <span ng-if="!panel.show_query">{{series.query.alias}}</span>
  50. <span ng-show="panel.legend_counts"> ({{series.hits}})</span>
  51. </span>
  52. </span>
  53. <span ng-show="panel.legend" class="small"><span ng-show="panel.derivative">change in </span><span class="strong" ng-show="panel.value_field && panel.mode != 'count'">{{panel.value_field}}</span> {{panel.mode}} per <strong ng-hide="panel.scaleSeconds">{{panel.interval}}</strong><strong ng-show="panel.scaleSeconds">1s</strong> | (<strong>{{hits}}</strong> hits)</span>
  54. </div>
  55. <form class="form-inline bordered histogram-options" ng-show="options">
  56. <span>
  57. <div class="checkbox">
  58. <label class="small">
  59. <input type="checkbox" ng-model="panel.bars" ng-checked="panel.bars" ng-change="render()">
  60. Bars
  61. </label>
  62. </div>
  63. <div class="checkbox">
  64. <label class="small">
  65. <input type="checkbox" ng-model="panel.lines" ng-checked="panel.lines" ng-change="render()">
  66. Lines
  67. </label>
  68. </div>
  69. <div class="checkbox">
  70. <label class="small">
  71. <input type="checkbox" ng-model="panel.stack" ng-checked="panel.stack" ng-change="render()">
  72. Stack
  73. </label>
  74. </div>
  75. </span>
  76. <span ng-show="panel.stack">
  77. <div class="checkbox">
  78. <label style="white-space:nowrap" class="small">
  79. <input type="checkbox" ng-model="panel.percentage" ng-checked="panel.percentage" ng-change="render()">
  80. Percent
  81. </label>
  82. </div>
  83. </span>
  84. <span>
  85. <div class="checkbox">
  86. <label class="small">
  87. <input type="checkbox" ng-model="panel.legend" ng-checked="panel.legend" ng-change="render()">
  88. Legend
  89. </label>
  90. </div>
  91. </span>
  92. <span>
  93. <label class="small">Interval</label> <select ng-change="set_interval(panel.interval);get_data();" class="input-small" ng-model="panel.interval" ng-options="interval_label(time) for time in _.union([panel.interval],panel.intervals)"></select>
  94. </span>
  95. </form>
  96. <center><img ng-show='panel.loading && _.isUndefined(data)' src="img/load_big.gif"></center>
  97. <div histogram-chart class="pointer histogram-chart" params="{{panel}}"></div>
  98. </div>