diff --git a/static/site.css b/static/site.css index d3a100b..bb4171f 100644 --- a/static/site.css +++ b/static/site.css @@ -155,6 +155,21 @@ body{ cursor: pointer; } +.smart-info{ + font-family: monospace; + + padding-top: 2px; + padding-top: 2px; + padding-left: 5px; + padding-left: 5px; + + color: black; + + border: none; + outline: none; + cursor: pointer; +} + .box{ border-style: solid; border-width: 1px; diff --git a/templates/service_info.html b/templates/service_info.html index cfbb6a5..f7b4ba2 100644 --- a/templates/service_info.html +++ b/templates/service_info.html @@ -33,11 +33,6 @@

Service: {{ service.service }}

{% if service.staticly_configured %} {% endif %} - {% if service.special_type == "SMART" %} -
- Smart Monitor {% if smart_entry %} for: {{ smart.model_number }} {% endif %} -
- {% endif %} {% if not service.staticly_configured %} Secret Token: {{ service.token }} + {% if service.special_type == "SMART" %} +
+ Smart Monitor {% if smart %} for: {{ smart.model_number }} {% endif %} +
+
+ Example below requires smartmontools ("smartctl") in PATH. + On Linux this is usually available via the package manager, + on Windows install it from the + offical page. +
+ {% endif %} + + {% if smart %} +
Linux
+ {% else %}
Curl
+ {% endif %}
+ {% if smart %} + SMART='{
+
+ "service" : "{{ service.service }}",
+ "token" : "{{ service.token }}",
+ "status" : "N/A",
+ "smart" : '$(/sbin/smartctl -a /dev/nvme0n1 --json)'
+
+ }'

+ curl -X POST -H "Content-Type: application/json" \
+
+ --data "${SMART}" \
+ {{ flask.request.url_root.replace("http://", "https://" )}}report +
+ {% else %} curl -X POST \
-H "Content-Type: application/json" \
@@ -86,6 +112,7 @@ "status" : "OK", "info" : "Free Text Information here" }' \
{{ flask.request.url_root.replace("http://", "https://" )}}report
+ {% endif %}
Python