{% extends 'timeseer.html' %}

{% from 'macros.html' import menu_back, visualize_series_name %}

{% block menu %}
{{ menu_back(url_for('.show_optimization', optimizationid=optimization.db_id, sourcename=source_name)) }}
{% endblock %}

{% block main %}
<div class="ts-section py-3 my-3">
    <h2 class="h4">Remove compression optimization</h2>
    <p class="h6 text-break">
        <a href="{{ url_for('prepare.tags', seriesid=optimization.series.series_id) }}">
            {{ visualize_series_name(optimization.series.name) }}
        </a>
        <small class="text-muted">{{ optimization.series.source }}</small>
    </p>
</div>

<div class="pt-3 my-3">
    <form method="POST" action="{{ url_for('.remove_optimization', sourcename=source_name) }}">
        <input type="hidden" name="optimizationid" value="{{ optimization.db_id }}">
        <div class="btn-toolbar">
            <button type="submit" class="btn btn-primary me-2">
                Yes
            </button>
            <a class="btn btn-secondary" href="{{ url_for('.show_optimization', optimizationid=optimization.db_id, sourcename=source_name) }}">
                Cancel
            </a>
        </div>
    </form>
</div>
{% endblock %}
