From ecd9b9c3fefe7a5dec065f23a6936a601b493f18 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sat, 30 Mar 2024 17:44:24 +0000 Subject: [PATCH 01/20] Update Django to 4.2.11 --- requirements-dev.txt | 7 +++++-- requirements.txt | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index d3dc082..7481d26 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -27,7 +27,9 @@ charset-normalizer==3.1.0 click==8.1.7 # via pip-tools coverage[toml]==7.3.1 - # via pytest-cov + # via + # coverage + # pytest-cov crispy-bulma==0.8.3 # via -r requirements.txt cryptography==41.0.3 @@ -38,7 +40,7 @@ defusedxml==0.7.1 # via # -r requirements.txt # python3-openid -django==4.2.7 +django==4.2.11 # via # -r requirements.txt # crispy-bulma @@ -117,6 +119,7 @@ pyjwt[crypto]==2.6.0 # via # -r requirements.txt # django-allauth + # pyjwt pyproject-hooks==1.0.0 # via build pytest==7.4.2 diff --git a/requirements.txt b/requirements.txt index 5e6ad37..8377c93 100644 --- a/requirements.txt +++ b/requirements.txt @@ -20,7 +20,7 @@ cryptography==41.0.3 # via pyjwt defusedxml==0.7.1 # via python3-openid -django==4.2.7 +django==4.2.11 # via # -r requirements.in # crispy-bulma From a9709ec1e2fd1cf83c3fb440a7a3adc3a3cbd77d Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sat, 30 Mar 2024 17:53:25 +0000 Subject: [PATCH 02/20] Update `cryptography` --- requirements-dev.txt | 13 +------------ requirements.txt | 2 +- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 7481d26..bfd96e5 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -32,7 +32,7 @@ coverage[toml]==7.3.1 # pytest-cov crispy-bulma==0.8.3 # via -r requirements.txt -cryptography==41.0.3 +cryptography==42.0.5 # via # -r requirements.txt # pyjwt @@ -77,8 +77,6 @@ django-tables2-bulma-template==0.2.0 # via -r requirements.txt djangorestframework-stubs==3.14.2 # via django-filter-stubs -exceptiongroup==1.1.3 - # via pytest faker==19.6.1 # via -r requirements-dev.in freezegun==1.2.2 @@ -157,15 +155,6 @@ sqlparse==0.4.4 # via # -r requirements.txt # django -tomli==2.0.1 - # via - # build - # coverage - # django-stubs - # mypy - # pip-tools - # pyproject-hooks - # pytest types-cachetools==5.3.0.6 # via -r requirements-dev.in types-dj-database-url==1.3.0.4 diff --git a/requirements.txt b/requirements.txt index 8377c93..3dfe3d0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -16,7 +16,7 @@ charset-normalizer==3.1.0 # via requests crispy-bulma==0.8.3 # via -r requirements.in -cryptography==41.0.3 +cryptography==42.0.5 # via pyjwt defusedxml==0.7.1 # via python3-openid From 2d14e6d329ed75bd69b6d85505decbcc8bfb2f04 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Tue, 2 Apr 2024 20:55:20 +0100 Subject: [PATCH 03/20] Link to runbook for help --- helpdesk/templates/inc/nav/nav.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/helpdesk/templates/inc/nav/nav.html b/helpdesk/templates/inc/nav/nav.html index 6123097..feb7014 100644 --- a/helpdesk/templates/inc/nav/nav.html +++ b/helpdesk/templates/inc/nav/nav.html @@ -9,7 +9,7 @@ - + \ No newline at end of file diff --git a/helpdesk/templates/inc/nav/nav.html b/helpdesk/templates/inc/nav/nav.html index feb7014..db6be3e 100644 --- a/helpdesk/templates/inc/nav/nav.html +++ b/helpdesk/templates/inc/nav/nav.html @@ -1,68 +1,68 @@ + + + diff --git a/helpdesk/templates/inc/nav/team-tabs.html b/helpdesk/templates/inc/nav/team-tabs.html index 3562898..a89b7c4 100644 --- a/helpdesk/templates/inc/nav/team-tabs.html +++ b/helpdesk/templates/inc/nav/team-tabs.html @@ -13,16 +13,16 @@
  • - - - Comments - - -
  • - - - Timeline - - - + + + Comments + + +
  • + + + Timeline + + + \ No newline at end of file diff --git a/helpdesk/templates/inc/parts/messages.html b/helpdesk/templates/inc/parts/messages.html index 0514a2a..8781062 100644 --- a/helpdesk/templates/inc/parts/messages.html +++ b/helpdesk/templates/inc/parts/messages.html @@ -1,8 +1,8 @@ {% if messages %} {% for message in messages %} -
    - - {{ message }} -
    +
    + + {{ message }} +
    {% endfor %} {% endif %} \ No newline at end of file diff --git a/helpdesk/templates/layouts/base.html b/helpdesk/templates/layouts/base.html index 48a4100..89e0fe8 100644 --- a/helpdesk/templates/layouts/base.html +++ b/helpdesk/templates/layouts/base.html @@ -1,96 +1,96 @@ - - - - {% block title %}{{ SYSTEM_TITLE }}{% endblock %} | {{ SYSTEM_TITLE }} - - - - - - {% block body %} - {% endblock %} - - + \ No newline at end of file diff --git a/helpdesk/templates/layouts/base_hero.html b/helpdesk/templates/layouts/base_hero.html index 0d930c2..6f1eea5 100644 --- a/helpdesk/templates/layouts/base_hero.html +++ b/helpdesk/templates/layouts/base_hero.html @@ -1,7 +1,7 @@ {% extends "layouts/base.html" %} {% block body %} -
    +
    diff --git a/helpdesk/templates/search.html b/helpdesk/templates/search.html index 575e0f9..9c9af58 100644 --- a/helpdesk/templates/search.html +++ b/helpdesk/templates/search.html @@ -6,11 +6,11 @@ {% block title %}Search: {{ q }}{% endblock %} {% block content %} -
    - - - - -
    -{% render_table table %} +
    + + + + +
    + {% render_table table %} {% endblock %} diff --git a/helpdesk/templates/teams/team_detail_about.html b/helpdesk/templates/teams/team_detail_about.html index edb9380..be4818c 100644 --- a/helpdesk/templates/teams/team_detail_about.html +++ b/helpdesk/templates/teams/team_detail_about.html @@ -6,27 +6,27 @@ {% block title %}{{object.tla}}: {{ object.name }}{% endblock %} {% block page_buttons %} - - New Ticket for {{ object.tla }} - + + New Ticket for {{ object.tla }} + {% endblock %} {% block content %} -{% include "inc/nav/team-tabs.html" with active="about" team=object %} -
    -
    -

    Team Name: {{object.name}}

    -

    TLA: {{object.tla}}

    -

    Rookie: {{object.is_rookie}}

    -

    Pit Location: {{object.pit_location}}

    -
    + {% include "inc/nav/team-tabs.html" with active="about" team=object %} +
    +
    +

    Team Name: {{object.name}}

    +

    TLA: {{object.tla}}

    +

    Rookie: {{object.is_rookie}}

    +

    Pit Location: {{object.pit_location}}

    +
    - {% if score_info %} -
    -

    League Position: {{score_info.league_pos}}

    -

    League Points: {{score_info.league_score}}

    -

    Game Points: {{score_info.game_score}}

    + {% if score_info %} +
    +

    League Position: {{score_info.league_pos}}

    +

    League Points: {{score_info.league_score}}

    +

    Game Points: {{score_info.game_score}}

    +
    + {% endif %}
    - {% endif %} -
    {% endblock %} \ No newline at end of file diff --git a/helpdesk/templates/teams/team_detail_comments.html b/helpdesk/templates/teams/team_detail_comments.html index 798fec6..96a601b 100644 --- a/helpdesk/templates/teams/team_detail_comments.html +++ b/helpdesk/templates/teams/team_detail_comments.html @@ -6,32 +6,32 @@ {% block title %}{{object.tla}}: {{ object.name }}{% endblock %} {% block page_buttons %} - - New Ticket for {{ object.tla }} - + + New Ticket for {{ object.tla }} + {% endblock %} {% block content %} -{% include "inc/nav/team-tabs.html" with active="comments" team=object %} -{% for comment in object.comments.all %} -
    -
    -

    {{ comment.created_at }} - {{ comment.author }}

    -
    + {% include "inc/nav/team-tabs.html" with active="comments" team=object %} + {% for comment in object.comments.all %} +
    +
    +

    {{ comment.created_at }} - {{ comment.author }}

    +
    +
    + {{comment.content|linebreaks}} +
    +
    + {% endfor %} +
    - {{comment.content|linebreaks}} +
    + {% csrf_token %} + {{ comment_form | crispy }} +
    + +
    +
    -{% endfor %} -
    -
    -
    - {% csrf_token %} - {{ comment_form | crispy }} -
    - -
    -
    -
    -
    {% endblock %} \ No newline at end of file diff --git a/helpdesk/templates/teams/team_detail_tickets.html b/helpdesk/templates/teams/team_detail_tickets.html index f756934..9cc27b9 100644 --- a/helpdesk/templates/teams/team_detail_tickets.html +++ b/helpdesk/templates/teams/team_detail_tickets.html @@ -6,18 +6,18 @@ {% block title %}{{object.tla}}: {{ object.name }}{% endblock %} {% block page_buttons %} - - - New Ticket for {{ object.tla }} - + + + New Ticket for {{ object.tla }} + {% endblock %} {% block content %} -{% include "inc/nav/team-tabs.html" with active="tickets" team=object %} -
    -
    - {% render_table table %} + {% include "inc/nav/team-tabs.html" with active="tickets" team=object %} +
    +
    + {% render_table table %} +
    -
    -{% include "inc/modals/filter.html" %} + {% include "inc/modals/filter.html" %} {% endblock %} \ No newline at end of file diff --git a/helpdesk/templates/teams/team_detail_timeline.html b/helpdesk/templates/teams/team_detail_timeline.html index c1b36ac..efb4ea4 100644 --- a/helpdesk/templates/teams/team_detail_timeline.html +++ b/helpdesk/templates/teams/team_detail_timeline.html @@ -6,26 +6,26 @@ {% block title %}{{object.tla}}: {{ object.name }}{% endblock %} {% block page_buttons %} - - New Ticket for {{ object.tla }} - + + New Ticket for {{ object.tla }} + {% endblock %} {% block content %} -{% include "inc/nav/team-tabs.html" with active="timeline" team=object %} -
    -

    This page is experimental, full details can be found on individual tickets.

    - {% for entry in entries %} -
    -
    -

    {{entry.entry_type}} {{ entry.entry_timestamp }}

    -
    - {% if entry.entry_content %} -
    - {{entry.entry_content|linebreaks}} + {% include "inc/nav/team-tabs.html" with active="timeline" team=object %} +
    +

    This page is experimental, full details can be found on individual tickets.

    + {% for entry in entries %} +
    +
    +

    {{entry.entry_type}} {{ entry.entry_timestamp }}

    - {% endif %} -
    - {% endfor %} -
    + {% if entry.entry_content %} +
    + {{entry.entry_content|linebreaks}} +
    + {% endif %} +
    + {% endfor %} +
    {% endblock %} \ No newline at end of file diff --git a/helpdesk/templates/teams/team_filter.html b/helpdesk/templates/teams/team_filter.html index 1685130..e9b949c 100644 --- a/helpdesk/templates/teams/team_filter.html +++ b/helpdesk/templates/teams/team_filter.html @@ -6,14 +6,14 @@ {% block title %}Teams{% endblock %} {% block page_buttons %} - + {% endblock %} {% block content %} -
    -
    - {% render_table table %} +
    +
    + {% render_table table %} +
    -
    -{% include "inc/modals/filter.html" %} + {% include "inc/modals/filter.html" %} {% endblock %} \ No newline at end of file diff --git a/helpdesk/templates/tickets/ticket_detail.html b/helpdesk/templates/tickets/ticket_detail.html index 0e0a995..060a345 100644 --- a/helpdesk/templates/tickets/ticket_detail.html +++ b/helpdesk/templates/tickets/ticket_detail.html @@ -2,63 +2,63 @@ {% load crispy_forms_tags %} {% block page_title %} -{{ object.status_name }} -{{ object.title }} #{{object.id}} + {{ object.status_name }} + {{ object.title }} #{{object.id}} {% endblock %} {% block title %}{{ object.title }} #{{object.id}}{% endblock %} {% block page_buttons %} -{% if object.is_escalatable %} -
    - {% csrf_token %} - -
    -{% endif %} - -{% if object.assignee != user %} -
    - {% csrf_token %} - - -
    -{% endif %} - - Edit Details - + {% if object.is_escalatable %} +
    + {% csrf_token %} + +
    + {% endif %} + + {% if object.assignee != user %} +
    + {% csrf_token %} + + +
    + {% endif %} + + Edit Details + {% endblock %} {% block content %} -
    - -
    - {% for event in object.events.all %} - {% if event.new_status == "OP" %} -
    - {% elif event.new_status == "RS" %} -
    - {% else %} -
    - {% endif %} +
    + +
    + {% for event in object.events.all %} + {% if event.new_status == "OP" %} +
    + {% elif event.new_status == "RS" %} +
    + {% else %} +
    + {% endif %}

    {% if event.new_status == "OP" %} @@ -70,9 +70,9 @@ {% endif %} {% if event.assignee_change %} {% if event.assignee_change.user %} - - Assigned to {{ event.assignee_change.user }} + - Assigned to {{ event.assignee_change.user }} {% else %} - - Unassigned + - Unassigned {% endif %} {% endif %} @@ -83,27 +83,27 @@ {{event.comment|linebreaks}} {% endif %}

    -
    - {% endfor %} +
    + {% endfor %} -
    -
    -
    - {% csrf_token %} - {{ comment_form | crispy }} -
    - - {% if object.status != "RS" %} - - {% endif %} - {% if object.status != "OP" %} - - {% endif %} -
    -
    -
    -
    +
    +
    +
    + {% csrf_token %} + {{ comment_form | crispy }} +
    + + {% if object.status != "RS" %} + + {% endif %} + {% if object.status != "OP" %} + + {% endif %} +
    +
    +
    +
    +
    -
    -{% include "inc/modals/assign_ticket.html" %} + {% include "inc/modals/assign_ticket.html" %} {% endblock %} diff --git a/helpdesk/templates/tickets/ticket_form.html b/helpdesk/templates/tickets/ticket_form.html index fdeb0b4..a233f20 100644 --- a/helpdesk/templates/tickets/ticket_form.html +++ b/helpdesk/templates/tickets/ticket_form.html @@ -17,14 +17,14 @@ {% endblock %} {% block content %} -{% if create %} -

    Most tickets should be assigned after they are created so that teams do not skip the queue. Please do not assign tickets to a volunteer unless you know that there are no other teams waiting in the queue.

    -{% else %} -

    If you need to edit something that cannot be edited here, contact an administrator or create a new ticket.

    -{% endif %} -
    - {% csrf_token %} - {{form|crispy}} - -
    + {% if create %} +

    Most tickets should be assigned after they are created so that teams do not skip the queue. Please do not assign tickets to a volunteer unless you know that there are no other teams waiting in the queue.

    + {% else %} +

    If you need to edit something that cannot be edited here, contact an administrator or create a new ticket.

    + {% endif %} +
    + {% csrf_token %} + {{form|crispy}} + +
    {% endblock %} diff --git a/helpdesk/templates/tickets/ticketqueue_assigned.html b/helpdesk/templates/tickets/ticketqueue_assigned.html index f55c5e3..0a0522b 100644 --- a/helpdesk/templates/tickets/ticketqueue_assigned.html +++ b/helpdesk/templates/tickets/ticketqueue_assigned.html @@ -5,13 +5,13 @@ {% block title %}My Tickets{% endblock %} {% block page_buttons %} - + {% endblock %} {% block content %} -
    -
    - {% render_table table %} -
    -{% include "inc/modals/filter.html" %} +
    +
    + {% render_table table %} +
    + {% include "inc/modals/filter.html" %} {% endblock %} \ No newline at end of file diff --git a/helpdesk/templates/tickets/ticketqueue_detail.html b/helpdesk/templates/tickets/ticketqueue_detail.html index af20205..dcd89ff 100644 --- a/helpdesk/templates/tickets/ticketqueue_detail.html +++ b/helpdesk/templates/tickets/ticketqueue_detail.html @@ -5,43 +5,43 @@ {% block title %}Queue: {{ object.name }}{% endblock %} {% block page_buttons %} - - + + New Ticket - + {% endblock %} {% block content %} -
    -
    -
    +
    +
    +
    -
    -
    -

    {{ object.description }}

    - {% render_table table %} +
    +
    +

    {{ object.description }}

    + {% render_table table %} +
    -
    -{% include "inc/modals/filter.html" %} + {% include "inc/modals/filter.html" %} {% endblock %} \ No newline at end of file diff --git a/helpdesk/templates/tickets/tickets_all.html b/helpdesk/templates/tickets/tickets_all.html index 0c5865d..b769558 100644 --- a/helpdesk/templates/tickets/tickets_all.html +++ b/helpdesk/templates/tickets/tickets_all.html @@ -5,16 +5,16 @@ {% block title %}All Tickets{% endblock %} {% block page_buttons %} - - - New Ticket - + + + New Ticket + {% endblock %} {% block content %} -
    -
    - {% render_table table %} -
    -{% include "inc/modals/filter.html" %} +
    +
    + {% render_table table %} +
    + {% include "inc/modals/filter.html" %} {% endblock %} \ No newline at end of file From 134eefa458dfd4e17bb97a6e72b195aab055ebba Mon Sep 17 00:00:00 2001 From: Dan Trickey Date: Fri, 5 Apr 2024 18:05:29 +0100 Subject: [PATCH 17/20] Update Bulma and Font Awesome - Bulma 1.0.0 has dark theme support, which appears to be good enough for this project --- helpdesk/templates/layouts/base.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helpdesk/templates/layouts/base.html b/helpdesk/templates/layouts/base.html index 89e0fe8..34dd2ca 100644 --- a/helpdesk/templates/layouts/base.html +++ b/helpdesk/templates/layouts/base.html @@ -4,8 +4,8 @@ {% block title %}{{ SYSTEM_TITLE }}{% endblock %} | {{ SYSTEM_TITLE }} - - + + From b1967c628487efcff4d734cf5d1a88e1820d240e Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sun, 7 Apr 2024 13:27:15 +0100 Subject: [PATCH 18/20] Only show login with Google link if integration is configured. This now raises an error, where it didn't before --- helpdesk/templates/account/login.html | 8 ++++++-- helpdesk/templates/account/signup_closed.html | 8 ++++++-- helpdesk/templates/socialaccount/login.html | 1 - 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/helpdesk/templates/account/login.html b/helpdesk/templates/account/login.html index b1579a3..788c58d 100644 --- a/helpdesk/templates/account/login.html +++ b/helpdesk/templates/account/login.html @@ -6,6 +6,8 @@ {% block title %}Log In{% endblock %} {% block content %} + {% get_providers as socialaccount_providers %} +
    @@ -18,10 +20,12 @@

    {{ SYSTEM_TITLE }}

    - Log In With SR Google Account + {% if socialaccount_providers %} + Log In With SR Google Account + {% endif %}
    -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/helpdesk/templates/account/signup_closed.html b/helpdesk/templates/account/signup_closed.html index 0ee24a3..bedefbd 100644 --- a/helpdesk/templates/account/signup_closed.html +++ b/helpdesk/templates/account/signup_closed.html @@ -6,6 +6,8 @@ {% block title %}Log In{% endblock %} {% block content %} + {% get_providers as socialaccount_providers %} +
    @@ -16,6 +18,8 @@

    {{ SYSTEM_TITLE }}

    Go to Sign Up
    - Log In With SR Google Account + {% if socialaccount_providers %} + Log In With SR Google Account + {% endif %}
    -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/helpdesk/templates/socialaccount/login.html b/helpdesk/templates/socialaccount/login.html index e050b84..d0defee 100644 --- a/helpdesk/templates/socialaccount/login.html +++ b/helpdesk/templates/socialaccount/login.html @@ -1,7 +1,6 @@ {% extends "layouts/base_hero.html" %} {% load crispy_forms_tags %} {% load i18n %} -{% load socialaccount %} {% block title %}Log In{% endblock %} From cdc8f3c051aac17281e4e16762834e3210f607a2 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sun, 7 Apr 2024 13:33:37 +0100 Subject: [PATCH 19/20] Move login with Google account above login form Fixes #37 --- helpdesk/templates/account/login.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/helpdesk/templates/account/login.html b/helpdesk/templates/account/login.html index 788c58d..e28128d 100644 --- a/helpdesk/templates/account/login.html +++ b/helpdesk/templates/account/login.html @@ -13,16 +13,16 @@

    {{ SYSTEM_TITLE }}

    {% include "inc/parts/messages.html" %} + {% if socialaccount_providers %} + + {% endif %}
    {% csrf_token %} {{ form | crispy }}
    - -
    -
    - {% if socialaccount_providers %} - Log In With SR Google Account - {% endif %} +
    From 956a996ae1f41c86d5da1e8afef9475c78e94109 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sun, 7 Apr 2024 13:33:45 +0100 Subject: [PATCH 20/20] Add link back to signup form --- helpdesk/templates/socialaccount/login.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpdesk/templates/socialaccount/login.html b/helpdesk/templates/socialaccount/login.html index d0defee..8fe89e4 100644 --- a/helpdesk/templates/socialaccount/login.html +++ b/helpdesk/templates/socialaccount/login.html @@ -10,7 +10,7 @@

    {{ SYSTEM_TITLE }}

    Sign In Via Google

    -

    Non-SR Google accounts will not work. If you do not have an SR Google Account, please go back and sign up.

    +

    Non-SR Google accounts will not work. If you do not have an SR Google Account, please go back and sign up.

    {% csrf_token %} {{ form | crispy }}