From: Jonatan Schlag Date: Mon, 4 Dec 2017 16:08:54 +0000 (+0100) Subject: bootstrap4: refactor mirror detail list X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b18b5d1240f231ec64666be43da771464982ed7;p=pbs.git bootstrap4: refactor mirror detail list Signed-off-by: Jonatan Schlag --- diff --git a/src/templates/mirrors/detail.html b/src/templates/mirrors/detail.html index 336ecb4f..70e78ef3 100644 --- a/src/templates/mirrors/detail.html +++ b/src/templates/mirrors/detail.html @@ -3,133 +3,146 @@ {% block title %}{{ _("Mirror: %s") % mirror.hostname }}{% end block %} {% block body %} - + - {% if current_user and current_user.has_perm("manage_mirrors") %} -
- - {{ _("Actions") }} - - +
+
+

+ {{ _("Mirror: %s") % mirror.hostname }}
+ {{ _("hosted by %s") % mirror.owner }} +

- {% end %} - -
-
- - - - - - - - {% if current_user and current_user.has_perm("manage_mirrors") %} +
+

{{ _("General") }}

+
+
{{ _("Hostname") }}{{ mirror.hostname }}
+ - - + + - {% end %} - -
{{ _("Contact") }} - {% if mirror.contact %} - {{ mirror.contact }} - {% else %} - {{ _("N/A") }} - {% end %} - {{ _("Hostname") }}{{ mirror.hostname }}
- -

{{ _("Status information") }}

- - - {% if not mirror.status == "OK" %} - - + + - {% if mirror.status == "ERROR" %} + {% if current_user and current_user.has_perm("manage_mirrors") %} - - + + {% end %} + +
{{ _("Status") }}{{ mirror.status }}{{ _("Location") }}{{ _("The location of the mirror server could not be estimated.") }}
{{ _("HTTP Response Code") }}{{ mirror.last_check.http_status }}{{ _("Contact") }} + {% if mirror.contact %} + {{ mirror.contact }} + {% else %} + {{ _("N/A") }} + {% end %} +
+
+
+
+ +
+
+

{{ _("Status information") }}

+
+ + + {% if not mirror.status == "OK" %} + + + + + + {% if mirror.status == "ERROR" %} + + + + + {% end %} + + {% if mirror.last_check and mirror.last_check.last_sync_at %} + + + + + {% end %} - {% if mirror.last_check and mirror.last_check.last_sync_at %} - + {% end %} - - - - - {% end %} - - {% if mirror.average_response_time %} - - - - - {% end %} - -
{{ _("Status") }}{{ mirror.status }}
{{ _("HTTP Response Code") }}{{ mirror.last_check.http_status }}
{{ _("Last sync") }} + {{ locale.format_date(mirror.last_check.last_sync_at) }} +
{{ _("Last sync") }}{{ _("Last check") }} - {{ locale.format_date(mirror.last_check.last_sync_at) }} + {% if mirror.last_check %} + {{ format_date(mirror.last_check.timestamp) }} + {% else %} + {{ _("Never") }} + {% end %}
{{ _("Last check") }} - {% if mirror.last_check %} - {{ format_date(mirror.last_check.timestamp) }} - {% else %} - {{ _("Never") }} - {% end %} -
{{ _("Average Response Time") }} - {{ "%.2fms" % (mirror.average_response_time * 1000) }} -
-
- -
-

- {{ _("The location of the mirror server could not be estimated.") }} -

+ {% if mirror.average_response_time %} + + {{ _("Average Response Time") }} + + {{ "%.2fms" % (mirror.average_response_time * 1000) }} + + + {% end %} + + +
{% if log %} -

{{ _("Log") }}

- {% module Log(log) %} +
+
+

{{ _("Log") }}

+ {% module Log(log) %} +
+
{% end %} + {% end block %}