]> git.ipfire.org Git - ipfire.org.git/commitdiff
dnsbl: Show some more metadata about lists
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 30 Dec 2025 13:55:03 +0000 (13:55 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 30 Dec 2025 13:55:03 +0000 (13:55 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/backend/dnsbl.py
src/templates/dnsbl/list.html

index b1940ceedd82c3ba3ddfbc3d7c6d12f7bc3d7eff..018f5cf9e69aefbae830cffb9e74c46655ca8c5a 100644 (file)
@@ -137,6 +137,9 @@ class List(Model):
        # Total Domains
        total_domains : int
 
+       # Updated At
+       updated_at : datetime.datetime | None
+
        def __eq__(self, other):
                if isinstance(other, self.__class__):
                        return self.slug == other.slug
index e583e3ae3aff8e108235c89f12c3b97998ceb2fb..0e0f64e5afdf0633cb6d8029d618db78413c98cc 100644 (file)
                                        {{ list }}
                                </h1>
 
-                               {# Description #}
-                               {% if list.description %}
-                                       <h6 class="subtitle">
+                               <h6 class="subtitle">
+                                       <div class="tag is-info">
+                                               {{ list.license }}
+                                       </div>
+
+                                       {# Description #}
+                                       {% if list.description %}
                                                {{ list.description }}
-                                       </h6>
-                               {% end %}
+                                       {% end %}
+                               </h6>
+                       </div>
+               </div>
+       </section>
+
+       {# Information #}
+       <section class="section">
+               <div class="container">
+                       <div class="level">
+                               <div class="level-item has-text-centered">
+                                       <div>
+                                               <p class="heading">
+                                                       {{ _("Domains Listed") }}
+                                               </p>
+                                               <p class="title">
+                                                       {{ format_number(list.total_domains) }}
+                                               </p>
+                                       </div>
+                               </div>
+
+                               <div class="level-item has-text-centered">
+                                       <div>
+                                               <p class="heading">
+                                                       {{ _("Last Updated") }}
+                                               </p>
+                                               <p class="title">
+                                                       {{ locale.format_date(list.updated_at, shorter=True) }}
+                                               </p>
+                                       </div>
+                               </div>
                        </div>
                </div>
        </section>
@@ -51,7 +84,7 @@
        {% if sources %}
                <section class="section">
                        <div class="container">
-                               <h5 class="title is-5">{{ _("Sources") }}</h5>
+                               <h3 class="title is-3">{{ _("Sources") }}</h3>
 
                                <table class="table is-fullwidth is-striped is-hoverable is-narrow">
                                        <thead>