Added some AJAX to dynamically update the server's run status

This commit is contained in:
2022-09-24 21:29:12 -04:00
parent 5699c9cf6a
commit efde09025c
3 changed files with 35 additions and 10 deletions

View File

@ -27,17 +27,17 @@
</tr>
</thead>
<tbody>
<tr>
{% for m in servers %}
<td>{{ m.getName() }}</td>
<td>{{ m.getVersion() }}</td>
<td>{{ m.getState() ? 'Running' : 'Stopped' }}</td>
{% for m in servers %}
<tr class="serverItem" data-server-name="{{ m.getName() }}">
<td class="serverName">{{ m.getName() }}</td>
<td class="serverVersion">{{ m.getVersion() }}</td>
<td class="serverState">{{ m.getState() ? 'Running' : 'Stopped' }}</td>
<td>
<a href="/server/{{ m.getName() }}/start"><i class="fa-solid fa-play"></i></a>
<a href="/server/{{ m.getName() }}/stop"><i class="fa-solid fa-stop"></i></a>
</td>
{% endfor %}
</tr>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}