From e0d6450cb604ac0961f89edc27b1c0ca4f764956 Mon Sep 17 00:00:00 2001 From: Thibaud Colas Date: Sat, 5 Jun 2021 15:12:57 +0100 Subject: [PATCH 1/8] Fix typo in metric description --- postgres_metrics/metrics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgres_metrics/metrics.py b/postgres_metrics/metrics.py index 50271ef..47060be 100644 --- a/postgres_metrics/metrics.py +++ b/postgres_metrics/metrics.py @@ -614,7 +614,7 @@ class TableSize(Metric): The "size of * fork" refers to the "main" data fork, the Free Space Map (fsm), Visibility Map (vm), and the initialization fork. - See also the PostgreSQL documentation on on the physical storage: + See also the PostgreSQL documentation on the physical storage: https://www.postgresql.org/docs/current/storage.html """ From a4fb49b6de0ad770714f5dce05b760fb635adcb7 Mon Sep 17 00:00:00 2001 From: Thibaud Colas Date: Sat, 5 Jun 2021 15:13:12 +0100 Subject: [PATCH 2/8] Add missing page title for all views --- postgres_metrics/templates/postgres_metrics/table.html | 1 - postgres_metrics/views.py | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/postgres_metrics/templates/postgres_metrics/table.html b/postgres_metrics/templates/postgres_metrics/table.html index 284b4c9..1dc8f51 100644 --- a/postgres_metrics/templates/postgres_metrics/table.html +++ b/postgres_metrics/templates/postgres_metrics/table.html @@ -20,7 +20,6 @@ {% block coltype %}flex{% endblock %} {% block content %} -

{{ metric.label }}

{% if metric.description %}
diff --git a/postgres_metrics/views.py b/postgres_metrics/views.py index 363973c..2886a14 100644 --- a/postgres_metrics/views.py +++ b/postgres_metrics/views.py @@ -22,6 +22,7 @@ def metrics_view(request, name): request, "postgres_metrics/table.html", { + "title": metric.label, "metric": metric, "results": metric.get_data(), "opts": {"app_label": "postgres_metrics", "model_name": metric.slug}, From 3c3c450deaddf4d1dc35d626fe54eea9fbc72f4d Mon Sep 17 00:00:00 2001 From: Thibaud Colas Date: Sat, 5 Jun 2021 15:14:29 +0100 Subject: [PATCH 3/8] Add aria-current="page" in side nav and breadcrumb --- postgres_metrics/templates/postgres_metrics/table.html | 4 ++-- tests/test_views.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/postgres_metrics/templates/postgres_metrics/table.html b/postgres_metrics/templates/postgres_metrics/table.html index 1dc8f51..0dd45f8 100644 --- a/postgres_metrics/templates/postgres_metrics/table.html +++ b/postgres_metrics/templates/postgres_metrics/table.html @@ -13,7 +13,7 @@ {% endblock %} @@ -36,7 +36,7 @@

{% trans 'PostgreSQL Metrics' %}

{% for iter_metric in postgres_metrics %} {% url "postgres-metrics:show" name=iter_metric.slug as metric_url %} - {{ iter_metric.label }} + {{ iter_metric.label }} {% endfor %} diff --git a/tests/test_views.py b/tests/test_views.py index 13ca162..f8647d8 100644 --- a/tests/test_views.py +++ b/tests/test_views.py @@ -83,7 +83,7 @@ def test_detail_view_sidebar(self): ) self.assertInHTML( '
  • Index Size
  • ', + 'title="Index Size" aria-current="page">Index Size', result.content.decode(), ) From 94e5d41bbe78a40eb138bd8e3f8ffa2982119834 Mon Sep 17 00:00:00 2001 From: Thibaud Colas Date: Sat, 5 Jun 2021 15:29:39 +0100 Subject: [PATCH 4/8] Add aria-label for "Show" links --- postgres_metrics/templates/admin/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgres_metrics/templates/admin/index.html b/postgres_metrics/templates/admin/index.html index c4906db..a4e9195 100644 --- a/postgres_metrics/templates/admin/index.html +++ b/postgres_metrics/templates/admin/index.html @@ -22,7 +22,7 @@ {% url "postgres-metrics:show" name=metric.slug as metric_url %} {{ metric.label }} - {% trans 'Show' %} + {% trans 'Show' %} {% endfor %} From 571fda7b266552713396a51204cfc1f87b0ddb9c Mon Sep 17 00:00:00 2001 From: Thibaud Colas Date: Sat, 5 Jun 2021 15:30:03 +0100 Subject: [PATCH 5/8] Fix headling level in docs --- docs/source/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/index.rst b/docs/source/index.rst index 3a37df6..9d83f46 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -13,7 +13,7 @@ Welcome to django-postgres-metrics's documentation! Indices and tables -================== +------------------ * :ref:`genindex` * :ref:`modindex` From 8620f6a2952f5220ea8d88cb7d882ad9ef7df137 Mon Sep 17 00:00:00 2001 From: Thibaud Colas Date: Sat, 5 Jun 2021 15:35:34 +0100 Subject: [PATCH 6/8] Add longer alt text for example screenshot --- README.md | 2 +- docs/source/getting-started.rst | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c6c57d8..040601c 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ urlpatterns = [ ``` This is what a metric could look like: -![Metric example](https://github.com/django-postgres-metrics/django-postgres-metrics/blob/main/docs/source/_static/screenshot.png) +![Screenshot of the Detailed Index Usage metric, with help text, and a table with rows for each index](https://github.com/django-postgres-metrics/django-postgres-metrics/blob/main/docs/source/_static/screenshot.png) ## Security diff --git a/docs/source/getting-started.rst b/docs/source/getting-started.rst index f7218d6..c136e10 100644 --- a/docs/source/getting-started.rst +++ b/docs/source/getting-started.rst @@ -73,7 +73,8 @@ metrics. This is what a metric could look like: .. figure:: _static/screenshot.png - :alt: Metric example + :target: _static/screenshot.png + :alt: Screenshot of the Detailed Index Usage metric, with help text, and a table with rows for each index Designing Your Own Metric From c19d192863fc9351ee4a6ecc62e9dd3bf54fd850 Mon Sep 17 00:00:00 2001 From: Thibaud Colas Date: Sat, 5 Jun 2021 15:35:42 +0100 Subject: [PATCH 7/8] Refine alt text for badges --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 040601c..578e37b 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # django-postgres-metrics -[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/django-postgres-metrics/django-postgres-metrics/Test%20&%20Deploy/main?style=for-the-badge)](https://github.com/django-postgres-metrics/django-postgres-metrics/actions?query=branch%3Amain+event%3Apush) -[![Codecov branch](https://img.shields.io/codecov/c/gh/django-postgres-metrics/django-postgres-metrics/main?style=for-the-badge)](https://app.codecov.io/gh/django-postgres-metrics/django-postgres-metrics/branch/main) +[![GitHub Build Status](https://img.shields.io/github/workflow/status/django-postgres-metrics/django-postgres-metrics/Test%20&%20Deploy/main?style=for-the-badge)](https://github.com/django-postgres-metrics/django-postgres-metrics/actions?query=branch%3Amain+event%3Apush) +[![Codecov coverage](https://img.shields.io/codecov/c/gh/django-postgres-metrics/django-postgres-metrics/main?style=for-the-badge)](https://app.codecov.io/gh/django-postgres-metrics/django-postgres-metrics/branch/main) [![Read the Docs](https://img.shields.io/readthedocs/django-postgres-metrics?style=for-the-badge)](https://django-postgres-metrics.readthedocs.io/) [![Version](https://img.shields.io/pypi/v/django-postgres-metrics?label=Version&style=for-the-badge)](https://pypi.org/project/django-postgres-metrics/) -![License](https://img.shields.io/pypi/l/django-postgres-metrics?style=for-the-badge) -![Python Versions](https://img.shields.io/pypi/pyversions/django-postgres-metrics?label=Python&style=for-the-badge) -![Django Versions](https://img.shields.io/pypi/djversions/django-postgres-metrics?color=%230C4B33&label=Django&style=for-the-badge) +![License: BSD](https://img.shields.io/pypi/l/django-postgres-metrics?style=for-the-badge) +[![Python Versions: see setup.py](https://img.shields.io/pypi/pyversions/django-postgres-metrics?label=Python&style=for-the-badge)](https://github.com/django-postgres-metrics/django-postgres-metrics/blob/main/setup.py) +[![Django Versions: see setup.py](https://img.shields.io/pypi/djversions/django-postgres-metrics?color=%230C4B33&label=Django&style=for-the-badge)](https://github.com/django-postgres-metrics/django-postgres-metrics/blob/main/setup.py) A Django application that exposes a bunch of PostgreSQL database metrics. From f811d32979d6bea4a6180e70ab77f8008e8a8837 Mon Sep 17 00:00:00 2001 From: Thibaud Colas Date: Sat, 5 Jun 2021 15:38:44 +0100 Subject: [PATCH 8/8] Improve TTS for email address in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 578e37b..50795e0 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ This is what a metric could look like: ## Security If you found or if you think you found a security issue please get in touch via -`info+django-postgres-metrics *AT* markusholtermann *DOT* eu`. +`info+django-postgres-metrics *at* markusholtermann *dot* eu`. I'm working about this in my free time. I don't have time to monitor the email 24/7. But you should normally receive a response within a week. If I haven't got back to you within pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy