From 9cc24b3f81862540728b0b2b0514b633ce586092 Mon Sep 17 00:00:00 2001
From: Andreas Zweili
Date: Mon, 25 Dec 2017 13:38:31 +0100
Subject: [PATCH] add a template for computer details
---
docs/docs.org | 38 +++++++++++++++++++
.../templates/inventory/computer_details.html | 24 ++++++++++++
2 files changed, 62 insertions(+)
create mode 100644 inventory/templates/inventory/computer_details.html
diff --git a/docs/docs.org b/docs/docs.org
index b00a217..0ca00b3 100644
--- a/docs/docs.org
+++ b/docs/docs.org
@@ -534,3 +534,41 @@ information.
{% endif %}
{% endblock %}
#+END_SRC
+
+** computer_details.html
+
+The computer details show all the known information about the selected computer.
+
+#+BEGIN_SRC html :tangle ../inventory/templates/inventory/computer_details.html
+{% extends "inventory/base.html" %}
+{% block section_title %}{{ computer.name }}{% endblock %}
+{% block content %}
+ Description
+ {{ computer.description }}
+ Hostname: {{ computer.hostname }}
+ OS: {{ computer.os }}
+ CPU: {{ cpu.cpu }}
+ RAM Modules: {{ram.amount}}x {{ ram.ram }}
+ IP: {{ computer.ip }}
+ Disks: {{ disks.disk }}
+ Host: {{ computer.host }}
+#+END_SRC
+
+The list of cron jobs running on the computer get's only displayed if
+there are any cron jobs.
+
+#+BEGIN_SRC html :tangle ../inventory/templates/inventory/computer_details.html
+ {% if cronjob_list %}
+ Cron Jobs:
+
+
+
+ {% endif %}
+{% endblock %}
+#+END_SRC
+
diff --git a/inventory/templates/inventory/computer_details.html b/inventory/templates/inventory/computer_details.html
new file mode 100644
index 0000000..1751a20
--- /dev/null
+++ b/inventory/templates/inventory/computer_details.html
@@ -0,0 +1,24 @@
+{% extends "inventory/base.html" %}
+{% block section_title %}{{ computer.name }}{% endblock %}
+{% block content %}
+ Description
+ {{ computer.description }}
+ Hostname: {{ computer.hostname }}
+ OS: {{ computer.os }}
+ CPU: {{ cpu.cpu }}
+ RAM Modules: {{ram.amount}}x {{ ram.ram }}
+ IP: {{ computer.ip }}
+ Disks: {{ disks.disk }}
+ Host: {{ computer.host }}
+ {% if cronjob_list %}
+ Cron Jobs:
+
+
+
+ {% endif %}
+{% endblock %}