From: Roland Häder Date: Mon, 29 Jul 2024 20:14:22 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b720d31d0d76557b92763b23fa659212eb10d4bc;p=fba.git Continued: - added view for recently updated instances - renamed 'recently' to 'added' for not confusing it --- diff --git a/daemon.py b/daemon.py index 9c76df9..d0b146f 100755 --- a/daemon.py +++ b/daemon.py @@ -127,11 +127,18 @@ WHERE {mode} = ? \ ORDER BY domain \ LIMIT ?", [value, amount] ) - elif mode == "recently": + elif mode == "added": database.cursor.execute( f"SELECT * \ FROM instances \ ORDER BY first_seen DESC \ +LIMIT ?", [amount] + ) + elif mode == "updated": + database.cursor.execute( + f"SELECT * \ +FROM instances \ +ORDER BY last_updated DESC \ LIMIT ?", [amount] ) else: diff --git a/templates/views/index.html b/templates/views/index.html index 0b607dc..3286a4e 100644 --- a/templates/views/index.html +++ b/templates/views/index.html @@ -70,9 +70,10 @@
  • Block level statistics
  • -

    Recently added:

    +

    Recently ...:

    {% endblock %} {% block footer %} diff --git a/templates/views/list.html b/templates/views/list.html index 8c55257..5a6b86c 100644 --- a/templates/views/list.html +++ b/templates/views/list.html @@ -5,7 +5,8 @@ {% elif mode == 'original_software' %} Original software {{value}} {% elif mode == 'software' %} Used software {{value}} {% elif mode == 'command' %} Command {{value}} - {% elif mode == 'recently' %} {{amount}} recently added instances + {% elif mode == 'added' %} {{amount}} recently added instances + {% elif mode == 'updated' %} {{amount}} recently updated instances {% endif %} {% endblock %} @@ -20,8 +21,10 @@

    Instances found by command {{value}}

    {% elif mode == 'origin' %}

    Instances originated from {{value}}

    - {% elif mode == 'recently' %} + {% elif mode == 'added' %}

    {{amount}} recently added instances

    + {% elif mode == 'updated' %} +

    {{amount}} recently updated instances

    {% else %}

    mode={{mode}} not supported

    {% endif %}