<commit_before><div class="module">
    <div class="module-heading">
        Queue Reader Status <span *ngIf="statusLastRefreshed">(as of {{statusLastRefreshed | date:'HH:mm:ss'}})</span>

        <div class="pull-right">

            <label for="showMissingQueueReadersOnEmptyQueues" class="control-label">Show Warnings on Empty Queues</label>
            <input type="checkbox" id="showMissingQueueReadersOnEmptyQueues" [(ngModel)]="queueReaderStatusService.showMissingQueueReadersOnEmptyQueues" name="showMissingQueueReadersOnEmptyQueues" (ngModelChange)="refreshStatus()">

            <button class="btn btn-sm btn-success" [disabled]="refreshingQueueReaderStatus" (click)="refreshStatus()">Refresh&nbsp;<span class="fa fa-sm fa-refresh fa-refresh-animate" *ngIf="refreshingQueueReaderStatus"></span></button>
        </div>
    </div>
    <div class="module-body">


        <div class="row">
            <div class="form-group col-md-12">
                <div class="table">
                    <table class="table table-striped table-condensed">
                        <thead>
                            <tr>
                                <th *ngFor="let exchangeName of routingExchangeNames" class="col-md-3">
                                    {{exchangeName}}
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr class="hover-box show-child-on-hover" *ngFor="let routingKey of routingKeys">
                                <td *ngFor="let exchangeName of routingExchangeNames" >


                                    <span *ngIf="isValidQueue(exchangeName, routingKey)">
                                        <b>{{routingKey}}  </b>
                                        <span class="fa fa-sm fa-refresh fa-refresh-animate" *ngIf="refreshingRabbitQueueStatus">
                                        </span>
                                        <span *ngIf="!refreshingRabbitQueueStatus">
                                            {{getQueueSize(exchangeName, routingKey)}}
                                        </span>

                                        <div *ngIf="refreshingQueueReaderStatus">
                                            <div class="fa fa-sm fa-refresh fa-refresh-animate">
                                            </div>
                                        </div>
                                        <div *ngIf="!refreshingQueueReaderStatus">
                                            <div *ngFor="let status of getStatusesForExchangeAndKey(exchangeName, routingKey)">
                                                <span [ngStyle]="getCellColour(status)">
                                                    {{status.hostName}}
                                                    {{getStatusMemoryDesc(status)}}

                                                    <span *ngIf="isStatusTooOld(status)">
                                                        <span class="label label-danger"><span class="fa fa-warning" ngbTooltip="{{status.isBusyDetail}}"></span> {{getStatusAgeDesc(status)}}</span>
                                                    </span>

                                                    <span *ngIf="!isStatusTooOld(status)">

                                                        <!-- if busy, show the play icon and when it was busy from -->
                                                        <span *ngIf="status.isBusy" class="fa fa-play" ngbTooltip="{{status.isBusyDetail}}"></span>
                                                        <span *ngIf="status.isBusy" class="text-muted"> {{getStatusBusyDesc(status)}}</span>

                                                        <!-- if not doing anything show a pause icon -->
                                                        <span *ngIf="!status.isBusy" class="fa fa-pause"></span>
                                                    </span>

                                                </span>
                                            </div>
                                        </div>

                                    </span>
                                    <span class="text-muted" *ngIf="!isValidQueue(exchangeName, routingKey)">
                                        {{routingKey}}  n/a
                                    </span>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>

        <div class="row" *ngIf="!refreshingRabbitQueueStatus">
            <div class="form-group col-md-12">
                <div class="table">
                    <table class="table table-striped table-condensed">
                        <thead>
                            <tr>
                                <th class="col-md-2">Server</th>
                                <th class="col-md-1">CPU</th>
                                <th class="col-md-3">Memory</th>
                                <th class="col-md-6">Queue Readers</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr class="hover-box show-child-on-hover" *ngFor="let hostName of hostNames">
                                <td [ngStyle]="getCellColourForHostName(hostName)">{{hostName}}</td>
                                <td>
                                    {{getCpuUsage(hostName)}}
                                </td>
                                <td>
                                    {{getMemoryUsage(hostName)}}
                                    <div>
                                        <code>{{getMemoryUsageGraph(hostName)}}</code>
                                    </div>
                                </td>
                                <td>
                                    <div *ngFor="let status of getStatusesForHostName(hostName)">

                                        {{status.queueName}}
                                        {{getStatusMemoryDesc(status)}}
                                        <span *ngIf="isStatusTooOld(status)">
                                            <span class="label label-danger"><span class="fa fa-warning" ngbTooltip="{{status.isBusyDetail}}"></span> ({{getStatusAgeDesc(status)}})</span>
                                        </span>

                                        <span *ngIf="!isStatusTooOld(status)">
                                            <span *ngIf="status.isBusy" class="fa fa-play" ngbTooltip="{{status.isBusyDetail}}"></span>
                                            <span *ngIf="!status.isBusy" class="fa fa-pause"></span>
                                        </span>

                                        <span *ngIf="refreshingRabbitQueueStatus">
                                            <span class="fa fa-sm fa-refresh fa-refresh-animate">
                                            </span>
                                        </span>
                                        <span *ngIf="!refreshingRabbitQueueStatus">
                                            {{getQueueSizeForQueueName(status.queueName)}}
                                        </span>
                                    </div>
                                </td>

                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>

    </div>
</div>

<commit_msg>Updating DDS-UI Queue Reader page to show how long each QR has been busy<commit_after><div class="module">
    <div class="module-heading">
        Queue Reader Status <span *ngIf="statusLastRefreshed">(as of {{statusLastRefreshed | date:'HH:mm:ss'}})</span>

        <div class="pull-right">

            <label for="showMissingQueueReadersOnEmptyQueues" class="control-label">Show Warnings on Empty Queues</label>
            <input type="checkbox" id="showMissingQueueReadersOnEmptyQueues" [(ngModel)]="queueReaderStatusService.showMissingQueueReadersOnEmptyQueues" name="showMissingQueueReadersOnEmptyQueues" (ngModelChange)="refreshStatus()">

            <button class="btn btn-sm btn-success" [disabled]="refreshingQueueReaderStatus" (click)="refreshStatus()">Refresh&nbsp;<span class="fa fa-sm fa-refresh fa-refresh-animate" *ngIf="refreshingQueueReaderStatus"></span></button>
        </div>
    </div>
    <div class="module-body">


        <div class="row">
            <div class="form-group col-md-12">
                <div class="table">
                    <table class="table table-striped table-condensed">
                        <thead>
                            <tr>
                                <th *ngFor="let exchangeName of routingExchangeNames" class="col-md-3">
                                    {{exchangeName}}
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr class="hover-box show-child-on-hover" *ngFor="let routingKey of routingKeys">
                                <td *ngFor="let exchangeName of routingExchangeNames" >


                                    <span *ngIf="isValidQueue(exchangeName, routingKey)">
                                        <b>{{routingKey}}  </b>
                                        <span class="fa fa-sm fa-refresh fa-refresh-animate" *ngIf="refreshingRabbitQueueStatus">
                                        </span>
                                        <span *ngIf="!refreshingRabbitQueueStatus">
                                            {{getQueueSize(exchangeName, routingKey)}}
                                        </span>

                                        <div *ngIf="refreshingQueueReaderStatus">
                                            <div class="fa fa-sm fa-refresh fa-refresh-animate">
                                            </div>
                                        </div>
                                        <div *ngIf="!refreshingQueueReaderStatus">
                                            <div *ngFor="let status of getStatusesForExchangeAndKey(exchangeName, routingKey)">
                                                <span [ngStyle]="getCellColour(status)">
                                                    {{status.hostName}}
                                                    {{getStatusMemoryDesc(status)}}

                                                    <span *ngIf="isStatusTooOld(status)">
                                                        <span class="label label-danger"><span class="fa fa-warning" ngbTooltip="{{status.isBusyDetail}}"></span> {{getStatusAgeDesc(status)}}</span>
                                                    </span>

                                                    <span *ngIf="!isStatusTooOld(status)">

                                                        <!-- if busy, show the play icon and when it was busy from -->
                                                        <span *ngIf="status.isBusy" class="fa fa-play" ngbTooltip="{{status.isBusyDetail}}"></span>
                                                        <span *ngIf="status.isBusy" class="text-muted"> {{getStatusBusyDesc(status)}}</span>

                                                        <!-- if not doing anything show a pause icon -->
                                                        <span *ngIf="!status.isBusy" class="fa fa-pause"></span>
                                                    </span>

                                                </span>
                                            </div>
                                        </div>

                                    </span>
                                    <span class="text-muted" *ngIf="!isValidQueue(exchangeName, routingKey)">
                                        {{routingKey}}  n/a
                                    </span>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>

        <div class="row" *ngIf="!refreshingRabbitQueueStatus">
            <div class="form-group col-md-12">
                <div class="table">
                    <table class="table table-striped table-condensed">
                        <thead>
                            <tr>
                                <th class="col-md-2">Server</th>
                                <th class="col-md-1">CPU</th>
                                <th class="col-md-3">Memory</th>
                                <th class="col-md-6">Queue Readers</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr class="hover-box show-child-on-hover" *ngFor="let hostName of hostNames">
                                <td [ngStyle]="getCellColourForHostName(hostName)">{{hostName}}</td>
                                <td>
                                    {{getCpuUsage(hostName)}}
                                </td>
                                <td>
                                    {{getMemoryUsage(hostName)}}
                                    <div>
                                        <code>{{getMemoryUsageGraph(hostName)}}</code>
                                    </div>
                                </td>
                                <td>
                                    <div *ngFor="let status of getStatusesForHostName(hostName)">

                                        {{status.queueName}}
                                        {{getStatusMemoryDesc(status)}}
                                        <span *ngIf="isStatusTooOld(status)">
                                            <span class="label label-danger"><span class="fa fa-warning" ngbTooltip="{{status.isBusyDetail}}"></span> ({{getStatusAgeDesc(status)}})</span>
                                        </span>

                                        <span *ngIf="!isStatusTooOld(status)">
                                            <span *ngIf="status.isBusy" class="fa fa-play" ngbTooltip="{{status.isBusyDetail}}"></span>
                                            <span *ngIf="status.isBusy" class="text-muted"> {{getStatusBusyDesc(status)}}</span>

                                            <span *ngIf="!status.isBusy" class="fa fa-pause"></span>
                                        </span>

                                        <span *ngIf="refreshingRabbitQueueStatus">
                                            <span class="fa fa-sm fa-refresh fa-refresh-animate">
                                            </span>
                                        </span>
                                        <span *ngIf="!refreshingRabbitQueueStatus">
                                            {{getQueueSizeForQueueName(status.queueName)}}
                                        </span>
                                    </div>
                                </td>

                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>

    </div>
</div>


{'fraction_non_alphanumeric': 0.10807148848312795, 'fraction_numerical': 0.0011613652493709273, 'mean_word_length': 0.8699481240197853, 'pattern_counts': {'":': 0, '<': 263, '<?xml version=': 0, '>': 263, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 186, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1696282', 'n_tokens_mistral': 3300, 'n_tokens_neox': 3079, 'n_words': 571}