compass-web/v2/src/app/cluster/cluster-overview.tpl.html

159 lines
8.3 KiB
HTML

<div class="page-header">
<h1>
{{clusterInfo.name}}
<small>
<span class="badge" ng-class="{'badge-warning':clusterProgress.state==='INITIALIZED',
'badge-info':clusterProgress.state==='INSTALLING',
'badge-danger':clusterProgress.state==='ERROR',
'badge-success':clusterProgress.state==='SUCCESSFUL'}">
{{clusterProgress.state}}
</span>
<!--<i class="ace-icon fa fa-angle-double-right"></i>&nbsp;
<a href="">OpenStack Dashboard Link</a>-->
</small>
</h1>
</div>
<div class="row">
<div class="col-xs-12">
<div class="row">
<div class="pull-right align-right">
<div class="cluster-progress">
<div>
<strong>{{clusterProgress.status.total_hosts}} Total Hosts</strong>
</div>
<div>{{clusterProgress.status.installing_hosts}} Installing Hosts</div>
<div>{{clusterProgress.status.completed_hosts}} Completed Hosts</div>
<div>{{clusterProgress.status.failed_hosts}} Failed Hosts</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div>
<div class="pull-left">
<span class="input-icon">
<input type="text" placeholder="Search" ng-model="search">
<i class="ace-icon fa fa-search blue"></i>
</span>
<div class="btn-group" dropdown>
<button type="button" class="btn btn-default dropdown-toggle">
Column Show / Hide
<span class="ace-icon fa fa-caret-down icon-on-right"></span>
</button>
<ul class="dropdown-menu" role="menu">
<li ng-repeat="column in server_columns" ng-click="column.visible=!column.visible">
<a class="action">
<span ng-class="{'opacity-zero': !column.visible}">
<i class="ace-icon fa fa-check blue"></i>
</span>
{{column.title}}
</a>
</li>
</ul>
</div>
</div>
<div class="pull-right">
<div class="btn-group" dropdown>
<button type="button" class="btn btn-info dropdown-toggle">
Actions
<span class="ace-icon fa fa-caret-down icon-on-right"></span>
</button>
<ul class="dropdown-menu dropdown-info dropdown-menu-right" role="menu">
<li>
<a class="action">
Add Hosts
</a>
</li>
<li class="divider"></li>
<li>
<a class="action" ng-click="assignRole(role)">
IPMI Power on
</a>
</li>
<li>
<a class="action" ng-click="assignRole(role)">
IPMI Power off
</a>
</li>
<li>
<a class="action" ng-click="assignRole(role)">
IPMI Reset
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="clearfix"></div>
<div class="space-6"></div>
<div class="table-responsive">
<table ng-table="tableParams" class="table table-hover table-striped">
<thead>
<tr>
<th>
<label>
<input type="checkbox" ng-model="selectall" ng-change="selectAllServers(selectall)" class="ace">
<span class="lbl"></span>
</label>
</th>
<th ng-repeat="column in server_columns" ng-show="column.visible" class="sortable" ng-class="{'sort-asc': tableParams.isSortBy(column.field, 'asc'),
'sort-desc': tableParams.isSortBy(column.field, 'desc')}" ng-click="tableParams.sorting(column.field, tableParams.isSortBy(column.field, 'asc') ? 'desc' : 'asc')">
<div>{{column.title}}</div>
</th>
<th>Progress</th>
<th class="align-right"></th>
</tr>
</thead>
<tbody>
<tr ng-repeat="host in $data | filter:search">
<td>
<label>
<input type="checkbox" ng-model="host.selected" class="ace">
<span class="lbl"></span>
</label>
</td>
<td ng-repeat="column in server_columns" ng-show="column.visible" sortable="column.field">
<span ng-switch on="column.field">
<span ng-switch-when="clusters">
<span ng-repeat="cluster in host.clusters">
{{cluster.name}}&nbsp;
</span>
</span>
<span ng-switch-when="roles">
<span ng-repeat="role in host['roles']" class="badge">
{{role.display_name}}&nbsp;
</span>
</span>
<span ng-switch-default>
{{host[column.field]}}
</span>
</span>
</td>
<td>
<hostprogressbar hostid="host.host_id" clusterid="clusterId" clusterstate="clusterProgress.state" progressdata="">
</hostprogressbar>
</td>
<td class="align-right">
<button class="btn btn-xs" ng-click="openDeleteHostModal($index)">
<i class="ace-icon fa fa-trash-o bigger-120"></i>
</button>
</td>
</tr>
</tbody>
</table>
<script type="text/ng-template" id="deleteHostConfirm.html">
<div class="modal-body">
Are you sure to delete
<strong>{{host.name}}</strong>?
</div>
<div class="modal-footer">
<button class="btn btn-default" ng-click="cancel()">Cancel</button>
<button class="btn btn-primary" ng-click="ok()">OK</button>
</div>
</script>
</div>
</div>
</div>
</div>
</div>