<commit_before>{% extends "reports_core/base_template_new.html" %}
{% load i18n %}
{% load hq_shared_tags %}

{% block head %}
    {{ block.super }}
    {% block reports-css %}
    <link rel="stylesheet" href="{% static 'hqwebapp/js/lib/jquery-ui-datepicker/datepicker-theme/jquery-ui-1.8.17.custom.css' %}" />
    {% endblock %}
{% endblock %}

{% block js %}{{ block.super }}
    <script src="{% static 'hqwebapp/js/lib/jquery-ui-datepicker/jquery-ui-1.8.17.custom.datepicker.min.js' %}"></script>
    <script src="{% static 'hqwebapp/js-custom/hq.legacy.js' %}"></script>
    <script src="{% static 'reports/javascripts/reports.config.js' %}"></script>
    <script src="{% static 'reports/ko/saved_reports.js' %}"></script>
{% endblock %}

{% block js-inline %}{{ block.super }}

    <script type="text/javascript">
        $(function(){
            var $editReportButton = $("#edit-report-link");
            {% if report.spec.report_meta.created_by_builder %}
            gaTrackLink($editReportButton, 'Report Builder', 'Edit Report', '{{ report.spec.report_meta.builder_report_type }}');
            window.analytics.trackWorkflowLink($editReportButton, "Clicked Edit to enter the Report Builder");
            window.analytics.usage("Report Viewer", "View Report", '{{ report.spec.report_meta.builder_report_type }}');
            {% else %}
            gaTrackLink($editReportButton, 'Edit UCR', 'Edit UCR');
            {% endif %}
        });
    </script>


    <script type="text/javascript">
        $(function(){
            // Poll the status of the data source
            var retrying = false;
            (function poll() {
                $.ajax({
                    url: "{% url 'configurable_data_source_status' domain report.spec.config_id %}",
                    dataType: 'json',
                    success: function(data) {
                        if (data.isBuilt){
                            $('#built-warning').addClass('hide');
                            if (retrying){
                                location.reload();
                            } else if ($('#report-filters').find('.control-label').length === 0) {
                                $('#report-filters').submit();
                            }
                        } else {
                            retrying = true;<commit_msg>Add event for applying filters on report builder UCR<commit_after>{% extends "reports_core/base_template_new.html" %}
{% load i18n %}
{% load hq_shared_tags %}

{% block head %}
    {{ block.super }}
    {% block reports-css %}
    <link rel="stylesheet" href="{% static 'hqwebapp/js/lib/jquery-ui-datepicker/datepicker-theme/jquery-ui-1.8.17.custom.css' %}" />
    {% endblock %}
{% endblock %}

{% block js %}{{ block.super }}
    <script src="{% static 'hqwebapp/js/lib/jquery-ui-datepicker/jquery-ui-1.8.17.custom.datepicker.min.js' %}"></script>
    <script src="{% static 'hqwebapp/js-custom/hq.legacy.js' %}"></script>
    <script src="{% static 'reports/javascripts/reports.config.js' %}"></script>
    <script src="{% static 'reports/ko/saved_reports.js' %}"></script>
{% endblock %}

{% block js-inline %}{{ block.super }}

    <script type="text/javascript">
        $(function(){
            var $editReportButton = $("#edit-report-link");

            {% if report.spec.report_meta.created_by_builder %}

            var $applyFiltersButton = $("#apply-filters");
            $applyFiltersButton.click(function(){
                window.analytics.usage("Report Viewer", "Apply Filters", '{{ report.spec.report_meta.builder_report_type }}');
            });

            gaTrackLink($editReportButton, 'Report Builder', 'Edit Report', '{{ report.spec.report_meta.builder_report_type }}');
            window.analytics.trackWorkflowLink($editReportButton, "Clicked Edit to enter the Report Builder");
            window.analytics.usage("Report Viewer", "View Report", '{{ report.spec.report_meta.builder_report_type }}');

            {% else %}
            gaTrackLink($editReportButton, 'Edit UCR', 'Edit UCR');
            {% endif %}
        });
    </script>


    <script type="text/javascript">
        $(function(){
            // Poll the status of the data source
            var retrying = false;
            (function poll() {
                $.ajax({
                    url: "{% url 'configurable_data_source_status' domain report.spec.config_id %}",
                    dataType: 'json',
                    success: function(data) {
                        if (data.isBuilt){
                            $('#built-warning').addClass('hide');
                            if (retrying){
                                location.reload();
                            } else if ($('#report-filters').find('.control-label').length === 0) {
                                $('#report-filters').submit();
                            }
                        } else {
                            retrying = true;
{'fraction_non_alphanumeric': 0.16160193197826525, 'fraction_numerical': 0.004427450191185349, 'mean_word_length': 1.9885748647023451, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, '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': '1374203', 'n_tokens_mistral': 1455, 'n_tokens_neox': 1340, 'n_words': 256}