<commit_before>{% load i18n %}

<div data-bind="foreach: { data: graphConfig.currentCharts, as: 'chart' }">
    <br/>
    <p>
        {% trans 'Chart Title' %}: <span data-bind="text: chart.title"></span>
    </p>
    <p>
        <span>{% trans 'Graph type' %}:</span>
        <select type="text" data-bind="
            options: report.graphConfig.allGraphTypes,
            value: report.graphConfig.getCurrentGraphConfig(chart.chart_id).graph_type
        "></select>
    </p>
    <p>
        {% trans 'Configuration' %}:
        <div data-bind="foreach: { data: report.graphConfig.getCurrentGraphConfig(chart.chart_id).config.keyValuePairs, as: 'keyValuePair' }">
            <p>
                <input type="text" data-bind="value: keyValuePair.key">
                <i class="icon-arrow-right"></i>
                <input type="text" data-bind="value: keyValuePair.value">
            </p>
        </div>
        <button class="btn" data-bind="click: report.graphConfig.getCurrentGraphConfig(chart.chart_id).config.addConfig">
            <i class="icon-plus"></i>
            {% trans "Add Configuration Item" %}
        </button>
    </p>
    <div data-bind="foreach: { data: report.graphConfig.getCurrentGraphConfig(chart.chart_id).chart_series, as: 'series' }">
        <p>
            {% trans 'Series Configuration' %}:
            <span data-bind="text: series"></span>
            <div data-bind="foreach: { data: report.graphConfig.getCurrentGraphConfig(chart.chart_id).series_configs[series].keyValuePairs, as: 'keyValuePair' }">
                <p>
                    <input type="text" data-bind="value: keyValuePair.key">
                    <i class="icon-arrow-right"></i>
                    <input type="text" data-bind="value: keyValuePair.value">
                </p>
            </div>
            <button class="btn" data-bind="click: report.graphConfig.getCurrentGraphConfig(chart.chart_id).series_configs[series].addConfig">
                <i class="icon-plus"></i>
                {% trans "Add Series Configuration Item" %}
            </button>
        </p>
    </div>
    <div data-bind="subscribeGraphs: report.graphConfig.addSubscribersToSaveButton()"></div>
</div><commit_msg>add ability to remove graph and series configs<commit_after>{% load i18n %}

<div data-bind="foreach: { data: graphConfig.currentCharts, as: 'chart' }">
    <br/>
    <p>
        {% trans 'Chart Title' %}: <span data-bind="text: chart.title"></span>
    </p>
    <p>
        <span>{% trans 'Graph type' %}:</span>
        <select type="text" data-bind="
            options: report.graphConfig.allGraphTypes,
            value: report.graphConfig.getCurrentGraphConfig(chart.chart_id).graph_type
        "></select>
    </p>
    <p>
        {% trans 'Configuration' %}:
        <div data-bind="foreach: { data: report.graphConfig.getCurrentGraphConfig(chart.chart_id).config.keyValuePairs, as: 'keyValuePair' }">
            <p>
                <input type="text" data-bind="value: keyValuePair.key">
                <i class="icon-arrow-right"></i>
                <input type="text" data-bind="value: keyValuePair.value">
                <i class="fa fa-remove icon-remove icon-blue" style="cursor: pointer;" data-bind="click: keyValuePair.remove"></i>
            </p>
        </div>
        <button class="btn" data-bind="click: report.graphConfig.getCurrentGraphConfig(chart.chart_id).config.addConfig">
            <i class="icon-plus"></i>
            {% trans "Add Configuration Item" %}
        </button>
    </p>
    <div data-bind="foreach: { data: report.graphConfig.getCurrentGraphConfig(chart.chart_id).chart_series, as: 'series' }">
        <p>
            {% trans 'Series Configuration' %}:
            <span data-bind="text: series"></span>
            <div data-bind="foreach: { data: report.graphConfig.getCurrentGraphConfig(chart.chart_id).series_configs[series].keyValuePairs, as: 'keyValuePair' }">
                <p>
                    <input type="text" data-bind="value: keyValuePair.key">
                    <i class="icon-arrow-right"></i>
                    <input type="text" data-bind="value: keyValuePair.value">
                    <i class="fa fa-remove icon-remove icon-blue" style="cursor: pointer;" data-bind="click: keyValuePair.remove"></i>
                </p>
            </div>
            <button class="btn" data-bind="click: report.graphConfig.getCurrentGraphConfig(chart.chart_id).series_configs[series].addConfig">
                <i class="icon-plus"></i>
                {% trans "Add Series Configuration Item" %}
            </button>
        </p>
    </div>
    <div data-bind="subscribeGraphs: report.graphConfig.addSubscribersToSaveButton()"></div>
</div>
{'fraction_non_alphanumeric': 0.16077850645229533, 'fraction_numerical': 0.0008462026655383964, 'mean_word_length': 2.3916786226685796, 'pattern_counts': {'":': 0, '<': 101, '<?xml version=': 0, '>': 101, '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': '5565197', 'n_tokens_mistral': 1416, 'n_tokens_neox': 1385, 'n_words': 258}