{{!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements.  See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership.  The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License.  You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
}}

{{#if view.alerts.length}}
  <ul id='summary-alerts-popup' class="alerts">
    {{#each alert in view.alerts}}
      <li class="alert-list-wrap">
        <div class="row-fluid">
          <div class="span7 name-text">
            <div>
              <a href="#" {{action "gotoAlertDetails" alert target="view"}}>{{alert.label}}</a>
            </div>
            <div class="definition-latest-text">
              {{alert.latestText}}
            </div>
          </div>
          <div class="span5 status-col" rel="alert-status-tooltip" {{bindAttr title="alert.lastTriggered"}}>
            <span class="timeago" {{bindAttr data-original-title="alert.lastTriggeredVerboseDisplay"}}>
              <span class="status-icon">{{{alert.status}}}</span>
              <time>{{alert.lastTriggeredForFormatted}}</time>
            </span>
          </div>
        </div>
      </li>
    {{/each}}
  </ul>
{{else}}
  {{t services.service.summary.alerts.noAlerts}}
{{/if}}

