From 8d3f548e8bd45d2340e22b9f8b0492b356ac9f93 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Fri, 30 Aug 2024 11:49:21 -0400 Subject: [PATCH] Add django-postgres-metrics --- cmsmanage/settings.py | 1 + cmsmanage/urls.py | 1 + pdm.lock | 52 +++++++++++++++++++++++++++++++++++++++++-- pyproject.toml | 1 + 4 files changed, 53 insertions(+), 2 deletions(-) diff --git a/cmsmanage/settings.py b/cmsmanage/settings.py index 11d158c..9792629 100644 --- a/cmsmanage/settings.py +++ b/cmsmanage/settings.py @@ -37,6 +37,7 @@ class Base(Configuration): INSTALLED_APPS = [ "dal", "dal_select2", + "postgres_metrics.apps.PostgresMetrics", "django.contrib.admin", "django.contrib.auth", "django.contrib.contenttypes", diff --git a/cmsmanage/urls.py b/cmsmanage/urls.py index 9750f47..d60ca5c 100644 --- a/cmsmanage/urls.py +++ b/cmsmanage/urls.py @@ -39,6 +39,7 @@ urlpatterns = [ path("paperwork/", include("paperwork.urls")), path("doorcontrol/", include("doorcontrol.urls")), path("api/v1/", include((router.urls, "api"), namespace="v1")), + path("admin/postgres-metrics/", include("postgres_metrics.urls")), path("admin/", admin.site.urls), path( "auth/", diff --git a/pdm.lock b/pdm.lock index e2be7a8..4f4c109 100644 --- a/pdm.lock +++ b/pdm.lock @@ -5,7 +5,7 @@ groups = ["default", "debug", "dev", "lint", "server", "typing"] strategy = ["inherit_metadata"] lock_version = "4.5.0" -content_hash = "sha256:f908c755f35f0769821be54914ad53a3de6e9a0c654baf877045c161c7dacfc7" +content_hash = "sha256:5d6778ee41d2095320769ec21bd878f60d2bafbdcf9bc24ab484929311118978" [[metadata.targets]] requires_python = "==3.11.*" @@ -603,6 +603,21 @@ files = [ {file = "django_picklefield-3.2-py3-none-any.whl", hash = "sha256:e9a73539d110f69825d9320db18bcb82e5189ff48dbed41821c026a20497764c"}, ] +[[package]] +name = "django-postgres-metrics" +version = "0.15.0" +requires_python = ">=3.7" +summary = "A Django app that exposes a bunch of PostgreSQL database metrics." +groups = ["default"] +marker = "python_version == \"3.11\"" +dependencies = [ + "django-rich>=1.0", +] +files = [ + {file = "django-postgres-metrics-0.15.0.tar.gz", hash = "sha256:98127ef55cf9d435b4dd0fdf1d160ea5b97690197d4d8e6148fc2cc2bb57ae12"}, + {file = "django_postgres_metrics-0.15.0-py3-none-any.whl", hash = "sha256:1710d44e910b230e3b7c7ce77304d68a40b1fa3711b18418387455b8e114d97a"}, +] + [[package]] name = "django-q2" version = "1.6.2" @@ -636,6 +651,22 @@ files = [ {file = "django_recurrence-1.11.1-py3-none-any.whl", hash = "sha256:0c65f30872599b5813a9bab6952dada23c55894f28674490a753ada559f14bc5"}, ] +[[package]] +name = "django-rich" +version = "1.11.0" +requires_python = ">=3.8" +summary = "Extensions for using Rich with Django." +groups = ["default"] +marker = "python_version == \"3.11\"" +dependencies = [ + "django>=3.2", + "rich>=10", +] +files = [ + {file = "django_rich-1.11.0-py3-none-any.whl", hash = "sha256:7e25f97c3b072df96f58bb76bdc0a7c40001315c3644da33a390efc95cd6cbdc"}, + {file = "django_rich-1.11.0.tar.gz", hash = "sha256:d07fa5c57921240673b84f8fe57940e6ade034c1f7b481517e72bec524a0e126"}, +] + [[package]] name = "django-sendfile2" version = "0.7.1" @@ -1752,7 +1783,7 @@ name = "pygments" version = "2.18.0" requires_python = ">=3.8" summary = "Pygments is a syntax highlighting package written in Python." -groups = ["dev"] +groups = ["default", "dev"] marker = "python_version == \"3.11\"" files = [ {file = "pygments-2.18.0-py3-none-any.whl", hash = "sha256:b8e6aca0523f3ab76fee51799c488e38782ac06eafcf95e7ba832985c8e7b13a"}, @@ -1883,6 +1914,23 @@ files = [ {file = "requests_oauthlib-2.0.0-py2.py3-none-any.whl", hash = "sha256:7dd8a5c40426b779b0868c404bdef9768deccf22749cde15852df527e6269b36"}, ] +[[package]] +name = "rich" +version = "13.8.0" +requires_python = ">=3.7.0" +summary = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" +groups = ["default"] +marker = "python_version == \"3.11\"" +dependencies = [ + "markdown-it-py>=2.2.0", + "pygments<3.0.0,>=2.13.0", + "typing-extensions<5.0,>=4.0.0; python_version < \"3.9\"", +] +files = [ + {file = "rich-13.8.0-py3-none-any.whl", hash = "sha256:2e85306a063b9492dffc86278197a60cbece75bcb766022f3436f567cae11bdc"}, + {file = "rich-13.8.0.tar.gz", hash = "sha256:a5ac1f1cd448ade0d59cc3356f7db7a7ccda2c8cbae9c7a90c28ff463d3e91f4"}, +] + [[package]] name = "rsa" version = "4.9" diff --git a/pyproject.toml b/pyproject.toml index 7787385..c85a2ca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,6 +44,7 @@ dependencies = [ "django-model-utils~=4.5", "psycopg[binary,pool]~=3.2", "django-simple-history~=3.7", + "django-postgres-metrics~=0.15", ] requires-python = ">=3.11"