This commit is contained in:
despiegk 2025-05-23 22:12:17 +04:00
parent 2bfe4161b2
commit 55a05a5571

View File

@ -26,15 +26,15 @@
</thead>
<tbody>
{{ if len(Processes) > 0 }}
{{ range process := Processes }}
{{ range pid, process := Processes }}
<tr>
<td>{{ process.PID }}</td>
<td>{{ pid }}</td>
<td>{{ process.Name }}</td>
<td>{{ printf "%.2f" process.CPU }}</td>
<td>{{ printf "%.2f" process.Memory }}</td>
<td>{{ process.CPU }}</td>
<td>{{ process.Memory }}</td>
<td>
<form action="/processes/kill/{{ process.PID }}" method="POST" style="display:inline;">
<button type="submit" class="btn btn-danger btn-sm" onclick="return confirm('Are you sure you want to kill process {{ process.PID }}?');">Kill</button>
<form action="/processes/kill/{{ pid }}" method="POST" style="display:inline;">
<button type="submit" class="btn btn-danger btn-sm" onclick="return confirm('Are you sure you want to kill process {{ pid }}?');">Kill</button>
</form>
</td>
</tr>