Commit ee2fff1f authored by Jeff MrBE4R's avatar Jeff MrBE4R
Browse files

second commit

parent 687f23db
......@@ -324,7 +324,6 @@ def admin_vm():
else:
enabled = False
if str(request.form['token']).decode('utf8') and str(request.form['ip']).decode('utf8') and str(request.form['enabled']).decode('utf8'):
try:
config.Config.conn.execute(
database.vms.update().values(
......@@ -336,6 +335,8 @@ def admin_vm():
)
)
except:
import sys
print sys.exc_info()
pass
elif request.form['action'] == str('Delete').decode('utf8'):
if str(request.form['id']).decode('utf8'):
......
......@@ -21,14 +21,18 @@
<td style="border: none; text-align: left;">
<select class="form-control" name="user-to-link">
{% for u in users %}
{% if u.enabled %}
<option value="{{ u.id }}">{{ u.fullname }}</option>
{% endif %}
{% endfor %}
</select>
</td>
<td>
<select class="form-control" name="server-to-link">
{% for vm in vms %}
{% if vm.enabled %}
<option value="{{ vm.id }}">{{ vm.token }}</option>
{% endif %}
{% endfor %}
</select>
</td>
......
......@@ -27,7 +27,7 @@
</tr>
<tr>
<td style="border: none; text-align: left;">
<label for="enabled">Enabled ?</label>
<label>Enabled ?</label>
</td>
<td style="border: none; text-align: left;">
<input type="checkbox" data-toggle="toggle" id="enabled" name="enabled" {% if vm.enabled %} checked {% endif %}>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment