<commit_before>﻿@using StackExchange.Opserver.Data.Redis
@using StackExchange.Opserver.Views.Redis
@model DashboardModel
@{
    Model.Prep();
    var groups = Model.ReplicationGroups;
}
@helper ServerRole(RedisInstance instance)
    {
        switch (instance.Role)
        {
            case RedisInfo.RedisInstanceRole.Master:
                <strong>Master</strong>
                break;
            case RedisInfo.RedisInstanceRole.Slave:
                if (instance.IsSlaving)
                {
                    <b class="text-success">Slaving</b>
                }
                else
                {
                    <span>Slave</span>
                }
                break;
            default:
                <span class="text-muted">Unknown</span>
                break;
        }
}
@helper CommonVersionHeader()
    {
        if (Model.AllVersionsMatch)
        {
            @:(Version @Model.CommonVersion)
        }
}
@helper SectionHeader(List<RedisInstance> instances, string label, bool defaultHeaders = true, bool countChain = false)
    {
        var total = countChain ? instances.Union(instances.SelectMany(h => h.GetAllSlavesInChain())).ToList() : instances;
        <tbody>
            <tr class="category-row page-header">
                <th colspan="@(Model.AllVersionsMatch ? 8 : 9)">
                    <h5><commit_msg>Guards<commit_after>﻿@using StackExchange.Opserver.Data.Redis
@using StackExchange.Opserver.Views.Redis
@model DashboardModel
@{
    Model.Prep();
    var groups = Model.ReplicationGroups;
}
@helper ServerRole(RedisInstance instance)
    {
        switch (instance.Role)
        {
            case RedisInfo.RedisInstanceRole.Master:
                <strong>Master</strong>
                break;
            case RedisInfo.RedisInstanceRole.Slave:
                if (instance.IsSlaving)
                {
                    <b class="text-success">Slaving</b>
                }
                else
                {
                    <span>Slave</span>
                }
                break;
            default:
                <span class="text-muted">Unknown</span>
                break;
        }
}
@helper CommonVersionHeader()
    {
        if (Model.AllVersionsMatch)
        {
            @:(Version @Model.CommonVersion)
        }
}
@helper SectionHeader(List<RedisInstance> instances, string label, bool defaultHeaders = true, bool countChain = false)
    {
        var total = countChain ? instances.Union(instances.SelectMany(h => h.GetAllSlavesInChain())).Where(i => i != null).ToList() : instances;
        <tbody>
            <tr class="category-row page-header">
                <th colspan="@(Model.AllVersionsMatch ? 8 : 9)">
                    <h5>
{'fraction_non_alphanumeric': 0.10843373493975904, 'fraction_numerical': 0.002190580503833516, 'mean_word_length': 1.6601941747572815, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 32, 'https://': 0, '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': '5823049', 'n_tokens_mistral': 777, 'n_tokens_neox': 728, 'n_words': 129}