<commit_before>﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script src="Scripts/jquery-1.6.4.js"></script>
    <script src="Scripts/jquery.signalR-2.1.2.js"></script>

    <script src="Scripts/rx.js"></script>
    <script src="Scripts/rx.async.js"></script>
    <script src="Scripts/rx.binding.js"></script>
    <script src="Scripts/rx.coincidence.js"></script>

    <script src="Scripts/relmah/relmah.js"></script>

    <script>
        $(function () {

            var r       = relmah("http://localhost:9474/signalr"),
                $apps   = $('#apps'),
                $groups = $('#groups');

            //streams

            var
                errors     = r.getErrors(),
                apps       = r.getApplications(),
                errorTypes = errors.groupBy(function (e) {
                    return e.Error.Type;
                });

            //subscriptions

            errorTypes
                .subscribe(function (type) {
                    var g = $('<li/>');
                    $groups.append(g);

                    type
                        .scan(0, function (a) { return a + 1; })
                        .subscribe(function (e) { g.text(type.key + ': ' + e); });
                });

            apps
                .filter(function (a) { return !a.removed; })
                .subscribe(function (app) {
                    var name = app.name;
                    $('<li/>')
                        .attr('id', 'app-' + name)
                        .append($('<p/>').text(name))
                        .append($('<ul/>').attr('id', 'errors-' + name))
                        .appendTo($apps);
                    $('#app-' + name).css({ 'background-color': 'yellow' });
                });

            apps
                .filter(function (a) { return a.removed; })
                .subscribe(function (app) {
                    $('#app-' + app.name).css({ 'background-color': 'grey' });
                });

            errors
                .subscribe(function (e) {
                    $('<li/>')
                        .append($('<span/>').text(e.Error.Message))
                        .prependTo($('#errors-' + e.SourceId));
                });

            //startup
            $('#login').click(function () {
                $('#user').attr("disabled", "disabled");
                $('#login').hide();

                r.start({ 'user': $('#user').val() });
            });
        });
    </script>
</head>
    <body>
        <div>
            <input type="text" id="user" /><button id="login">Login</button>
        </div><commit_msg>Removing user name, we use Windows auth for now<commit_after>﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script src="Scripts/jquery-1.6.4.js"></script>
    <script src="Scripts/jquery.signalR-2.1.2.js"></script>

    <script src="Scripts/rx.js"></script>
    <script src="Scripts/rx.async.js"></script>
    <script src="Scripts/rx.binding.js"></script>
    <script src="Scripts/rx.coincidence.js"></script>

    <script src="Scripts/relmah/relmah.js"></script>

    <script>
        $(function () {

            var r       = relmah("http://localhost:9474/signalr"),
                $apps   = $('#apps'),
                $groups = $('#groups');

            //streams

            var
                errors     = r.getErrors(),
                apps       = r.getApplications(),
                errorTypes = errors.groupBy(function (e) {
                    return e.Error.Type;
                });

            //subscriptions

            errorTypes
                .subscribe(function (type) {
                    var g = $('<li/>');
                    $groups.append(g);

                    type
                        .scan(0, function (a) { return a + 1; })
                        .subscribe(function (e) { g.text(type.key + ': ' + e); });
                });

            apps
                .filter(function (a) { return !a.removed; })
                .subscribe(function (app) {
                    var name = app.name;
                    if (!$('#app-' + name).length)
                        $('<li/>')
                            .attr('id', 'app-' + name)
                            .append($('<p/>').text(name))
                            .append($('<ul/>').attr('id', 'errors-' + name))
                            .appendTo($apps);
                    $('#app-' + name).css({ 'background-color': 'yellow' });
                });

            apps
                .filter(function (a) { return a.removed; })
                .subscribe(function (app) {
                    $('#app-' + app.name).css({ 'background-color': 'grey' });
                });

            errors
                .subscribe(function (e) {
                    $('<li/>')
                        .append($('<span/>').text(e.Error.Message))
                        .prependTo($('#errors-' + e.SourceId));
                });

            //startup
            $('#login').click(function () {
                $('#user').attr("disabled", "disabled");
                $('#login').hide();

                r.start();
            });
        });
    </script>
</head>
    <body>
        <div>
            <button id="login">Login</button>
        </div>
{'fraction_non_alphanumeric': 0.18328335832083958, 'fraction_numerical': 0.006371814092953523, 'mean_word_length': 1.1899876897825195, 'pattern_counts': {'":': 0, '<': 70, '<?xml version=': 0, '>': 70, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, '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': '4436173', 'n_tokens_mistral': 1538, 'n_tokens_neox': 1413, 'n_words': 241}