This commit is contained in:
2024-01-03 13:40:42 +01:00
parent 8d4882d7c4
commit d5d964ea8e
3 changed files with 87 additions and 4 deletions

View File

@@ -115,6 +115,20 @@
{% endif %}
</div>
{% if smart %}
<h5 class="my-4">Windows</h5>
<div class="ml-3 example">
$SMART = @{ <br>
<div class="example-indent">
service = "{{ service.service }}"<br>
token = "{{ service.token }}"<br>
status = "N/A"<br>
smart = "$(smartctl -a C: --json | Out-String)"<br>
</div>
} | ConvertTo-Json<br><br>
Invoke-RestMethod -TimeoutSec 2 -Uri "{{ flask.request.url_root.replace("http://", "https://" )}}report" -Method Post -Headers @{"Content-Type"="application/json"} -Body $SMART
</div>
{% else %}
<h5 class="my-4">Python</h5>
<div class="ml-3 example">
import requests<br>
@@ -129,6 +143,7 @@
</div>
</div>
</div>
{% endif %}
<table class="mb-4 mt-5 status-table">
<thead>