From 37d7661fb8d4fbfd99e7888f4d0b640a697d0e0e Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Wed, 22 May 2013 03:52:18 +0200 Subject: templates/layout.html: externalized global layout into single file --- templates/host.html | 143 +++++++++++++++++++++----------------------------- templates/index.html | 56 ++++++-------------- templates/layout.html | 25 +++++++++ 3 files changed, 100 insertions(+), 124 deletions(-) create mode 100644 templates/layout.html diff --git a/templates/host.html b/templates/host.html index feed11b..eac2066 100644 --- a/templates/host.html +++ b/templates/host.html @@ -1,90 +1,67 @@ - - - - - Hostinfo: Overview +{% extends 'layout.html' %} - - - - +{% block title %}{{hostname}}{% endblock %} - - +{% block content %} +

{{hostname}}

- + - -
-
+
+
+
+
hostname
{{hostname}}
+
os
{{os}}
+
arch
{{arch}}
+
vserver
{{vserver}}
+ {% if vserver_host is defined %} +
vserver_host
{{vserver_host}}
+ {% endif %} +
+
-
- -

{{hostname}}

- - - -
-
-
-
hostname
{{hostname}}
-
os
{{os}}
-
arch
{{arch}}
-
vserver
{{vserver}}
- {% if vserver_host is defined %} -
vserver_host
{{vserver_host}}
- {% endif %} -
-
- -
- {% for group in addresses | groupby('interface') %} -
-

{{ group.grouper }}

-
    - {% for address in group.list %} -
  • {{address['address']}} /{{address['netmask']}}
  • - {% else %} -
  • no address
  • - {% endfor %} -
-
- {% else %} -

no network interfaces

- {% endfor %} -
- -
- - - - - - - - {% for port in ports %} - - - - - - - {% else%} - - {% endfor %} - -
PortIPProcessProtocol
{{port['port']}}{{port['ip']}}{{port['process']}}{{port['proto']}}
no ports open
-
-
- -
-
+
+ {% for group in addresses | groupby('interface') %} +
+

{{ group.grouper }}

+
    + {% for address in group.list %} +
  • {{address['address']}} /{{address['netmask']}}
  • + {% else %} +
  • no address
  • + {% endfor %} +
+ {% else %} +

no network interfaces

+ {% endfor %} +
- - +
+ + + + + + + + {% for port in ports %} + + + + + + + {% else%} + + {% endfor %} + +
PortIPProcessProtocol
{{port['port']}}{{port['ip']}}{{port['process']}}{{port['proto']}}
no ports open
+
+
+{% endblock %} diff --git a/templates/index.html b/templates/index.html index bace5c7..161bf01 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,41 +1,15 @@ - - - - - Hostinfo: Overview - - - - - - - - - - - - - -
-
- -
- -

Hostinfo

- - -
-
-
- - +{% extends 'layout.html' %} + +{% block content %} +

Hostinfo

+ + +{% endblock %} diff --git a/templates/layout.html b/templates/layout.html new file mode 100644 index 0000000..c90acb3 --- /dev/null +++ b/templates/layout.html @@ -0,0 +1,25 @@ + + + + + Hostinfo: {% block title %}Overview{% endblock %} + + + + + + + + + + + +
+
+
+ {% block content %}{% endblock %} +
+
+
+ + -- cgit v1.2.3-1-g7c22