<commit_before>%setdefault("search_string", "")
%setdefault("common_bookmarks", app.get_common_bookmarks())
%setdefault("user_bookmarks", app.get_user_bookmarks(user))

<form class="navbar-form navbar-left" method="get" action="all">
  <div class="dropdown form-group text-left">
    <button class="btn btn-default dropdown-toggle" type="button" id="filters_menu" data-toggle="dropdown" aria-expanded="true">Filters <span class="caret"></span></button>
    <ul class="dropdown-menu" role="menu" aria-labelledby="filters_menu">
      <li role="presentation"><a role="menuitem" tablindex="-1" href="?search=ack:true">Acknowledged</a></li>
      <li role="presentation"><a role="menuitem" tablindex="-1" href="?search=isnot:UP isnot:OK isnot:PENDING ack:false downtime:false">Problems</a></li>
      <li role="presentation"><a role="menuitem" tablindex="-1" href="#" data-toggle="modal" data-target="#searchSyntax"><strong><i class="fa fa-question-circle"></i> Search syntax</strong></a></li>
    </ul>
  </div>
  <div class="form-group">
    <label class="sr-only" for="search">Filter</label>
    <div class="input-group">
      <span class="input-group-addon"><i class="fa fa-search"></i></span>
      <!--:TODO:maethor:150609: Make the responsive-->
      <input class="form-control" style="width:500px;" type="search" id="search" name="search" value="{{ search_string }}">
    </div>
  </div>
  <div class="dropdown form-group text-left">
    <button class="btn btn-default dropdown-toggle" type="button" id="bookmarks_menu" data-toggle="dropdown" aria-expanded="true"><i class="fa fa-bookmark"></i> Bookmarks <span class="caret"></span></button>
    <ul class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="bookmarks_menu">
      <li role="presentation" class="dropdown-header">User bookmarks</li>
      %for b in user_bookmarks:
      <li role="presentation"><a role="menuitem" tablindex="-1" href="{{!b['uri']}}">{{!b['name']}}</a></li>
      %end
      <li role="presentation" class="dropdown-header">Global bookmarks</li>
      %for b in common_bookmarks:
      <li role="presentation"><a role="menuitem" tablindex="-1" href="{{!b['uri']}}">{{!b['name']}}</a></li>
      %end
      %if search_string:
      <li role="presentation" class="divider"></li>
      <li role="presentation"><a role="menuitem" tablindex="-1" href="#" data-toggle="modal" data-target="#newBookmark"><i class="fa fa-plus"></i> Bookmark the current filter</a></li>
      <li role="presentation"><a role="menuitem" tablindex="-1" href="#" data-toggle="modal" data-target="#manageBookmarks"><i class="fa fa-tags"></i> Manage bookmarks</a></li>
      %end
    </ul>
  </div>
</form>


<!-- DOCUMENTATION MODAL -->
<div class="modal fade" id="searchSyntax" tabindex="-1" role="dialog" aria-labelledby="Search syntax" aria-hidden=true>
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h3 class="modal-title">Searching hosts and services</h3>
      </div><commit_msg>Should have been with previous commit ...<commit_after>%setdefault("search_string", "")
%setdefault("common_bookmarks", app.get_common_bookmarks())
%setdefault("user_bookmarks", app.get_user_bookmarks(user))

<form class="navbar-form navbar-left" method="get" action="all">
  <div class="dropdown form-group text-left">
    <button class="btn btn-default dropdown-toggle" type="button" id="filters_menu" data-toggle="dropdown" aria-expanded="true"><i class="fa fa-filter"></i><span class="hidden-xs hidden-sm"> Filters <span class="caret"></span></span></button>
    <ul class="dropdown-menu" role="menu" aria-labelledby="filters_menu">
      <li role="presentation"><a role="menuitem" tablindex="-1" href="?search=ack:true">Acknowledged</a></li>
      <li role="presentation"><a role="menuitem" tablindex="-1" href="?search=isnot:UP isnot:OK isnot:PENDING ack:false downtime:false">Problems</a></li>
      <li role="presentation"><a role="menuitem" tablindex="-1" href="#" data-toggle="modal" data-target="#searchSyntax"><strong><i class="fa fa-question-circle"></i> Search syntax</strong></a></li>
    </ul>
  </div>
  <div class="form-group">
    <label class="sr-only" for="search">Filter</label>
    <div class="input-group">
      <span class="input-group-addon"><i class="fa fa-search"></i></span>
      <!--:TODO:maethor:150609: Make the responsive-->
      <input class="form-control" style="width:500px;" type="search" id="search" name="search" value="{{ search_string }}">
    </div>
  </div>
  <div class="dropdown form-group text-left">
    <button class="btn btn-default dropdown-toggle" type="button" id="bookmarks_menu" data-toggle="dropdown" aria-expanded="true"><i class="fa fa-bookmark"></i><span class="hidden-xs hidden-sm"> Bookmarks <span class="caret"></span></span></button>
    <ul class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="bookmarks_menu">
      <li role="presentation" class="dropdown-header">User bookmarks</li>
      %for b in user_bookmarks:
      <li role="presentation"><a role="menuitem" tablindex="-1" href="{{!b['uri']}}">{{!b['name']}}</a></li>
      %end
      <li role="presentation" class="dropdown-header">Global bookmarks</li>
      %for b in common_bookmarks:
      <li role="presentation"><a role="menuitem" tablindex="-1" href="{{!b['uri']}}">{{!b['name']}}</a></li>
      %end
      %if search_string:
      <li role="presentation" class="divider"></li>
      <li role="presentation"><a role="menuitem" tablindex="-1" href="#" data-toggle="modal" data-target="#newBookmark"><i class="fa fa-plus"></i> Bookmark the current filter</a></li>
      <li role="presentation"><a role="menuitem" tablindex="-1" href="#" data-toggle="modal" data-target="#manageBookmarks"><i class="fa fa-tags"></i> Manage bookmarks</a></li>
      %end
    </ul>
  </div>
</form>


<!-- DOCUMENTATION MODAL -->
<div class="modal fade" id="searchSyntax" tabindex="-1" role="dialog" aria-labelledby="Search syntax" aria-hidden=true>
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h3 class="modal-title">Searching hosts and services</h3>
      </div>
{'fraction_non_alphanumeric': 0.21039565554693562, 'fraction_numerical': 0.005896043444530644, 'mean_word_length': 5.252182347235694, 'pattern_counts': {'":': 0, '<': 181, '<?xml version=': 0, '>': 181, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3736828', 'n_tokens_mistral': 2105, 'n_tokens_neox': 2057, 'n_words': 398}