module.html 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <kibana-panel ng-controller='stringquery' ng-init="init()">
  2. <div ng-show="!panel.multi">
  3. <form>
  4. <table class="form-horizontal">
  5. <tr><td><label><small>{{panel.label}}</small></label></td></tr>
  6. <tr>
  7. <td width="97%" style="padding-right:20px">
  8. <span style="position:relative">
  9. <i class="icon-remove-sign pointer" style="position:absolute;left:10px;top:3px" ng-show="panel.query.length > 0" ng-click="panel.query='';send_query(panel.query)"></i>
  10. <input bs-typeahead="panel.history" data-min-length=0 data-items=100 type="text" style="text-indent:20px;width:100%" ng-model="panel.query">
  11. </span>
  12. </td>
  13. <td style="margin-left:20px" width="1%">
  14. <button style="margin-top:0px" type="submit" class="btn btn-success btn-small" ng-click="send_query(panel.query)"><i class="icon-search"></i></button>
  15. </td>
  16. <tr>
  17. </table>
  18. </form>
  19. </div>
  20. <div class='row-fluid' ng-show="panel.multi && panel.multi_arrange == 'horizontal'">
  21. <span ng-repeat="q in panel.query">
  22. <span style="margin-bottom:0px;margin-right:5px;display:inline-block;position:relative">
  23. <i class="icon-remove-sign pointer" style="position:absolute;left:10px;top:8px" ng-show="panel.query.length > 1" ng-click="remove_query($index);send_query(panel.query)"></i>
  24. <input bs-typeahead="panel.history" data-min-length=0 data-items=100 style="margin-bottom:5px; text-indent: 20px;" type="text" ng-model="panel.query[$index]" ng-model-onblur style="width:90%">
  25. <br>
  26. </span>
  27. </span>
  28. <br>
  29. <button type="submit" class="btn btn-info" ng-click="send_query(panel.query)"><i class="icon-search"></i> Search</button>
  30. <button type="submit" class="btn" ng-click="add_query();"><i class="icon-plus"></i></button>
  31. </div>
  32. <div ng-show="panel.multi && panel.multi_arrange == 'vertical'">
  33. <form>
  34. <table class="form-horizontal" style="margin-bottom:5px;">
  35. <tr><td class="small">Queries</td></tr>
  36. <tr ng-repeat="q in panel.query" style="margin-bottom:10px">
  37. <td width="99%">
  38. <span style="position:relative">
  39. <i class="icon-remove-sign pointer" style="position:absolute;left:10px;top:3px" ng-show="panel.query.length > 1" ng-click="remove_query($index);send_query(panel.query)"></i>
  40. <input bs-typeahead="panel.history" data-min-length=0 data-items=100 type="text" ng-model="panel.query[$index]" ng-model-onblur style="text-indent: 20px;width:100%">
  41. </span>
  42. </td>
  43. <td width="1%" style="visibility:hidden"><button class="btn btn-info" type="submit"></button></td>
  44. </tr>
  45. </table>
  46. <button type="submit" class="btn btn-info" ng-click="send_query(panel.query)"><i class="icon-search"></i> Search</button>
  47. <button type="submit" class="btn" ng-click="send_query(panel.query);add_query();"><i class="icon-plus"></i> Add Query</button>
  48. </form>
  49. </kibana-panel>