module.html 2.9 KB

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