From 78433b9b69c213ab6b9d95c6caec1e56d80dbd5a Mon Sep 17 00:00:00 2001 From: William Chu Date: Mon, 22 Jan 2024 17:43:57 +1100 Subject: [PATCH] feat: remove the ugly sidebar that didn't work / flex properly --- django_pev/templates/django_pev/base.html | 40 ++- .../templates/django_pev/connections.html | 108 +++--- django_pev/templates/django_pev/explain.html | 148 ++++----- django_pev/templates/django_pev/index.html | 114 +++---- .../templates/django_pev/indexes_view.html | 300 ++++++++--------- .../templates/django_pev/live_queries.html | 112 +++---- .../templates/django_pev/maintenance.html | 84 ++--- .../templates/django_pev/pev_embedded.html | 2 +- django_pev/templates/django_pev/queries.html | 312 +++++++++--------- django_pev/templates/django_pev/space.html | 146 ++++---- pyproject.toml | 2 +- 11 files changed, 686 insertions(+), 682 deletions(-) diff --git a/django_pev/templates/django_pev/base.html b/django_pev/templates/django_pev/base.html index a3d5d9a..dd4f857 100644 --- a/django_pev/templates/django_pev/base.html +++ b/django_pev/templates/django_pev/base.html @@ -13,13 +13,15 @@ - - - -
-
- +
+ +
+
{% block content %}
- {% block inner_content %} - {% endblock %} + {% block inner_content %} + {% endblock %}
{% endblock %} -
-
+
+
-
+
-
- +
+ \ No newline at end of file diff --git a/django_pev/templates/django_pev/connections.html b/django_pev/templates/django_pev/connections.html index fcbbb51..53ce05d 100644 --- a/django_pev/templates/django_pev/connections.html +++ b/django_pev/templates/django_pev/connections.html @@ -1,64 +1,64 @@ {% extends "django_pev/base.html" %} {% block content %} -
-
-
-
-
-

Live Connections

+
+
+
+
+
+

Live Connections

+
-
-
-
-
    -
  • - Total connections: {{ connections| length}} -
  • -
+
+
+
    +
  • + Total connections: {{ connections| length}} +
  • +
+
-
- - - - - - - - - - - - - - - - - {% for row in connections%} - - - - - - - - - - - - - {% endfor%} - -
PIDUserSourceIPOpen SinceQuery begin timeWait EventStateQuerySSL?
{{ row.pid }}{{ row.user }}{{ row.source }}{{ row.ip }}{{ row.backend_start | timesince }}{{ row.query_start | timesince }}{{ row.wait_event }}{{ row.start }}{{ row.query }} - {% if row.ssl %} - - {% endif%} -
+ + + + + + + + + + + + + + + + + {% for row in connections%} + + + + + + + + + + + + + {% endfor%} + +
PIDUserSourceIPOpen SinceQuery begin timeWait EventStateQuerySSL?
{{ row.pid }}{{ row.user }}{{ row.source }}{{ row.ip }}{{ row.backend_start | timesince }}{{ row.query_start | timesince }}{{ row.wait_event }}{{ row.start }}{{ row.query }} + {% if row.ssl %} + + {% endif%} +
-
- +
-
{% endblock %} \ No newline at end of file diff --git a/django_pev/templates/django_pev/explain.html b/django_pev/templates/django_pev/explain.html index 5041949..584da94 100644 --- a/django_pev/templates/django_pev/explain.html +++ b/django_pev/templates/django_pev/explain.html @@ -1,93 +1,93 @@ {% extends "django_pev/base.html" %} {% block content %} -{% load humanize %} -
-
-
-
-
-

Explain Query

- This page helps find the slowest queries of a page and explains it using an embedded version of Postgres Explain Visualizer 2 (by dalibo) -
-
-
-
- {% csrf_token %} - - -
- The url should not include the protocol or the base url. For example (/dashboard/) . + {% load humanize %} +
+
+
+
+
+

Explain Query

+ This page helps find the slowest queries of a page and explains it using an embedded version of Postgres Explain Visualizer 2 (by dalibo)
- - -
+
+
+
+ {% csrf_token %} + + +
+ The url should not include the protocol or the base url. For example (/dashboard/) . +
+ +
+
- {% if explain and explain.queries %} + {% if explain and explain.queries %} -
-
Slowest Query {{ slowest.duration|floatformat:4 }}s -
-
- {% csrf_token %} - - - - -
-
- - {{ slowest.sql }} - -
-
+
+
Slowest Query {{ slowest.duration|floatformat:4 }}s +
+
+ {% csrf_token %} + + + + +
+
+ + {{ slowest.sql }} + +
+
-
-
All Queries {{explain.queries | length}}
-
    - {% for query in explain.queries %} +
    +
    All Queries {{explain.queries | length}}
    +
      + {% for query in explain.queries %} -
    1. - {{ query.duration | floatformat:4}}s - {{ query.sql | truncatechars:100 }} +
    2. + {{ query.duration | floatformat:4}}s + {{ query.sql | truncatechars:100 }} -

      +

      -

      - {% csrf_token %} - - - - -
      +
      + {% csrf_token %} + + + + +
      -

      +

      -
      -
      - - {{ query.sql }} - -
      -
      -
    3. +
      +
      + + {{ query.sql }} + +
      +
      + - {% endfor %} -
    -
    - {% elif explain %} -
    -
    No queries executed (probably a redirect.)
    -
    - {% endif %} + {% endfor %} +
+
+ {% elif explain %} +
+
No queries executed (probably a redirect.)
+
+ {% endif %} -
+
-
-
{% endblock %} \ No newline at end of file diff --git a/django_pev/templates/django_pev/index.html b/django_pev/templates/django_pev/index.html index b8c5858..e653925 100644 --- a/django_pev/templates/django_pev/index.html +++ b/django_pev/templates/django_pev/index.html @@ -1,72 +1,72 @@ {% extends "django_pev/base.html" %} {% block content %} -
-
-
-
-
-

Traffic

-
January - July 2022
-
-