module.html 1.8 KB

1234567891011121314151617181920212223242526
  1. <kibana-panel ng-controller='stringquery'>
  2. <div ng-switch="_.isArray(panel.query)">
  3. <div ng-switch-when="false">
  4. <form class="input-append" style="margin-bottom:0px; width:100%; white-space:nowrap;">
  5. <label><small>{{panel.label}}</small></label>
  6. <input type="text" ng-model="panel.query" style="width:85%">
  7. <button type="submit" class="btn btn-info" ng-click="send_query(panel.query)"><i class="icon-search"></i></button>
  8. <button type="submit" class="btn btn-danger" ng-click="panel.query='';send_query(panel.query)"><i class="icon-ban-circle"></i></button>
  9. <button ng-show="panel.multi" type="submit" class="btn" ng-click="add_query()"><i class="icon-plus"></i></button>
  10. </form>
  11. </div>
  12. <div ng-switch-when="true">
  13. <form ng-class="{'form-inline': panel.multi_arrange == 'horizontal'}" style="width:100%;" >
  14. <span ng-repeat="q in panel.query">
  15. <span class="input-append" style="margin-bottom:0px;margin-right:5px">
  16. <button class="btn btn-danger" type="submit" style="width:50px;margin-left:-50px;visibility:hidden"></button>
  17. <input style="margin-bottom:5px;" type="text" ng-model="panel.query[$index]" ng-model-onblur style="width:90%">
  18. <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>
  19. </span><br style:"height:0px" ng-show="panel.multi_arrange == 'vertical'">
  20. </span>
  21. </form>
  22. <button type="submit" class="btn btn-info" ng-click="send_query(panel.query)"><i class="icon-search"></i> Search</button>
  23. <button type="submit" class="btn" ng-click="send_query(panel.query);add_query();"><i class="icon-plus"></i> Add Query</button>
  24. </div>
  25. </div>
  26. </kibana-panel>