From b204e2c6e8396d2c61f92b0394235cce967096d7 Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Mon, 19 Jun 2023 20:05:01 +0100 Subject: [PATCH 1/2] Add a "pagetitle" block to Silky templates so that when multiply Silky browser tabs are open, it's easier to tell which is which. --- silk/templates/silk/base/base.html | 2 +- silk/templates/silk/clear_db.html | 2 ++ silk/templates/silk/cprofile.html | 4 +++- silk/templates/silk/profile_detail.html | 2 ++ silk/templates/silk/profiling.html | 2 ++ silk/templates/silk/request.html | 2 ++ silk/templates/silk/requests.html | 2 ++ silk/templates/silk/sql.html | 2 ++ silk/templates/silk/sql_detail.html | 2 ++ silk/templates/silk/summary.html | 2 ++ 10 files changed, 20 insertions(+), 2 deletions(-) diff --git a/silk/templates/silk/base/base.html b/silk/templates/silk/base/base.html index 15d5131a..963de29e 100644 --- a/silk/templates/silk/base/base.html +++ b/silk/templates/silk/base/base.html @@ -2,7 +2,7 @@ - Silky + {% block pagetitle %}Silky{% endblock %} diff --git a/silk/templates/silk/clear_db.html b/silk/templates/silk/clear_db.html index af097c6f..a073983b 100644 --- a/silk/templates/silk/clear_db.html +++ b/silk/templates/silk/clear_db.html @@ -1,6 +1,8 @@ {% extends 'silk/base/root_base.html' %} {% load silk_inclusion %} {% load static %} +{% block pagetitle %}Silky - Clear DB{% endblock %} + {% block menu %} {% root_menu request %} {% endblock %} diff --git a/silk/templates/silk/cprofile.html b/silk/templates/silk/cprofile.html index 5d96eed7..be246755 100644 --- a/silk/templates/silk/cprofile.html +++ b/silk/templates/silk/cprofile.html @@ -4,6 +4,8 @@ {% load silk_inclusion %} {% load static %} +{% block pagetitle %}Silky - CProfile{% endblock %} + {% block js %} @@ -23,7 +25,7 @@ {% block data %}
-
+
{% if silk_request.pyprofile %}
diff --git a/silk/templates/silk/profile_detail.html b/silk/templates/silk/profile_detail.html index 61f2edf5..338e52a4 100644 --- a/silk/templates/silk/profile_detail.html +++ b/silk/templates/silk/profile_detail.html @@ -4,6 +4,8 @@ {% load silk_inclusion %} {% load static %} +{% block pagetitle %}Silky - Profile Detail{% endblock %} + {% block js %} diff --git a/silk/templates/silk/profiling.html b/silk/templates/silk/profiling.html index 3aae20a2..0110f219 100644 --- a/silk/templates/silk/profiling.html +++ b/silk/templates/silk/profiling.html @@ -2,6 +2,8 @@ {% load static %} {% load silk_inclusion %} +{% block pagetitle %}Silky - Profiling{% endblock %} + {% block menu %} {% if silk_request %} {% request_menu request silk_request %} diff --git a/silk/templates/silk/request.html b/silk/templates/silk/request.html index ca545874..a1198d59 100644 --- a/silk/templates/silk/request.html +++ b/silk/templates/silk/request.html @@ -2,6 +2,8 @@ {% load silk_filters %} {% load silk_inclusion %} {% load static %} +{% block pagetitle %}Silky - Request{% endblock %} + {% block style %} diff --git a/silk/templates/silk/requests.html b/silk/templates/silk/requests.html index 2baf6f38..899f8215 100644 --- a/silk/templates/silk/requests.html +++ b/silk/templates/silk/requests.html @@ -2,6 +2,8 @@ {% load silk_inclusion %} {% load static %} +{% block pagetitle %}Silky - Requests{% endblock %} + {% block style %} {{ block.super }} diff --git a/silk/templates/silk/sql.html b/silk/templates/silk/sql.html index e7b7172d..6dabbe97 100644 --- a/silk/templates/silk/sql.html +++ b/silk/templates/silk/sql.html @@ -5,6 +5,8 @@ {% load static %} {% load silk_inclusion %} +{% block pagetitle %}Silky - SQL{% endblock %} + {% block js %} {{ block.super }} diff --git a/silk/templates/silk/sql_detail.html b/silk/templates/silk/sql_detail.html index 3c72fccc..2356e38f 100644 --- a/silk/templates/silk/sql_detail.html +++ b/silk/templates/silk/sql_detail.html @@ -4,6 +4,8 @@ {% load silk_nav %} {% load silk_inclusion %} +{% block pagetitle %}Silky - SQL Detail{% endblock %} + {% block js %} {{ block.super }} diff --git a/silk/templates/silk/summary.html b/silk/templates/silk/summary.html index f65ada01..c70c46f9 100644 --- a/silk/templates/silk/summary.html +++ b/silk/templates/silk/summary.html @@ -5,6 +5,8 @@ {% root_menu request %} {% endblock %} +{% block pagetitle %}Silky - Summary{% endblock %} + {% block style %} {{ block.super }} From d68e17b72ecffe22dbfc5d62f898ddea798307a5 Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Wed, 12 Jul 2023 05:47:15 +0100 Subject: [PATCH 2/2] Add request paths to page titles, where appropriate. --- silk/templates/silk/cprofile.html | 2 +- silk/templates/silk/profile_detail.html | 2 +- silk/templates/silk/profiling.html | 2 +- silk/templates/silk/request.html | 2 +- silk/templates/silk/sql.html | 2 +- silk/templates/silk/sql_detail.html | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/silk/templates/silk/cprofile.html b/silk/templates/silk/cprofile.html index be246755..d6cc9167 100644 --- a/silk/templates/silk/cprofile.html +++ b/silk/templates/silk/cprofile.html @@ -4,7 +4,7 @@ {% load silk_inclusion %} {% load static %} -{% block pagetitle %}Silky - CProfile{% endblock %} +{% block pagetitle %}Silky - CProfile - {{ silk_request.path }}{% endblock %} {% block js %} diff --git a/silk/templates/silk/profile_detail.html b/silk/templates/silk/profile_detail.html index 338e52a4..c825c32f 100644 --- a/silk/templates/silk/profile_detail.html +++ b/silk/templates/silk/profile_detail.html @@ -4,7 +4,7 @@ {% load silk_inclusion %} {% load static %} -{% block pagetitle %}Silky - Profile Detail{% endblock %} +{% block pagetitle %}Silky - Profile Detail - {{ silk_request.path }}{% endblock %} {% block js %} diff --git a/silk/templates/silk/profiling.html b/silk/templates/silk/profiling.html index 0110f219..f6f1d697 100644 --- a/silk/templates/silk/profiling.html +++ b/silk/templates/silk/profiling.html @@ -2,7 +2,7 @@ {% load static %} {% load silk_inclusion %} -{% block pagetitle %}Silky - Profiling{% endblock %} +{% block pagetitle %}Silky - Profiling - {{ silk_request.path }}{% endblock %} {% block menu %} {% if silk_request %} diff --git a/silk/templates/silk/request.html b/silk/templates/silk/request.html index a1198d59..066917b1 100644 --- a/silk/templates/silk/request.html +++ b/silk/templates/silk/request.html @@ -2,7 +2,7 @@ {% load silk_filters %} {% load silk_inclusion %} {% load static %} -{% block pagetitle %}Silky - Request{% endblock %} +{% block pagetitle %}Silky - Request - {{ silk_request.path }}{% endblock %} {% block style %} diff --git a/silk/templates/silk/sql.html b/silk/templates/silk/sql.html index 6dabbe97..ff67fe05 100644 --- a/silk/templates/silk/sql.html +++ b/silk/templates/silk/sql.html @@ -5,7 +5,7 @@ {% load static %} {% load silk_inclusion %} -{% block pagetitle %}Silky - SQL{% endblock %} +{% block pagetitle %}Silky - SQL - {{ silk_request.path }}{% endblock %} {% block js %} diff --git a/silk/templates/silk/sql_detail.html b/silk/templates/silk/sql_detail.html index 2356e38f..8d5be3e3 100644 --- a/silk/templates/silk/sql_detail.html +++ b/silk/templates/silk/sql_detail.html @@ -4,7 +4,7 @@ {% load silk_nav %} {% load silk_inclusion %} -{% block pagetitle %}Silky - SQL Detail{% endblock %} +{% block pagetitle %}Silky - SQL Detail - {{ silk_request.path }}{% endblock %} {% block js %} {{ block.super }}