
  <h1>
    {{item.category | translate }} {{ 'ALERT' | translate }} {{item.id}}
  </h1>

  <div class="row">
    <dl class="dl-horizontal">
      <div class="col-sm-6" ng-if="item.id"><dt>{{ "ID" | translate }}:</dt><dd><a ng-href="#/All/alert/{{item.id}}">{{item.id}}</a></dd></div>
      <div class="col-sm-6" ng-if="item.orgClient"><dt>{{ "ORGCLIENT" | translate }}:</dt><dd>{{item.orgClient}}</dd></div>
      <div class="col-sm-6" ng-if="item.category"><dt>{{ "CATEGORY" | translate }}:</dt><dd>{{item.category | translate }}</dd></div>
      <div class="col-sm-6" ng-if="item.Creation_Date"><dt>{{ "CREATED" | translate }}:</dt><dd>{{item.Creation_Date | parseDate | formatTimestamp}}</dd></div>
      <div class="col-sm-6" ng-if="item.status"><dt>{{ "STATUS" | translate }}:</dt><dd>{{item.status | translate }}</dd></div>
      <div class="col-sm-6"><dt>{{ "SESSION" | translate }}:</dt><dd ng-if="!chooseSession">{{item.session}}</dd><dd ng-if="chooseSession"><a ng-click="chooseSession(item.session)" class="no-link-link">{{item.session}}</a></dd></div>
      <div class="col-sm-6" ng-if="item.user.username"><dt>{{ "ASSIGNED_TO" | translate }}:</dt><dd>{{item.user.username}}</dd></div>
      <div class="col-sm-6" ng-if="item.Similarity"><dt>{{ "SIMILARITY" | translate }}:</dt><dd>{{item.Similarity | number:4}}</dd></div>
      <div class="col-sm-6" ng-show='item.listEntries'>
        <dt>{{ "WHITE_WATCH_LISTS" | translate }}:</dt>
        <dd>{{item.listEntries | parseWatchLists}}</dd>
      </div>
    </dl>
  </div>

  <div ng-show="item.query.client || item.client">
    <h1>{{ "CLIENT" | translate }}</h1>
   <embed-item item="item.query.client || item.client" item-type="'client'" view-template="config.types.client.view.details"></embed-item>
  </div>


  <div ng-show="item.query.virtual_client || item.virtual_client">
    <h1>{{ "VIRTUAL_CLIENT" | translate }}</h1>
   <embed-item item="item.query.virtual_client || item.virtual_client" item-type="'virtual_client'" view-template="config.types.virtual_client.view.details"></embed-item>
  </div>

  <div ng-show="item.reason.rules.length > 0">
    <h2>{{ "RULES" | translate }}</h2>
    <table class="table table-striped">
      <thead>
        <tr>
          <th>{{ "RULE" | translate }}</th>
          <th>{{ "MESSAGE" | translate }}</th>
          <th>{{ "SCORE" | translate }}</th>
          <th ng-show="showListEntries">{{ "WHITE_WATCH_LISTS" | translate }}</th>
        </tr>
      </thead>
      <tbody>
        <tr ng-repeat="row in item.reason.rules">
          <td>{{row.Rule}}</td>
          <td>{{row.Message}}</td>
          <td>{{row.Score | number:4}}</td>
          <td ng-show="showListEntries">
            <dd ng-repeat = "myLink in row.listEntriesTable track by $index">
              <a href = "{{myLink.myurl}}">{{myLink.mycaption}}</a>
            </dd>
          </td>
        </tr>
      </tbody>
    </table>
  </div>

  <div ng-show="item.reason.matches.length > 0">
    <h1>{{ "MATCHES" | translate }}</h2>
    <table class="table table-striped">
      <thead>
        <tr>
          <th ng-repeat="col in config.types.list.view.list.brief"  ng-class="col.class ? col.class : ''">{{col.label | translate }}</th>
          <th>{{ "SIMILARITY" | translate }}</th>
          <th ng-show="showListEntries">{{ "WHITE_WATCH_LISTS" | translate }}</th>
        </tr>
      </thead>
      <tbody>
        <tr ng-repeat="row in item.reason.matches">
          <td ng-repeat="col in config.types.list.view.list.brief">
            <div ng-if="col.label !== 'ID'">{{row.list[col.field]}}</div>
            <div ng-if="col.label === 'ID'">
               <a ng-click="scrollTo('list' + row.list.id)" class="no-link-link"><b ng-show = "row.color == 2" class = "swamp">&#10004; </b><b ng-show = "row.color == 1" class = "dark-yellow">&#10004; </b>{{row.list.id}}</a>
            </div>
          </td>
          <td>{{row.Similarity | number:4}}</td>
          <td ng-show="showListEntries">
            <dd ng-repeat = "myLink in row.listEntriesTable track by $index">
              <a href = "{{myLink.myurl}}">{{myLink.mycaption}}</a>
            </dd>
          </td>
        </tr>
      </tbody>
    </table>

    <div ng-repeat="row in item.reason.matches">
      <h2 id="list{{row.list.id}}">{{ "LIST" | translate }} {{row.list.id}} <b ng-show = "row.color == 2" class = "swamp">&#10004; </b><b ng-show = "row.color == 1" class = "dark-yellow">&#10004; </b></h2>
      <embed-item item="row.list" item-type="list" view-template="config.types.list.view.details"></embed-item>
    </div>
  </div>

  <h3>{{ 'COMMENTS' | translate }}</h3>
  <comments-list comments="item.comments"
                 category="'comment'"></comments-list>
