<script id="namespace_view-server_assignments-template" type="text/x-handlebars-template">
    <h2 class="title">Servers used by this table</h2>
    {{#if has_datacenters}}
    <ul class="datacenters">
        {{#each datacenters}}
            <li class="datacenter parent">
                <div class="tree-line"></div>
                <div class="datacenter-info parent-info">
                    <p class="name">
                        {{#unless is_universe}}
                            Datacenter <a href="/#datacenters/{{id}}">{{name}}</a>
                        {{else}}
                            Unassigned servers
                        {{/unless}}
                    </p>
                </div>
                <ul class="servers">
                    {{#each machines}}
                        <li class="server child">
                            <div class="tree-node"></div>
                            <div class="server-info child-info">
                                <p class="name"><a href="/#servers/{{id}}">{{name}}</a></p>
                                <p class="num-primaries"><span class="highlight">{{num_primaries}}</span>
                                    {{#if has_primaries}}
                                    <a href="#" data-id="{{id}}" class="show_primary_link">{{pluralize_noun "primary" num_primaries}}</a>
                                    {{else}}
                                    {{pluralize_noun "primary" num_primaries}}
                                    {{/if}}
                                </p>
                                <p class="num-secondaries"><span class="highlight">{{num_secondaries}}</span>
                                    {{#if has_secondaries}}
                                    <a href="#" data-id="{{id}}" class="show_secondary_link">{{pluralize_noun "secondary" num_secondaries}}</a>
                                    {{else}}
                                    {{pluralize_noun "secondary" num_secondaries}}
                                    {{/if}}
                                </p>
                                <p class="num-keys">
                                    {{#if keys_ready}}
                                        <span class="highlight">~{{num_keys}}</span> {{pluralize_noun "document" num_keys}}
                                    {{else}}
                                        <span class="highlight">N/A</span> documents  
                                    {{/if}}
                                </p>
                            </div>
                        </li>
                    {{/each}}
                </ul>
            </li>
        {{/each}}
    </ul>
    {{else}}
    <div class="no_element">
        No server contains data for this table.
    </div>
    {{/if}}
    <div class="popup_container">haha</div>
</script>

<script id="popup_content-template" type="text/x-handlebars-template">
    <a class="close" href="#">&times;</a>
    <div class="arrow_left"></div>
    <div class="arrow_left_overlay"></div>
    <div class="inner_content">
        {{#if type_is_master}}
        <h4>List of primary shards</h4>
        {{/if}}
        {{#if type_is_secondary}}
        <h4>List of secondary shards</h4>
        {{/if}}
        <ul class="shards_list">
            {{#each shards}}
            <li><span class="name">{{name}}:</span> ~{{#if keys_ready}}{{keys}} documents{{/if}}</li>
            {{/each}}
        </ul>
    </div>
</script>
