blob: 9738b86cc7a634a6bc33cc17b4216cbc153960ec [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.
}}
<div id="hosts">
<div class="box-header row">
<div class="health-status-bar pull-left">
<div class="pull-left">
<span {{bindAttr class=":category-item view.filtersUsed::active"}}><a {{action clearFilters target="view"}} href="#">{{t common.all}} ({{content.length}})</a></span>
</div>
{{view view.alertFilter}}
{{#view view.statusFilter categoriesBinding="view.categories"}}
{{#each category in view.categories}}
{{#if category.isVisible}}
|
<span {{bindAttr class="aaa :category-item category.itemClass"}}>
<a {{action selectCategory category target="view"}} href="#">
{{#if category.alerts}}
<span class="label label-important">{{t hosts.host.alerts.st}}</span>
{{else}}
<span {{bindAttr class=":health-status category.healthStatusValue"}}> &nbsp;&nbsp;&nbsp; </span>
{{/if}}
{{category.label}}
</a>
</span>
{{/if}}
{{/each}}
{{/view}}
</div>
{{#if App.isAdmin}}
<div class="pull-right">
<button class="btn btn-inverse add-host-button" {{action addHost}}>
<i class="icon-plus icon-white"></i>
{{t hosts.host.add}}
</button>
</div>
{{/if}}
</div>
<table class="datatable table table-bordered table-striped" id="hosts-table">
<thead>
{{#view view.sortView classNames="label-row" contentBinding="view.filteredContent"}}
<th class="first"> </th>
{{view view.parentView.nameSort}}
{{view view.parentView.ipSort}}
{{view view.parentView.cpuSort}}
{{view view.parentView.memorySort}}
{{view view.parentView.diskUsageSort}}
{{view view.parentView.loadAvgSort}}
<th>{{t common.components}}</th>
{{/view}}
<tr id="filter-row">
<th class="first"> </th>
<th>{{view view.nameFilterView}}</th>
<th>{{view view.ipFilterView}}</th>
<th>{{view view.cpuFilterView}}</th>
<th>{{view view.ramFilterView}}</th>
<th></th>
<th>{{view view.loadAvgFilterView}}</th>
<th>{{view view.componentsFilterView}}</th>
</tr>
</thead>
<tbody>
{{#if view.pageContent}}
{{#each host in view.pageContent}}
{{#view view.HostView contentBinding="host"}}
<td class="first">
<span rel="HealthTooltip" {{bindAttr class="host.healthClass"}} {{bindAttr data-original-title="host.healthToolTip" }}></span>
</td>
<td class="name">
<a title="{{unbound host.publicHostName}}" href="#" {{action "showDetails" host}}>{{unbound host.publicHostNameFormatted}}</a>
{{#if host.criticalAlertsCount}}
<span class="label label-important alerts-count" {{action "showAlertsPopup" host target="controller"}}>{{host.criticalAlertsCount}}</span>
{{/if}}
</td>
<td>{{host.ip}}</td>
<td>{{host.cpu}}</td>
<td>{{host.memoryFormatted}}</td>
<td>
<div class="progress progress-info" title="{{unbound host.diskInfoBar}}" rel="UsageTooltip">
<div class="bar" {{bindAttr style="view.usageStyle"}}></div>
</div>
</td>
<td>{{host.loadAvg}}</td>
<td>
<a href="#" class="host-components-expander" {{action toggleComponents target="view"}}> <span class="caret right"></span>{{view.componentsMessage}}</a>
<div id="host-{{unbound host.hostName}}" class="host-components">
{{{view.labels}}}
</div>
</td>
{{/view}}
{{/each}}
{{else}}
<tr>
<td class="first"></td>
<td colspan="7">
{{t hosts.table.noHosts}}
</td>
</tr>
{{/if}}
</tbody>
</table>
<div class="page-bar">
<div class="filtered-hosts-info span4">
<label>{{view.filteredHostsInfo}} <a {{action clearFilters target="view"}} href="#">{{t apps.filters.clearAllFilters}}</a></label>
</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">
{{view view.paginationLeft}}
{{view view.paginationRight}}
</div>
</div>
</div>