@{
    var clusters = Module.Clusters;
}
<div>
    <h5 class="page-header">Please select an Elastic Cluster.</h5>
    <div class="row">
        <div class="col-md-4 col-md-offset-4">
            <div class="panel panel-default">
                <div class="panel-heading">Cluster</div>
                <div class="panel-body small list-group">
                    @foreach (var c in clusters)
                    {
                        var nodeInfos = c.Nodes.SafeData(true).Nodes;
                        if (nodeInfos == null) { continue; }
                        var info = nodeInfos.FirstOrDefault();
                        <a class="list-group-item" href="?cluster=@c.Name.UrlEncode()&node=@info.Name">
                            @c.IconSpan() @c.Name 
                            <span class="badge">@nodeInfos.Count.Pluralize("node") - @(info?.Version ?? "")</span>
                        </a>
                    }
                </div>
            </div>
        </div>
    </div>
</div>