module.html 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <kibana-panel ng-controller='hits' ng-init="init()">
  2. <div ng-show="panel.counter_pos == 'above' && (panel.chart == 'bar' || panel.chart == 'pie')" id='{{$id}}-legend'>
  3. <!-- vertical legend -->
  4. <table class="small" ng-show="panel.arrangement == 'vertical'">
  5. <tr ng-repeat="query in data">
  6. <td><div style="display:inline-block;border-radius:5px;background:{{query.info.color}};height:10px;width:10px"></div></td> <td style="padding-right:10px;padding-left:10px;">{{query.info.alias}}</td><td>{{query.data[0][1]}}</td>
  7. </tr>
  8. </table>
  9. <!-- horizontal legend -->
  10. <div class="small" ng-show="panel.arrangement == 'horizontal'" ng-repeat="query in data" style="float:left;padding-left: 10px;">
  11. <span><div style="display:inline-block;border-radius:5px;background:{{query.info.color}};height:10px;width:10px"></div></span> {{query.info.alias}} ({{query.data[0][1]}}) </span>
  12. </div><br>
  13. </div>
  14. <div style="clear:both"></div>
  15. <div ng-show="panel.chart == 'pie' || panel.chart == 'bar'" hits-chart params="{{panel}}" style="height:{{panel.height || row.height}};position:relative"></div>
  16. <div ng-show="panel.counter_pos == 'below' && (panel.chart == 'bar' || panel.chart == 'pie')" id='{{$id}}-legend'>
  17. <!-- vertical legend -->
  18. <table class="small" ng-show="panel.arrangement == 'vertical'">
  19. <tr ng-repeat="query in data">
  20. <td><div style="display:inline-block;border-radius:5px;background:{{query.info.color}};height:10px;width:10px"></div></td> <td style="padding-right:10px;padding-left:10px;">{{query.info.alias}}</td><td>{{query.data[0][1]}}</td>
  21. </tr>
  22. </table>
  23. <!-- horizontal legend -->
  24. <div class="small" ng-show="panel.arrangement == 'horizontal'" ng-repeat="query in data" style="float:left;padding-left: 10px;">
  25. <span><div style="display:inline-block;border-radius:5px;background:{{query.info.color}};height:10px;width:10px"></div></span> {{query.info.alias}} ({{query.data[0][1]}}) </span>
  26. </div><br>
  27. </div>
  28. <div ng-show="panel.chart == 'total'"><div ng-style="panel.style" style="line-height:{{panel.style['font-size']}}">{{hits}}</div></div>
  29. <span ng-show="panel.chart == 'list'">
  30. <div ng-style="panel.style" style="display:inline-block;line-height:{{panel.style['font-size']}}" ng-repeat="query in data">
  31. <i class="icon-circle" style="color:{{query.info.color}}"></i> {{query.info.alias}} ({{query.hits}})
  32. </div>
  33. </span><br ng-show="panel.arrangement == 'vertical' && panel.chart == 'list'">
  34. </kibana-panel>