| {{! |
| * 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="hosts-actions pull-left"> |
| {{#isAuthorized "HOST.ADD_DELETE_COMPONENTS, HOST.TOGGLE_MAINTENANCE, HOST.ADD_DELETE_HOSTS"}} |
| {{view App.HostTableMenuView}} |
| {{/isAuthorized}} |
| </div> |
| </div> |
| {{outlet}} |
| <table class="table advanced-header-table table-bordered table-striped" id="hosts-table"> |
| <thead> |
| {{#view view.sortView classNames="label-row" contentBinding="view.filteredContent"}} |
| <th class="first"><div class="ember-view view-wrapper">{{view Ember.Checkbox class="host-select-all" checkedBinding="view.parentView.selectAllHosts"}}</div></th> |
| <th> </th> |
| {{view view.parentView.nameSort}} |
| <th> </th> |
| <th> </th> |
| {{view view.parentView.ipSort}} |
| {{view view.parentView.rackSort}} |
| {{view view.parentView.cpuSort}} |
| {{view view.parentView.memorySort}} |
| {{view view.parentView.diskUsageSort}} |
| {{view view.parentView.loadAvgSort}} |
| <th {{bindAttr class="App.stackVersionsAvailable::hidden :sort-view-11"}}> |
| {{t hosts.host.menu.stackVersions}} |
| </th> |
| <th class="sort-view-6">{{t common.components}}</th> |
| {{/view}} |
| </thead> |
| <tbody> |
| {{#if view.pageContent}} |
| {{#each host in view.pageContent}} |
| {{#view view.HostView contentBinding="host"}} |
| |
| <td class="first">{{view Ember.Checkbox checkedBinding="host.selected"}}</td> |
| |
| <td class="health"> |
| <span rel="HealthTooltip" {{bindAttr class="host.healthClass host.healthIconClass"}} {{bindAttr data-original-title="host.healthToolTip" }}></span> |
| </td> |
| |
| <td class="name"> |
| <span class="trim_hostname"> |
| <a rel="UsageTooltip" data-original-title="{{unbound host.hostName}}" href="#" {{action "showDetails" host}}>{{unbound host.hostName}}</a> |
| </span> |
| {{#if host.criticalWarningAlertsCount}} |
| {{#if host.alertsSummary.CRITICAL}} |
| <span class="label alerts-crit-count" {{action "goToHostAlerts" host target="controller"}}>{{host.criticalWarningAlertsCount}}</span> |
| {{else}} |
| <span class="label alerts-warn-count" {{action "goToHostAlerts" host target="controller"}}>{{host.criticalWarningAlertsCount}}</span> |
| {{/if}} |
| {{/if}} |
| </td> |
| <td class="restart"> |
| {{#if host.componentsWithStaleConfigsCount}} |
| <span class="muted icon-refresh" rel="ComponentsTooltip" {{bindAttr title="view.restartRequiredComponentsMessage"}}></span> |
| {{/if}} |
| </td> |
| <td class="passive-state"> |
| <span rel="ComponentsTooltip" {{bindAttr data-original-title="view.componentsInPassiveStateMessage" class="host.componentsInPassiveStateCount:icon-medkit"}}></span> |
| </td> |
| <td class="host-ip">{{host.ip}}</td> |
| <td rel="UsageTooltip" {{bindAttr data-original-title="host.rack"}} class="rack-id"> |
| {{host.rack}} |
| </td> |
| <td class="cores-formatted">{{host.coresFormatted}}</td> |
| <td class="memory-formatted">{{host.memoryFormatted}}</td> |
| |
| <td class="disk-info"> |
| <div class="progress progress-info" {{bindAttr data-original-title="host.diskInfoBar"}} rel="UsageTooltip"> |
| <div class="bar" {{bindAttr style="view.usageStyle"}}></div> |
| </div> |
| </td> |
| |
| <td class="load-avg">{{host.loadAvg}}</td> |
| <td {{bindAttr class="App.stackVersionsAvailable::hidden view.hasSingleVersion:not-active-link :host-table-versions"}}> |
| <a href="#" class="black" {{action displayVersions target="view"}}> |
| {{view.currentVersion}} |
| </a> |
| </td> |
| <td {{bindAttr class="view.hasNoComponents:not-active-link :host-table-components"}}> |
| <a href="#" class="black" {{action displayComponents target="view"}}> |
| {{view.content.hostComponents.length}} {{pluralize view.content.hostComponents.length singular="t:common.component" plural="t:common.components"}} |
| </a> |
| </td> |
| {{/view}} |
| {{/each}} |
| {{else}} |
| <tr> |
| <td class="first"></td> |
| <td colspan="12"> |
| {{t hosts.table.noHosts}} |
| </td> |
| </tr> |
| {{/if}} |
| </tbody> |
| </table> |
| |
| <div {{bindAttr class="view.filteringComplete:hidden :table-overlay"}}> |
| {{view App.SpinnerView}} |
| </div> |
| |
| <div class="page-bar"> |
| <div class="selected-hosts-info span4"> |
| {{#if view.showSelectedFilter}} |
| <div> |
| <a {{action filterSelected target="view"}} href="#"> |
| {{view.selectedHosts.length}} |
| {{pluralize view.selectedHostsCount singular="t:hosts.filters.selectedHostInfo" plural="t:hosts.filters.selectedHostsInfo"}} |
| </a> |
| </div> - <a {{action clearSelection target="view"}} href="#">{{t hosts.filters.clearSelection}}</a> |
| {{/if}} |
| </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> |