<table class="table table-chrome table-striped table-row-expanding">
    <colgroup>
        <col class="col-info">
        <col class="col-name col-flex">
        <col class="col-searchable col-slim">
        <col class="col-sfactor col-slim">
        <col class="col-rfactor col-slim">
        <col class="col-status col-slim">
        <col class="col-actions col-slim">
    </colgroup>
    <thead>
    <tr>
        <th class="<%- headerCellClass %>"></th>
        <th class="sorts" <%- sortKeyAttribute %>="name">
            <%= _('Cluster Master').t() %>
        </th>
        <th class="NOTsorts" <%- sortKeyAttribute %>="is_searchable">
            <%= _('Searchable').t() %>
        </th>
        <th class="NOTsorts" <%- sortKeyAttribute %>="search_factor_met">
            <%= _('Search Factor').t() %>
        </th>
        <th class="NOTsorts" <%- sortKeyAttribute %>="replication_factor_met">
            <%= _('Replication Factor').t() %>
        </th>
        <th class="NOTsorts" <%- sortKeyAttribute %>="TODO">
            <%= _('Status').t() %>
        </th>
        <th class="col-actions">
            <%= _('Actions').t() %>
        </th>
    </tr>
    </thead>
    <tbody>
    <% eachRow(collection.searchheadConfigs, function(searchheadModel, index, rowNumber, isExpanded) {
        var id = searchheadModel.id.split('/').pop();
        var generationModel = collection.searchheadGenerations.get('/services/cluster/searchhead/generation/'+id);
    %>

        <tr class="list-item" <%- rowIdAttribute %>="<%=id %>" >
            <td class="<%- toggleCellClass %>"><i class="icon-triangle-right"></i></td>
            <td>
                <%- searchheadModel.entry.get('name') %>
            </td>
            <td>
                <% if(generationModel && generationModel.entry.content.get('is_searchable') == 1){ %>
                    <i class="icon-check"></i> <%= _('All Data is Searchable').t() %>
                <% } else { %>
                    <i class="icon-alert"></i> <%= _('Some Data is Not Searchable').t() %>
                <% } %>
            </td>
            <td>
                <% if(generationModel && generationModel.entry.content.get('search_factor_met') == 1){ %>
                    <i class="icon-check"></i> <%= _('Met').t() %>
                <% } else { %>
                    <i class="icon-alert"></i> <%= _('Not Met').t() %>
                <% } %>
            </td>
            <td>
                <% if(generationModel && generationModel.entry.content.get('replication_factor_met') == 1){ %>
                    <i class="icon-check"></i> <%= _('Met').t() %>
                <% } else { %>
                    <i class="icon-alert"></i> <%= _('Not Met').t() %>
                <% } %>
            </td>
            <td>
                <% if(generationModel && generationModel.entry.content.get('status') == 1){ %>
                    <i class="icon-check"></i> <%= _('Up').t() %>
                <% } else { %>
                    <i class="icon-alert"></i> <%= _('Down').t() %>
                <% } %>
            </td>
            <td class="col-actions">
                <div class="actions-wrapper">
                    <a href="#" class="editConfig" style="margin-right: 20px;">
                      <%= _('Edit Configuration').t() %></a>
                    <a href="#" class="removeCluster"><%= _('Remove Cluster').t() %></a>
                </div>
            </td>
        </tr>

    <% }) %>
    </tbody>
</table>
