From 47c4a15adf452ec1fd8f73330fbc5232239b78ea Mon Sep 17 00:00:00 2001 From: Gabriel Dugny Date: Mon, 30 Sep 2024 10:48:41 +0200 Subject: [PATCH] chore: add Djade formatter --- .pre-commit-config.yaml | 6 ++++ pdm.lock | 22 +++++++++++- pyproject.toml | 1 + .../confluence/templates/oncall_team.xml | 6 ++-- .../templates/pages/runbook_list.html | 7 ++-- .../firefighter/templates/admin/base.html | 5 +-- .../firefighter/templates/admin/login.html | 4 +-- .../admin/send_message_conversation.html | 8 ++--- .../templates/incidents/errors/base.html | 3 +- .../incidents/templates/incidents/filter.html | 36 +++++++++---------- .../incidents/templates/incidents/table.html | 5 ++- .../incidents/table/priority_column.html | 2 +- .../widgets/grouped_checkbox_nested.html | 2 +- .../incidents/templates/layouts/index.html | 6 ++-- .../layouts/partials/created_at_help.html | 1 - .../templates/layouts/partials/footer.html | 10 +++--- .../templates/layouts/partials/header.html | 27 +++++++------- .../layouts/partials/incident_card.html | 10 +++--- .../layouts/partials/incident_metrics.html | 1 - .../layouts/partials/incident_timeline.html | 10 +++--- ...incident_update_key_events_view_modal.html | 2 +- .../partial_table_list_paginated.html | 13 ++++--- .../templates/layouts/partials/table.html | 4 +-- .../templates/layouts/partials/user_card.html | 3 +- .../templates/layouts/view_filters.html | 14 ++++---- .../templates/pages/component_detail.html | 8 ++--- .../templates/pages/component_list.html | 8 ++--- .../incidents/templates/pages/dashboard.html | 6 ++-- .../templates/pages/docs_metrics.html | 26 +++++++------- .../templates/pages/incident_create.html | 3 +- .../templates/pages/incident_detail.html | 26 +++++++------- .../templates/pages/incident_list.html | 6 ++-- .../pages/incident_role_types_detail.html | 2 +- .../pages/incident_role_types_list.html | 4 +-- .../templates/pages/incident_statistics.html | 8 ++--- .../pages/incident_statistics_partial.html | 18 ++++------ .../incident_update_key_events_form.html | 2 +- .../templates/pages/user_detail.html | 8 ++--- .../templates/pages/oncall_list.html | 10 +++--- .../templates/pages/oncall_trigger.html | 2 +- 40 files changed, 181 insertions(+), 164 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index eb2abdbb..4ad46cac 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -35,3 +35,9 @@ repos: - id: djhtml # djcss disabled for now - id: djjs + + - repo: https://github.com/adamchainz/djade-pre-commit + rev: "1.1.1" + hooks: + - id: djade + args: [--target-version, "4.2"] diff --git a/pdm.lock b/pdm.lock index b2d420ee..4a9774e1 100644 --- a/pdm.lock +++ b/pdm.lock @@ -5,7 +5,7 @@ groups = ["default", "dev", "docs", "tests", "types", "docs-img"] strategy = ["cross_platform", "static_urls"] lock_version = "4.4.1" -content_hash = "sha256:78d7bf38ebaa89258e7bb1b21cda0ca3f2bd8ac00b15ffe635c160be97b02890" +content_hash = "sha256:c8ba6bf158df102eff3f0965f68c1532639c51746ac4413d47ccda3c8f56e900" [[package]] name = "aiohappyeyeballs" @@ -813,6 +813,26 @@ files = [ {url = "https://files.pythonhosted.org/packages/c9/7a/cef76fd8438a42f96db64ddaa85280485a9c395e7df3db8158cfec1eee34/dill-0.3.8-py3-none-any.whl", hash = "sha256:c36ca9ffb54365bdd2f8eb3eff7d2a21237f8452b57ace88b1ac615b7e815bd7"}, ] +[[package]] +name = "djade" +version = "1.1.1" +requires_python = ">=3.8" +summary = "A Django template formatter." +files = [ + {url = "https://files.pythonhosted.org/packages/10/98/6cf6f602a71d56b6de6add73609e3e508823be3285d405e22f85e92e63b7/djade-1.1.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:91db10a4e3d3f8741a1b37d0652001bc7a66d931a679f1beaf43c5f23d8f2b93"}, + {url = "https://files.pythonhosted.org/packages/1d/37/54a6046d3a5d0112a0deb9e7c50fd143507d457826e82320c6cf75f359a3/djade-1.1.1-py3-none-macosx_11_0_arm64.whl", hash = "sha256:ab75f5624334e585abd5e4805e615ce2cedfc0c595f2c1d0c19a80b1e4293939"}, + {url = "https://files.pythonhosted.org/packages/37/91/0bdfc4dc4477679eaa9e2c3e331d811636d5bcc4429ecab2fef49ccfd19b/djade-1.1.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4d6bac6af64a162ec3d9ccbb79dfdfd26b23991300df84585b155a65cf8a673d"}, + {url = "https://files.pythonhosted.org/packages/3f/21/8ad254199204a4f22191bbeea647753a207fb624966eb790351ae40126ea/djade-1.1.1-py3-none-win_amd64.whl", hash = "sha256:9b251e41e71b5f53beaa60b562cbe94bc8cd87d9225ac50929d1023bad26f19a"}, + {url = "https://files.pythonhosted.org/packages/48/97/bcf24390305da60c65e9d3ad00441ac26771dd022ec3dea0ff7b8e16f60d/djade-1.1.1-py3-none-musllinux_1_1_aarch64.whl", hash = "sha256:c95dff339f8ac01b0c72f2c59e9e4323f01376ae325e413c0231ae23782063c8"}, + {url = "https://files.pythonhosted.org/packages/4d/cc/79d676f56cf62ed416d3968f3056355a5948516179e61db120e4bda5bb38/djade-1.1.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ebd9ceba20a385aea9d978e9f544c2424efe032075bd0f508cab52f465f0f65a"}, + {url = "https://files.pythonhosted.org/packages/59/5f/74e35900d309c60d4aa68b59996ce7cdddbf6efd695b809f595273995f43/djade-1.1.1-py3-none-win_arm64.whl", hash = "sha256:7f6d3ea968d6e186a634c9a6cfcae8cb432c26775042e5c8fcce9feb74adccd9"}, + {url = "https://files.pythonhosted.org/packages/73/e3/bbc255469f9538a6dfaf375e6a44b3627f22a390140f25359503ac3c53c3/djade-1.1.1-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3d473a37c6f793ff9ca7caaf7504e8ebf112eeb2881f16ce20102f2da4b90aab"}, + {url = "https://files.pythonhosted.org/packages/80/af/d925194f80e54a46820e0032cb4f7e6abdae191749d6c53263603a9191cf/djade-1.1.1-py3-none-musllinux_1_1_x86_64.whl", hash = "sha256:2b29b6d0bf1d870700091897bd9d4c12d72be6d7222c644ab8d5fd7d4846b36f"}, + {url = "https://files.pythonhosted.org/packages/9c/aa/3ee09ff41eab9f90d45327095ecc855d71c3d69f11e94a56674e47052cf4/djade-1.1.1-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:91f18951314c744deb0bd811a3334920c471fa0665f13933a1daa0123173387e"}, + {url = "https://files.pythonhosted.org/packages/ae/90/1ef62c65930efb89bbcb29e6e1658b691ceb4cee3965a7cdf6317a6f71f0/djade-1.1.1-py3-none-win32.whl", hash = "sha256:ddf79f75f6bb14bd4971b6ef6e80f9f2ffe747dc80d6b9c56d26b37d0a329e70"}, + {url = "https://files.pythonhosted.org/packages/c0/9e/8d2008e90776a56c4c3efa603c96c1fa55a98433a270a57942cf780189be/djade-1.1.1.tar.gz", hash = "sha256:afbc1859e7a113f84bdf7d7f1e633aa32ba8a9a067a3d188cd9282c069854c44"}, +] + [[package]] name = "django" version = "4.2.16" diff --git a/pyproject.toml b/pyproject.toml index 8d0d8856..61fa3132 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -183,6 +183,7 @@ dev = [ "django-watchfiles>=0.1.0", "ruff>=0.1.6", "mypy-to-codeclimate>=0.0.3", + "djade>=1.1.1", ] tests = [ "pytest>=7.4.3", diff --git a/src/firefighter/confluence/templates/oncall_team.xml b/src/firefighter/confluence/templates/oncall_team.xml index 859c384c..1f0a5894 100644 --- a/src/firefighter/confluence/templates/oncall_team.xml +++ b/src/firefighter/confluence/templates/oncall_team.xml @@ -1,6 +1,6 @@ -

On-call:

+

On-call:

diff --git a/src/firefighter/confluence/templates/pages/runbook_list.html b/src/firefighter/confluence/templates/pages/runbook_list.html index 2bc5608a..15809dce 100644 --- a/src/firefighter/confluence/templates/pages/runbook_list.html +++ b/src/firefighter/confluence/templates/pages/runbook_list.html @@ -8,13 +8,12 @@ Loading... -{% endblock%} +{% endblock page_title %} {% block page_actions %} {{ block.super }} -{% endblock%} - +{% endblock page_actions %} {% block page_content %} {% include "./../layouts/partials/partial_table_list_paginated.html" %} -{% endblock%} +{% endblock page_content %} diff --git a/src/firefighter/firefighter/templates/admin/base.html b/src/firefighter/firefighter/templates/admin/base.html index e606d7de..b76d41cd 100644 --- a/src/firefighter/firefighter/templates/admin/base.html +++ b/src/firefighter/firefighter/templates/admin/base.html @@ -2,7 +2,8 @@ {% load static %} {% block extrahead %}{{ block.super }} -{% endblock%} +{% endblock extrahead %} + {% block extrastyle %}{{ block.super }} -{% endblock %} +{% endblock extrastyle %} diff --git a/src/firefighter/firefighter/templates/admin/login.html b/src/firefighter/firefighter/templates/admin/login.html index ccff6787..50670750 100644 --- a/src/firefighter/firefighter/templates/admin/login.html +++ b/src/firefighter/firefighter/templates/admin/login.html @@ -2,7 +2,7 @@ {% block content %}
- Log in with SSO + Log in with SSO
{% if request.GET.error %}

@@ -11,4 +11,4 @@ {% endif %} {{ block.super }} -{% endblock %} +{% endblock content %} diff --git a/src/firefighter/firefighter/templates/admin/send_message_conversation.html b/src/firefighter/firefighter/templates/admin/send_message_conversation.html index 5e390e38..50d0335e 100644 --- a/src/firefighter/firefighter/templates/admin/send_message_conversation.html +++ b/src/firefighter/firefighter/templates/admin/send_message_conversation.html @@ -1,5 +1,5 @@ {% extends "admin/base_site.html" %} -{% load i18n l10n admin_urls static %} +{% load admin_urls i18n l10n static %} {% comment %} TODO Proper form and HTML. {% endcomment %} @@ -7,7 +7,7 @@ {{ block.super }} {{ media }} -{% endblock %} +{% endblock extrahead %} {% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} send-message-conversation send-message-selected-conversation{% endblock %} @@ -18,7 +18,7 @@ › {{ opts.verbose_name_plural|capfirst }} › {% translate 'Send messages on conversations' %} -{% endblock %} +{% endblock breadcrumbs %} {% block content %}

Targeted conversations

@@ -42,4 +42,4 @@

Targeted conversations

{% translate "Cancel, take me back" %} -{% endblock %} +{% endblock content %} diff --git a/src/firefighter/incidents/templates/incidents/errors/base.html b/src/firefighter/incidents/templates/incidents/errors/base.html index 32d30ad8..4e91362b 100644 --- a/src/firefighter/incidents/templates/incidents/errors/base.html +++ b/src/firefighter/incidents/templates/incidents/errors/base.html @@ -1,4 +1,5 @@ {% extends '../../layouts/index.html' %} + {% block content %}
@@ -18,4 +19,4 @@

{{ title }}

-{% endblock%} +{% endblock content %} diff --git a/src/firefighter/incidents/templates/incidents/filter.html b/src/firefighter/incidents/templates/incidents/filter.html index 9f3aadd8..9c643848 100644 --- a/src/firefighter/incidents/templates/incidents/filter.html +++ b/src/firefighter/incidents/templates/incidents/filter.html @@ -27,16 +27,16 @@
{% render_field filter.form.metrics_period class="input-ff" placeholder="e.g. 2022" %}
- {%if filter.form.cleaned_data.metrics_period %} - {% with date_gte=filter.form.metrics_period.metrics_period.0 date_lte=filter.form.metrics_period.metrics_period.1%} - {%if date_gte and date_lte %} + {% if filter.form.cleaned_data.metrics_period %} + {% with date_gte=filter.form.metrics_period.metrics_period.0 date_lte=filter.form.metrics_period.metrics_period.1 %} + {% if date_gte and date_lte %}
-

From: {{date_gte|date:"Y/m/d H:i:s e"}}

-

To: {{date_lte|date:"Y/m/d H:i:s e"}}

- {%if date_str %}

({{ date_str }})

{% endif %} +

From: {{ date_gte|date:"Y/m/d H:i:s e" }}

+

To: {{ date_lte|date:"Y/m/d H:i:s e" }}

+ {% if date_str %}

({{ date_str }})

{% endif %}
{% endif %} - {% endwith%} + {% endwith %} {% endif %} {% elif filter_field == "created_at" %} @@ -50,24 +50,24 @@
{% render_field filter.form.created_at class="input-ff" placeholder="2021/Q4 - 2022/Q1" %}
- {%if filter.form.cleaned_data.created_at %} - {% with date_gte=filter.form.cleaned_data.created_at.0 date_lte=filter.form.cleaned_data.created_at.1%} - {%if date_gte and date_lte %} + {% if filter.form.cleaned_data.created_at %} + {% with date_gte=filter.form.cleaned_data.created_at.0 date_lte=filter.form.cleaned_data.created_at.1 %} + {% if date_gte and date_lte %}
-

From: {{date_gte|date:"Y/m/d H:i:s e"}}

-

To: {{date_lte|date:"Y/m/d H:i:s e"}}

- {%if date_str %}

({{ date_str }})

{% endif %} +

From: {{ date_gte|date:"Y/m/d H:i:s e" }}

+

To: {{ date_lte|date:"Y/m/d H:i:s e" }}

+ {% if date_str %}

({{ date_str }})

{% endif %}
{% endif %} - {% endwith%} + {% endwith %} {% endif %} {% else %} - {% include "./widgets/form_container.html" with filter_form=field%} - {% endif%} - {% endwith%} + {% include "./widgets/form_container.html" with filter_form=field %} + {% endif %} + {% endwith %} {% endif %} - {% endfor%} + {% endfor %}
diff --git a/src/firefighter/incidents/templates/incidents/table.html b/src/firefighter/incidents/templates/incidents/table.html index d68e96a0..8ec86698 100644 --- a/src/firefighter/incidents/templates/incidents/table.html +++ b/src/firefighter/incidents/templates/incidents/table.html @@ -1,5 +1,4 @@ -{% load django_tables2 %} -{% load i18n %} +{% load django_tables2 i18n %} {% block table-wrapper %}
{% block table %} @@ -11,7 +10,7 @@ {% for column in table.columns %} {% if column.orderable %} - {% if "desc" in column.attrs.th.class%}↓ {% elif "asc" in column.attrs.th.class%}↑ {% endif%}{{ column.header }} + {% if "desc" in column.attrs.th.class %}↓ {% elif "asc" in column.attrs.th.class %}↑ {% endif %}{{ column.header }} {% else %} {{ column.header }} {% endif %} diff --git a/src/firefighter/incidents/templates/incidents/table/priority_column.html b/src/firefighter/incidents/templates/incidents/table/priority_column.html index b986b73e..e0817a10 100644 --- a/src/firefighter/incidents/templates/incidents/table/priority_column.html +++ b/src/firefighter/incidents/templates/incidents/table/priority_column.html @@ -2,7 +2,7 @@
{% with incident=record %} {% include "../../layouts/partials/priority_icon.html" %} - {% endwith%} + {% endwith %}
{{ record.priority }} diff --git a/src/firefighter/incidents/templates/incidents/widgets/grouped_checkbox_nested.html b/src/firefighter/incidents/templates/incidents/widgets/grouped_checkbox_nested.html index b1215e86..80be7150 100644 --- a/src/firefighter/incidents/templates/incidents/widgets/grouped_checkbox_nested.html +++ b/src/firefighter/incidents/templates/incidents/widgets/grouped_checkbox_nested.html @@ -71,7 +71,7 @@

- +
diff --git a/src/firefighter/incidents/templates/layouts/index.html b/src/firefighter/incidents/templates/layouts/index.html index 01d06191..cb4477d3 100644 --- a/src/firefighter/incidents/templates/layouts/index.html +++ b/src/firefighter/incidents/templates/layouts/index.html @@ -6,9 +6,9 @@ - {{ page_title }}{% if APP_DISPLAY_NAME %} | {{APP_DISPLAY_NAME}}{% endif %} + {{ page_title }}{% if APP_DISPLAY_NAME %} | {{ APP_DISPLAY_NAME }}{% endif %} {% block head %} - {% endblock %} + {% endblock head %} {% if PLAUSIBLE_DOMAIN and PLAUSIBLE_SCRIPT_URL %} {% endif %} @@ -18,7 +18,7 @@ {% include "./partials/header.html" %}
{% block content %} - {% endblock %} + {% endblock content %}
{% include "./partials/footer.html" %} diff --git a/src/firefighter/incidents/templates/layouts/partials/created_at_help.html b/src/firefighter/incidents/templates/layouts/partials/created_at_help.html index 03dbc603..5e419065 100644 --- a/src/firefighter/incidents/templates/layouts/partials/created_at_help.html +++ b/src/firefighter/incidents/templates/layouts/partials/created_at_help.html @@ -1,4 +1,3 @@ - {% component "modal" autoplay=False %} {% fill "modal_header" %} Time Range syntax diff --git a/src/firefighter/incidents/templates/layouts/partials/footer.html b/src/firefighter/incidents/templates/layouts/partials/footer.html index 3093b20c..20fcb364 100644 --- a/src/firefighter/incidents/templates/layouts/partials/footer.html +++ b/src/firefighter/incidents/templates/layouts/partials/footer.html @@ -1,6 +1,4 @@ -{% load static %} - -{% load simple_menu %} +{% load simple_menu static %} {% generate_menu %}
@@ -69,7 +70,8 @@

{{key_event.name|capfirst}}

-{% endblock %} +{% endblock content %} + {% block head %} -{% endblock %} +{% endblock head %} diff --git a/src/firefighter/incidents/templates/pages/incident_create.html b/src/firefighter/incidents/templates/pages/incident_create.html index dd50208a..4abadb85 100644 --- a/src/firefighter/incidents/templates/pages/incident_create.html +++ b/src/firefighter/incidents/templates/pages/incident_create.html @@ -1,4 +1,5 @@ {% extends '../layouts/index.html' %} + {% block content %}
@@ -48,4 +49,4 @@

Recommendations:

-{% endblock %} +{% endblock content %} diff --git a/src/firefighter/incidents/templates/pages/incident_detail.html b/src/firefighter/incidents/templates/pages/incident_detail.html index 0c39ecc6..3eb5f43d 100644 --- a/src/firefighter/incidents/templates/pages/incident_detail.html +++ b/src/firefighter/incidents/templates/pages/incident_detail.html @@ -10,10 +10,10 @@

#{{ incident.id }} - {{ incident.title }}

{% if incident.created_at is not none %} -

Reported by {{ incident.created_by.full_name }},

+

Reported by {{ incident.created_by.full_name }},

{% endif %}

- {% include "../layouts/partials/priority_pill.html" with priority=incident.priority %} + {% include "../layouts/partials/priority_pill.html" with priority=incident.priority %} {% include "../layouts/partials/status_pill.html" with status=incident.status IncidentStatus=IncidentStatus only %}

@@ -41,7 +41,7 @@

Description
-
{{ incident.description | urlize | linebreaksbr}}
+
{{ incident.description|urlize|linebreaksbr }}
Priority
@@ -102,7 +102,7 @@

{% component "card" card_title="External resources" id="incident-integrations" %} {% fill "card_content" %} - {% if not incident.conversation and not incident.postmortem_for and pagerduty_incident_set.count == 0%} + {% if not incident.conversation and not incident.postmortem_for and pagerduty_incident_set.count == 0 %}

No external resources for this incident. @@ -153,7 +153,7 @@

Post-mortem

-

{{incident.postmortem_for.name |truncatechars:70}}

+

{{ incident.postmortem_for.name|truncatechars:70 }}

{% endif %} @@ -164,7 +164,7 @@

Jira Incident Ticket

-

{{incident.jira_ticket.key |truncatechars:70}}

+

{{ incident.jira_ticket.key|truncatechars:70 }}

{% endif %} @@ -175,7 +175,7 @@

PagerDuty Incident

-

{{pagerduty_incident.summary |truncatechars:70}}

+

{{ pagerduty_incident.summary|truncatechars:70 }}

{% endfor %} @@ -201,10 +201,10 @@

  • - {{impact.impact_type.emoji}} -

    {{impact.impact_type}}

    + {{ impact.impact_type.emoji }} +

    {{ impact.impact_type }}

    -

    {{impact.impact_level.value_label}}: {{impact.impact_level.name}}

    +

    {{ impact.impact_level.value_label }}: {{ impact.impact_level.name }}

  • {% empty %} @@ -221,8 +221,8 @@

    - {% for cost in incident.incident_cost_set.all%} -
  • {{cost.cost_type.name}}: {{cost.amount|intcomma}} {{cost.currency}}
  • + {% for cost in incident.incident_cost_set.all %} +
  • {{ cost.cost_type.name }}: {{ cost.amount|intcomma }} {{ cost.currency }}
  • {% endfor %} {% endfill %} @@ -236,4 +236,4 @@

    Loading... -{% endblock%} +{% endblock page_title %} {% block page_actions %} {{ block.super }} @@ -22,8 +22,8 @@ Related statistics -{% endblock%} +{% endblock page_actions %} {% block page_content %} {% include "layouts/partials/partial_table_list_paginated.html" %} -{% endblock%} +{% endblock page_content %} diff --git a/src/firefighter/incidents/templates/pages/incident_role_types_detail.html b/src/firefighter/incidents/templates/pages/incident_role_types_detail.html index 1d1438c1..c38f46cb 100644 --- a/src/firefighter/incidents/templates/pages/incident_role_types_detail.html +++ b/src/firefighter/incidents/templates/pages/incident_role_types_detail.html @@ -83,4 +83,4 @@

    Best Pr -{% endblock %} +{% endblock content %} diff --git a/src/firefighter/incidents/templates/pages/incident_role_types_list.html b/src/firefighter/incidents/templates/pages/incident_role_types_list.html index f4ab75a4..dc007a51 100644 --- a/src/firefighter/incidents/templates/pages/incident_role_types_list.html +++ b/src/firefighter/incidents/templates/pages/incident_role_types_list.html @@ -16,7 +16,7 @@

    Incident Ro
    {% for incident_role_type in incident_role_types_list %} -{% endblock%} +{% endblock page_title %} {% block page_actions %} {{ block.super }} @@ -117,8 +117,8 @@ View list -{% endblock%} +{% endblock page_actions %} {% block page_content %} {% include "pages/incident_statistics_partial.html" %} -{% endblock %} +{% endblock page_content %} diff --git a/src/firefighter/incidents/templates/pages/incident_statistics_partial.html b/src/firefighter/incidents/templates/pages/incident_statistics_partial.html index 23a1cce0..ed12b707 100644 --- a/src/firefighter/incidents/templates/pages/incident_statistics_partial.html +++ b/src/firefighter/incidents/templates/pages/incident_statistics_partial.html @@ -1,7 +1,3 @@ - - - -

    @@ -46,12 +42,12 @@

    plugins: [ChartDataLabels], data: { datasets: [{ - data: {{ incident_by_status_chart.values | safe }}, + data: {{ incident_by_status_chart.values|safe }}, label: 'Statuses', hoverOffset: 4, backgroundColor: ['#991B1B', '#FCD34D', '#D97706', '#065F46', '#3730A3', '#059669'], }], - labels: {{ incident_by_status_chart.keys | safe }} + labels: {{ incident_by_status_chart.keys|safe }} } }; if (window.onload && window.donught_status) { @@ -74,15 +70,15 @@

    plugins: [ChartDataLabels, Chart.registry.getPlugin('tooltip')], data: { datasets: [{ - data: {{incident_by_domain_chart.values | safe }}, - label: {{ incident_by_domain_chart.keys | safe}}, + data: {{ incident_by_domain_chart.values|safe }}, + label: {{ incident_by_domain_chart.keys|safe }}, hoverOffset: 4, backgroundColor: ['#6D28D9', '#991B1B', '#B45309', '#FBBF24', '#1E40AF', '#F472B6', '#6EE7B7'], datalabels: { anchor: 'middle' } }], - labels: {{ incident_by_domain_chart.keys | safe}} + labels: {{ incident_by_domain_chart.keys|safe }} }, }; @@ -101,7 +97,7 @@

    plugins: [ChartDataLabels], data: { datasets: [{ - data: {{ incident_by_priority_chart.values | safe }}, + data: {{ incident_by_priority_chart.values|safe }}, label: 'Domain', hoverOffset: 4, backgroundColor: ['#991B1B', '#B45309', '#FBBF24', '#1E40AF', '#F472B6', '#6EE7B7'], @@ -109,7 +105,7 @@

    anchor: 'middle' } }], - labels: {{ incident_by_priority_chart.keys | safe }} + labels: {{ incident_by_priority_chart.keys|safe }} }, }; if (window.onload && window.donught_priority) { diff --git a/src/firefighter/incidents/templates/pages/incident_update_key_events_form.html b/src/firefighter/incidents/templates/pages/incident_update_key_events_form.html index 2d63d120..57bba1d2 100644 --- a/src/firefighter/incidents/templates/pages/incident_update_key_events_form.html +++ b/src/firefighter/incidents/templates/pages/incident_update_key_events_form.html @@ -13,4 +13,4 @@

    {% include "../layouts/partials/incident_update_key_events_view.html" %}
    -{% endblock %} +{% endblock content %} diff --git a/src/firefighter/incidents/templates/pages/user_detail.html b/src/firefighter/incidents/templates/pages/user_detail.html index 77ac2631..15d81706 100644 --- a/src/firefighter/incidents/templates/pages/user_detail.html +++ b/src/firefighter/incidents/templates/pages/user_detail.html @@ -8,7 +8,7 @@
    - {% component "avatar" user=target_user %}{% endcomponent %} + {% component "avatar" user=target_user %}{% endcomponent %}
    @@ -35,7 +35,7 @@

    {{ target_user.full_name }}

    @@ -90,7 +90,7 @@

    @{{ target_user.slack_user.username }} {% else %}
    Ø
    - {% endif%} + {% endif %}

    Pagerduty
    @@ -107,4 +107,4 @@

    {% block page_title %} On-call overview - {% endblock%} + {% endblock page_title %}

    @@ -19,7 +19,7 @@

    Trigger on-call {% endif %} - {% endblock%} + {% endblock page_actions %}

    {% if messages %} @@ -41,7 +41,7 @@

    {% for escalation_policy in oncalls %}

    - {{ escalation_policy.0.name }} ({{ escalation_policy.1 | length }}) + {{ escalation_policy.0.name }} ({{ escalation_policy.1|length }})

      @@ -59,7 +59,7 @@

      {% if oncall.end %}

      {{ oncall.end|timeuntil }} left - Until + Until

      @@ -81,4 +81,4 @@

    -{% endblock%} +{% endblock content %} diff --git a/src/firefighter/pagerduty/templates/pages/oncall_trigger.html b/src/firefighter/pagerduty/templates/pages/oncall_trigger.html index 375a4897..44c01a2b 100644 --- a/src/firefighter/pagerduty/templates/pages/oncall_trigger.html +++ b/src/firefighter/pagerduty/templates/pages/oncall_trigger.html @@ -13,4 +13,4 @@

    {% include "../partials/trigger_oncall_form_view.html" %}
    -{% endblock %} +{% endblock content %}