diff options
author | Alexander Sulfrian <alexander.sulfrian@fu-berlin.de> | 2018-03-21 17:58:08 +0100 |
---|---|---|
committer | Alexander Sulfrian <alexander.sulfrian@fu-berlin.de> | 2018-03-21 18:11:44 +0100 |
commit | 483b6c8676f1b195f0b14ab54de732fbe0f5b684 (patch) | |
tree | 016d554bf1d65dda1db0493a6aa068b4ee7d990b /src/lib/Bcfg2 | |
parent | e586c4236efbb6b639895839f123cb847d69180b (diff) | |
download | bcfg2-483b6c8676f1b195f0b14ab54de732fbe0f5b684.tar.gz bcfg2-483b6c8676f1b195f0b14ab54de732fbe0f5b684.tar.bz2 bcfg2-483b6c8676f1b195f0b14ab54de732fbe0f5b684.zip |
Reporting: Fix syntax of "cycle" templatetag
The backwords compatible syntax was removed in 1.10. The "new" syntax is
available since 11 years [1] and was already available in django 1.0 [2].
> Support for the syntax of {% cycle %} that uses comma-separated
> arguments is removed. [3]
[1]: https://code.djangoproject.com/ticket/208
[2]: https://github.com/django/django/commit/09145d2e5f
[3]: https://docs.djangoproject.com/en/2.0/releases/1.10/#features-removed-in-1-10
Diffstat (limited to 'src/lib/Bcfg2')
9 files changed, 12 insertions, 12 deletions
diff --git a/src/lib/Bcfg2/Reporting/templates/clients/detail.html b/src/lib/Bcfg2/Reporting/templates/clients/detail.html index 4258fc11d..5a638f2b1 100644 --- a/src/lib/Bcfg2/Reporting/templates/clients/detail.html +++ b/src/lib/Bcfg2/Reporting/templates/clients/detail.html @@ -73,7 +73,7 @@ span.history_links a { </div> <table id='groups_table' class='entry_list' style='display: none'> {% endif %} - <tr class='{% cycle listview,listview_alt %}'> + <tr class='{% cycle 'listview' 'listview_alt' %}'> <td class='entry_list_type'>{{group}}</td> </tr> {% if forloop.last %} @@ -91,7 +91,7 @@ span.history_links a { </div> <table id='bundles_table' class='entry_list' style='display: none'> {% endif %} - <tr class='{% cycle listview,listview_alt %}'> + <tr class='{% cycle 'listview' 'listview_alt' %}'> <td class='entry_list_type'>{{bundle}}</td> </tr> {% if forloop.last %} @@ -109,7 +109,7 @@ span.history_links a { </div> <table id='{{entry_type}}_table' class='entry_list'> {% for entry in entry_list %} - <tr class='{% cycle listview,listview_alt %}'> + <tr class='{% cycle 'listview' 'listview_alt' %}'> <td class='entry_list_type'>{{entry.entry_type}}</td> <td><a href="{% url "reports_item" entry.class_name entry.pk interaction.pk %}"> {{entry.name}}</a></td> @@ -128,7 +128,7 @@ span.history_links a { </div> <table id='failures_table' class='entry_list' style='display: none'> {% for failure in interaction.failures.all %} - <tr class='{% cycle listview,listview_alt %}'> + <tr class='{% cycle 'listview' 'listview_alt' %}'> <td class='entry_list_type'>{{failure.entry_type}}</td> <td><a href="{% url "reports_item" failure.class_name failure.pk interaction.pk %}"> {{failure.name}}</a></td> diff --git a/src/lib/Bcfg2/Reporting/templates/clients/detailed-list.html b/src/lib/Bcfg2/Reporting/templates/clients/detailed-list.html index 56594554c..65c53a76c 100644 --- a/src/lib/Bcfg2/Reporting/templates/clients/detailed-list.html +++ b/src/lib/Bcfg2/Reporting/templates/clients/detailed-list.html @@ -21,7 +21,7 @@ <td class='right_column_wide'>{% sort_link 'server' 'Server' %}</td> </tr> {% for entry in entry_list %} - <tr class='{% cycle listview,listview_alt %}'> + <tr class='{% cycle 'listview' 'listview_alt' %}'> <td class='left_column'><a href='{% url "reports_client_detail_pk" hostname=entry.client.name pk=entry.id %}'>{{ entry.client.name }}</a></td> <td class='right_column' style='width:75px'><a href='{% add_url_filter state=entry.state %}' class='{{entry|determine_client_state}}'>{{ entry.state }}</a></td> diff --git a/src/lib/Bcfg2/Reporting/templates/clients/manage.html b/src/lib/Bcfg2/Reporting/templates/clients/manage.html index 2379cfe6a..3f080c52e 100644 --- a/src/lib/Bcfg2/Reporting/templates/clients/manage.html +++ b/src/lib/Bcfg2/Reporting/templates/clients/manage.html @@ -21,7 +21,7 @@ <td class='right_column_narrow'>Manage</td> </tr> {% for client in clients %} - <tr class='{% cycle listview,listview_alt %}'> + <tr class='{% cycle 'listview' 'listview_alt' %}'> <td><span id="{{ client.name }}"> </span> <span id="ttag-{{ client.name }}"> </span> <span id="s-ttag-{{ client.name }}"> </span> diff --git a/src/lib/Bcfg2/Reporting/templates/config_items/common.html b/src/lib/Bcfg2/Reporting/templates/config_items/common.html index 1445182be..8c2df8db1 100644 --- a/src/lib/Bcfg2/Reporting/templates/config_items/common.html +++ b/src/lib/Bcfg2/Reporting/templates/config_items/common.html @@ -28,7 +28,7 @@ <table id='table_{{ type_name }}' class='entry_list'> <tr style='text-align: left'><th>Type</th><th>Name</th><th>Count</th><th>Reason</th></tr> {% for item in type_list %} - <tr class='{% cycle listview,listview_alt %}'> + <tr class='{% cycle 'listview' 'listview_alt' %}'> <td>{{ item.ENTRY_TYPE }}</td> <td><a href='{% url "reports_entry" item.class_name item.pk %}'>{{ item.name }}</a></td> <td>{{ item.num_entries }}</td> diff --git a/src/lib/Bcfg2/Reporting/templates/config_items/entry_status.html b/src/lib/Bcfg2/Reporting/templates/config_items/entry_status.html index 160d9c738..4d9c42391 100644 --- a/src/lib/Bcfg2/Reporting/templates/config_items/entry_status.html +++ b/src/lib/Bcfg2/Reporting/templates/config_items/entry_status.html @@ -17,7 +17,7 @@ <tr style='text-align: left' ><th>Name</th><th>Timestamp</th><th>State</th><th>Reason</th></tr> {% for item, inters in items %} {% for inter in inters %} - <tr class='{% cycle listview,listview_alt %}'> + <tr class='{% cycle 'listview' 'listview_alt' %}'> <td><a href='{% url "reports_client_detail" hostname=inter.client.name %}'>{{inter.client.name}}</a></td> <td><a href='{% url "reports_client_detail_pk" hostname=inter.client.name pk=inter.pk %}' style="white-space: nowrap;"> {{inter.timestamp|date:"SHORT_DATETIME_FORMAT"|safe}} diff --git a/src/lib/Bcfg2/Reporting/templates/config_items/listing.html b/src/lib/Bcfg2/Reporting/templates/config_items/listing.html index 1ae82dab5..b8fba61ce 100644 --- a/src/lib/Bcfg2/Reporting/templates/config_items/listing.html +++ b/src/lib/Bcfg2/Reporting/templates/config_items/listing.html @@ -21,7 +21,7 @@ <table id='table_{{ type_name }}' class='entry_list'> <tr style='text-align: left' ><th>Name</th><th>Count</th><th>Reason</th></tr> {% for entry in type_data %} - <tr class='{% cycle listview,listview_alt %}'> + <tr class='{% cycle 'listview' 'listview_alt' %}'> <td><a href='{% url "reports_entry" entry.class_name entry.pk %}'>{{entry.name}}</a></td> <td>{{entry.num_entries}}</td> <td><a href='{% url "reports_item" entry.class_name entry.pk %}'>{{entry.short_list|join:","}}</a></td> diff --git a/src/lib/Bcfg2/Reporting/templates/displays/summary.html b/src/lib/Bcfg2/Reporting/templates/displays/summary.html index 53f504c15..a9082aeee 100644 --- a/src/lib/Bcfg2/Reporting/templates/displays/summary.html +++ b/src/lib/Bcfg2/Reporting/templates/displays/summary.html @@ -30,7 +30,7 @@ hide_tables[{{ forloop.counter0 }}] = "table_{{ summary.name }}"; <table id='table_{{ summary.name }}' class='entry_list'> {% for node in summary.nodes|sort_interactions_by_name %} - <tr class='{% cycle listview,listview_alt %}'> + <tr class='{% cycle 'listview' 'listview_alt' %}'> <td><a href='{% url "reports_client_detail_pk" hostname=node.client.name pk=node.id %}'>{{ node.client.name }}</a></td> </tr> {% endfor %} diff --git a/src/lib/Bcfg2/Reporting/templates/displays/timing.html b/src/lib/Bcfg2/Reporting/templates/displays/timing.html index 2d24fc1c2..69d56b62f 100644 --- a/src/lib/Bcfg2/Reporting/templates/displays/timing.html +++ b/src/lib/Bcfg2/Reporting/templates/displays/timing.html @@ -23,7 +23,7 @@ <td>Total</td> </tr> {% for metric in metrics|dictsort:"name" %} - <tr class='{% cycle listview,listview_alt %}'> + <tr class='{% cycle 'listview' 'listview_alt' %}'> <td><a style='font-size: 100%' href='{% url "reports_client_detail" hostname=metric.name %}'>{{ metric.name }}</a></td> {% for mitem in metric|build_metric_list %} diff --git a/src/lib/Bcfg2/Reporting/templates/widgets/interaction_list.inc b/src/lib/Bcfg2/Reporting/templates/widgets/interaction_list.inc index 90c5152ba..1dbcbf3f1 100644 --- a/src/lib/Bcfg2/Reporting/templates/widgets/interaction_list.inc +++ b/src/lib/Bcfg2/Reporting/templates/widgets/interaction_list.inc @@ -14,7 +14,7 @@ <td class='right_column_wide'>Server</td> </tr> {% for entry in entry_list %} - <tr class='{% cycle listview,listview_alt %}'> + <tr class='{% cycle 'listview' 'listview_alt' %}'> <td class='left_column'><a href='{% url "reports_client_detail_pk" hostname=entry.client.name pk=entry.id %}' class="white-space: nowrap;"> {{ entry.timestamp|date:"SHORT_DATETIME_FORMAT"|safe }} </a></td> |