module.html 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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 data' class="histogram-legend">
  46. <i class='icon-circle' ng-style="{color: series.info.color}"></i>
  47. <span class='small histogram-legend-item'>{{series.info.alias}} ({{series.hits}})</span>
  48. </span>
  49. <span ng-show="panel.legend" class="small"><span ng-show="panel.value_field && panel.mode != 'count'">{{panel.value_field}}</span> {{panel.mode}} per <strong>{{panel.interval}}</strong> | (<strong>{{hits}}</strong> hits)</span>
  50. </div>
  51. <form class="form-inline bordered histogram-options" ng-show="options">
  52. <div class="checkbox">
  53. <label class="small">
  54. <input type="checkbox" ng-model="panel.bars" ng-checked="panel.bars" ng-change="render()">
  55. Bars
  56. </label>
  57. </div>
  58. <div class="checkbox">
  59. <label class="small">
  60. <input type="checkbox" ng-model="panel.lines" ng-checked="panel.lines" ng-change="render()">
  61. Lines
  62. </label>
  63. </div>
  64. <div class="checkbox">
  65. <label class="small">
  66. <input type="checkbox" ng-model="panel.points" ng-checked="panel.points" ng-change="render()">
  67. Points
  68. </label>
  69. </div>
  70. <div class="checkbox">
  71. <label class="small">
  72. <input type="checkbox" ng-model="panel.stack" ng-checked="panel.stack" ng-change="render()">
  73. Stack
  74. </label>
  75. </div>
  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. <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>
  86. </span>
  87. </form>
  88. <center><img ng-show='panel.loading && _.isUndefined(data)' src="img/load_big.gif"></center>
  89. <div histogram-chart class="pointer histogram-chart" params="{{panel}}"></div>
  90. </div>