htdocs/assets/templates/searches/searchlistentry.html

Summary

Maintainability
Test Coverage
<div class="col-md-4 col-sm-6 col-xs-12">
  <form method="post" class="action-form">
    <div class="panel panel-default">
      <div class="panel-heading">
        <h4 class="panel-title">
          <a href="/search/{{ id }}">{{ name }}</a>
        </h4>
      </div>

      {{#if description}}
      <div class="panel-body">
        {{ description }}
      </div>
      {{/if}}

      <div class="table-responsive">
        <table class="table table-striped table-condensed">
          <tbody>
          <tr>
            <th width="1">Type</th>
            <td class="text-right"><a href="?type={{ type }}">{{ dict types key=type default='Unknown' }}</a></td>
          </tr>
          <tr>
            <th width="1">Category</th>
            <td class="text-right"><a href="?category={{ category }}">{{ dict categories key=category default='Unknown' }}</a></td>
          </tr>
          <tr>
            <th width="1">Tags</th>
            <td class="text-right">
              {{#each tags}}
              <a class="label label-default" href="?tags[]={{ this }}">{{ this }}</a>
              {{/each}}
            </td>
          </tr>
          <tr>
            <th width="1">Priority</th>
            <td class="text-right"><a href="?priority={{ priority }}">{{ dict priorities key=priority default='Unknown' }}</a></td>
          </tr>
          <tr>
            {{#if schedule_type}}
            <th width="1">Cron Schedule</th>
            <td class="text-right">{{ schedule }}</td>
            {{else}}
            <th width="1">Frequency</th>
            <td class="text-right">{{ time frequency }}</td>
            {{/if}}
          </tr>
          <tr>
            <th width="1">Time range</th>
            <td class="text-right">{{ time range }}</td>
          </tr>
          <tr>
            <th width="1">Owner</th>
            <td class="text-right"><a href="?owner={{ owner }}">{{ owner_name }}</a></td>
          </tr>
          <tr>
            <th width="1">Assignee</th>
            <td class="text-right"><a href="?assignee_type={{ assignee_type }}&assignee={{ assignee }}">{{ assignee_name }}</a></td>
          </tr>
          <tr>
            <th width="1">Health</th>
            <td class="text-right"><span class="label label-{{#if healthy}}success{{else}}danger{{/if}}">{{#if healthy}}OK{{else}}Failing{{/if}}</span></td>
          </tr>
          </tbody>
        </table>
      </div>

      <div class="panel-footer clearfix">
        <a href="/searches/new?id={{ id }}" class="btn btn-info pull-left clone-button">
          <span class="glyphicon glyphicon-paste"></span> Clone
        </a>
        <div class="btn-group pull-right" data-toggle="buttons">
          <label class="btn btn-default {{#if enabled}}active{{/if}}">
            <input type="checkbox" name="enabled" {{#if enabled}}checked{{/if}} class="status-button" />
            <span class="glyphicon glyphicon-off"></span> Enable
          </label>
        </div>
      </div>

    </div>
  </form>
</div>