blob: 8a27056b820cb1d90f290ad76cf78331de8119c3 [file] [log] [blame]
{{!
* 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.
}}
{{#isAuthorized "SERVICE.TOGGLE_ALERTS"}}
<div id="alert-actions-button" class="pull-left">
{{view App.MainAlertDefinitionActionsView controllerBinding="App.router.mainAlertDefinitionActionsController"}}
</div>
{{/isAuthorized}}
<div id="alert-groups-filter" class="pull-left advanced-header-table groups-filter">
{{#if App.router.clusterController.isAlertsLoaded}}
{{view view.alertGroupFilterView}}
{{/if}}
</div>
<div id="alerts">
<div class="box-header row">
</div>
<table class="table advanced-header-table table-bordered table-striped alerts-table" id="alert-definitions-table">
<thead>
{{#view view.sortView classNames="label-row" contentBinding="view.filteredContent"}}
{{view view.parentView.nameSort class="first name-sorting"}}
{{view view.parentView.statusSort class="status-sorting"}}
{{view view.parentView.serviceSort class="service-sorting"}}
{{view view.parentView.lastTriggeredSort class="last-triggred-sorting"}}
{{view view.parentView.enabledSort class="enabled-sorting"}}
{{/view}}
<tr class="filter-row">
<th class="first">{{view view.nameFilterView class="name-filter"}}</th>
<th>{{view view.stateFilterView class="status-filter"}}</th>
<th>{{view view.serviceFilterView class="service-filter"}}</th>
<th>{{view view.triggeredFilterView class="last-triggered-filter"}}</th>
<th>{{view view.enabledFilterView class="enabled-filter"}}</th>
</tr>
</thead>
<tbody>
{{#if App.router.clusterController.isAlertsLoaded}}
{{#if view.pageContent}}
{{#each alertDefinition in view.pageContent}}
<tr>
<td class="first alert-name">
<span {{bindAttr title="alertDefinition.type"}} {{bindAttr class=":type-icon alertDefinition.typeIconClass"}}></span>
<a href="#" {{action "gotoAlertDetails" alertDefinition}}>{{alertDefinition.label}}</a>
</td>
<td class="alert-status">
{{view App.AlertDefinitionSummary contentBinding="alertDefinition"}}
</td>
<td class="alert-service">{{alertDefinition.serviceDisplayName}}</td>
<td class="alert-time">
<time class="timeago" {{bindAttr data-original-title="alertDefinition.lastTriggeredFormatted"}}>{{alertDefinition.lastTriggeredAgoFormatted}}</time>
</td>
<td class="last toggle-state-button alert-state">
{{view App.AlertDefinitionState contentBinding="alertDefinition"}}
</td>
</tr>
{{/each}}
{{else}}
<tr>
<td class="first"></td>
<td colspan="4">
{{t alerts.table.noAlerts}}
</td>
</tr>
{{/if}}
{{else}}
<tr>
<td class="first"></td>
<td colspan="2">
{{view App.SpinnerView}}
</td>
<td colspan="2"></td>
</tr>
{{/if}}
</tbody>
</table>
<div class="page-bar">
<div class="filtered-info span4">
<label>{{view.filteredContentInfo}} - <a {{action clearFilters target="view"}}
href="#">{{t tableView.filters.clearAllFilters}}</a></label>
</div>
<div class="selected-hosts-info span4">
</div>
<div class="items-on-page">
<label>{{t common.show}}: {{view view.rowsPerPageSelectView selectionBinding="view.displayLength"}}</label>
</div>
<div class="info">{{view.paginationInfo}}</div>
<div class="paging_two_button">
<a {{bindAttr class="view.paginationLeftClass"}}{{action previousPage target="view"}}><i
class="icon-arrow-left"></i></a>
<a {{bindAttr class="view.paginationRightClass"}}{{action nextPage target="view"}}><i
class="icon-arrow-right"></i></a>
</div>
</div>
</div>