<commit_before><!--
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at https://mozilla.org/MPL/2.0/.
Copyright (c) 2014 Mozilla Corporation
-->

<template name="mozdefhealth">
    <div class="container">
        <div id="charts" class="row">
            <div class="fluid">
                <div id="ringChart-EPS" class="col-md-6 text-center"><h5 class="upperwhite" id="total-EPS">EPS: </h5></div>
                <div id="ringChart-LoadAverage" class="col-md-6 text-center" ><h5 class="upperwhite">Load Average</h5></div>
            </div>
        </div>
        <h6 class="upperwhite">
            {{#if currentUser}}
                {{currentUser.profile.email}}
            {{/if}}
        </h6>
        <h6 class="upperwhite lastupdate">Last update: </h6>
        <table class="table table-striped table-hover table-condensed">
        <thead>
            <tr>
                <td>ES Cluster Name</td>
                <td>Cluster Status</td>
                <td>Nodes</td>
                <td>Data Nodes</td>
                <td>Active Shards</td>
                <td>Active Primary Shards</td>
                <td>Relocating Shards</td>
                <td>Initializing Shards</td>
                <td >Unassigned Shards</td>
            </tr>
        </thead>
        <tbody>
            {{#each esclusterhealthitems}}
                {{>esclusterHealthTableItem}}
            {{/each}}
        </tbody>
        </table>

        <table class="table table-striped  table-hover table-condensed">
        <thead>
            <tr>
                <td>Frontend Node</td>
                <td>Load Average</td>
                <td>Queue</td>
                <td>Messages Ready</td>
                <td>Messages Unacknowledged</td>
                <td>EPS IN</td>
                <td>EPS to ElasticSearch</td>
            </tr>
        </thead>
        <tbody>
            {{#each frontendhealthitems}}
                {{>frontendHealthTableItem}}
            {{/each}}
        </tbody>
        </table>

        <table class="table table-striped  table-hover table-condensed">
        <thead>
            <tr>
                <td>SQS Queues</td>
                <td>Queue</td>
                <td>Messages Ready</td>
                <td>Messages In Flight</td>
                <td>Messages Delayed</td>
            </tr>
        </thead>
        <tbody>
            {{#each sqsstatsitems}}
                {{>sqsStatsTableItem}}
            {{/each}}
        </tbody>
        </table>


        <table class="table table-striped  table-hover table-condensed">
        <thead>
            <tr>
                <td>ES Node</td>
                <td>CPU %</td>
                <td>Load Average</td>
                <td>JVM Memory %</td>
                <td>GC Old (s)</td>
                <td>Disk Free (GB)</td>
                <td>Disk Total (GB)</td>
            </tr>
        </thead><commit_msg>Add check to display SQS stats table if set is populated (#1655)<commit_after><!--
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at https://mozilla.org/MPL/2.0/.
Copyright (c) 2014 Mozilla Corporation
-->

<template name="mozdefhealth">
    <div class="container">
        <div id="charts" class="row">
            <div class="fluid">
                <div id="ringChart-EPS" class="col-md-6 text-center"><h5 class="upperwhite" id="total-EPS">EPS: </h5></div>
                <div id="ringChart-LoadAverage" class="col-md-6 text-center" ><h5 class="upperwhite">Load Average</h5></div>
            </div>
        </div>
        <h6 class="upperwhite">
            {{#if currentUser}}
                {{currentUser.profile.email}}
            {{/if}}
        </h6>
        <h6 class="upperwhite lastupdate">Last update: </h6>
        <table class="table table-striped table-hover table-condensed">
        <thead>
            <tr>
                <td>ES Cluster Name</td>
                <td>Cluster Status</td>
                <td>Nodes</td>
                <td>Data Nodes</td>
                <td>Active Shards</td>
                <td>Active Primary Shards</td>
                <td>Relocating Shards</td>
                <td>Initializing Shards</td>
                <td >Unassigned Shards</td>
            </tr>
        </thead>
        <tbody>
            {{#each esclusterhealthitems}}
                {{>esclusterHealthTableItem}}
            {{/each}}
        </tbody>
        </table>

        <table class="table table-striped  table-hover table-condensed">
        <thead>
            <tr>
                <td>Frontend Node</td>
                <td>Load Average</td>
                <td>Queue</td>
                <td>Messages Ready</td>
                <td>Messages Unacknowledged</td>
                <td>EPS IN</td>
                <td>EPS to ElasticSearch</td>
            </tr>
        </thead>
        <tbody>
            {{#each frontendhealthitems}}
                {{>frontendHealthTableItem}}
            {{/each}}
        </tbody>
        </table>

        {{#if sqsstatsitems.count}}
        <table class="table table-striped  table-hover table-condensed">
        <thead>
            <tr>
                <td>SQS Queues</td>
                <td>Queue</td>
                <td>Messages Ready</td>
                <td>Messages In Flight</td>
                <td>Messages Delayed</td>
            </tr>
        </thead>
        <tbody>
            {{#each sqsstatsitems}}
                {{>sqsStatsTableItem}}
            {{/each}}
        </tbody>
        </table>
        {{/if}}

        <table class="table table-striped  table-hover table-condensed">
        <thead>
            <tr>
                <td>ES Node</td>
                <td>CPU %</td>
                <td>Load Average</td>
                <td>JVM Memory %</td>
                <td>GC Old (s)</td>
                <td>Disk Free (GB)</td>
                <td>Disk Total (GB)</td>
            </tr>
        </thead>
{'fraction_non_alphanumeric': 0.1420640104506858, 'fraction_numerical': 0.006531678641410843, 'mean_word_length': 1.3851246105919004, 'pattern_counts': {'":': 0, '<': 211, '<?xml version=': 0, '>': 217, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3605045', 'n_tokens_mistral': 1885, 'n_tokens_neox': 1749, 'n_words': 405}