1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-24 15:15:22 +00:00

Added log func and fix buttons on instance page

This commit is contained in:
Retspen 2015-03-18 15:48:29 +02:00
parent 90d8dd5729
commit 1642100ef4
5 changed files with 247 additions and 159 deletions

View file

@ -13,6 +13,7 @@ from vrtManager.instance import wvmInstance, wvmInstances
from vrtManager.connection import connection_manager
from libvirt import libvirtError, VIR_DOMAIN_XML_SECURE
from webvirtcloud.settings import QEMU_KEYMAPS, QEMU_CONSOLE_TYPES
from logs.views import addlogmsg
def index(request):
@ -73,26 +74,42 @@ def instances(request):
if request.method == 'POST':
name = request.POST.get('name', '')
compute_id = request.POST.get('compute_id', '')
compute = Compute.objects.get(id=compute_id)
instance = Instance.objects.get(compute_id=compute_id, name=name)
try:
conn = wvmInstances(compute.hostname,
compute.login,
compute.password,
compute.type)
if 'start' in request.POST:
conn = wvmInstances(instance.compute.hostname,
instance.compute.login,
instance.compute.password,
instance.compute.type)
if 'poweron' in request.POST:
msg = _("Power On")
addlogmsg(request.user.id, instance.id, msg)
conn.start(name)
return HttpResponseRedirect(request.get_full_path())
if 'destroy' in request.POST:
if 'powercycle' in request.POST:
msg = _("Power Cycle")
conn.force_shutdown(name)
conn.start()
addlogmsg(request.user.id, instance.id, msg)
return HttpResponseRedirect(request.get_full_path())
if 'suspend' in request.POST:
conn.suspend(name)
return HttpResponseRedirect(request.get_full_path())
if 'resume' in request.POST:
conn.resume(name)
if 'poweroff' in request.POST:
msg = _("Power Off")
addlogmsg(request.user.id, instance.id, msg)
conn.shutdown(name)
return HttpResponseRedirect(request.get_full_path())
if request.user.is_superuser:
if 'suspend' in request.POST:
msg = _("Suspend")
addlogmsg(request.user.id, instance.id, msg)
conn.suspend(name)
return HttpResponseRedirect(request.get_full_path())
if 'resume' in request.POST:
msg = _("Resume")
addlogmsg(request.user.id, instance.id, msg)
conn.resume(name)
return HttpResponseRedirect(request.get_full_path())
except libvirtError as lib_err:
error_messages.append(lib_err)
addlogmsg(request.user.id, instance.id, lib_err.message)
return render(request, 'instances.html', locals())
@ -186,27 +203,27 @@ def instance(request, compute_id, vname):
if request.method == 'POST':
if 'poweron' in request.POST:
msg = _("Power On")
addlogmsg(request.user.id, instance.id, msg)
conn.start()
return HttpResponseRedirect(request.get_full_path() + '#poweron')
if 'powercycle' in request.POST:
msg = _("Power Cycle")
addlogmsg(request.user.id, instance.id, msg)
conn.force_shutdown()
conn.start()
return HttpResponseRedirect(request.get_full_path() + '#powercycle')
if 'poweroff' == request.POST.get('power', ''):
msg = _("Power Off")
addlogmsg(request.user.id, instance.id, msg)
conn.shutdown()
return HttpResponseRedirect(request.get_full_path() + '#poweroff')
if 'suspend' in request.POST:
conn.suspend()
return HttpResponseRedirect(request.get_full_path() + '#resume')
if 'resume' in request.POST:
conn.resume()
return HttpResponseRedirect(request.get_full_path() + '#suspend')
if 'delete' in request.POST:
msg = _("Destroy")
addlogmsg(request.user.id, instance.id, msg)
if conn.get_status() == 1:
conn.force_shutdown()
try:
@ -228,124 +245,166 @@ def instance(request, compute_id, vname):
return HttpResponseRedirect(reverse('instances'))
if 'snapshot' in request.POST:
msg = _("New snapshot")
addlogmsg(request.user.id, instance.id, msg)
name = request.POST.get('name', '')
conn.create_snapshot(name)
return HttpResponseRedirect(request.get_full_path() + '#istaceshapshosts')
if 'umount_iso' in request.POST:
msg = _("Mount media")
addlogmsg(request.user.id, instance.id, msg)
image = request.POST.get('path', '')
dev = request.POST.get('umount_iso', '')
conn.umount_iso(dev, image)
return HttpResponseRedirect(request.get_full_path() + '#instancemedia')
if 'mount_iso' in request.POST:
msg = _("Umount media")
addlogmsg(request.user.id, instance.id, msg)
image = request.POST.get('media', '')
dev = request.POST.get('mount_iso', '')
conn.mount_iso(dev, image)
return HttpResponseRedirect(request.get_full_path() + '#instancemedia')
if 'set_autostart' in request.POST:
conn.set_autostart(1)
return HttpResponseRedirect(request.get_full_path() + '#instancesettings')
if 'unset_autostart' in request.POST:
conn.set_autostart(0)
return HttpResponseRedirect(request.get_full_path() + '#instancesettings')
if 'resize' in request.POST:
description = request.POST.get('description', '')
vcpu = request.POST.get('vcpu', '')
cur_vcpu = request.POST.get('cur_vcpu', '')
memory = request.POST.get('memory', '')
memory_custom = request.POST.get('memory_custom', '')
if memory_custom:
memory = memory_custom
cur_memory = request.POST.get('cur_memory', '')
cur_memory_custom = request.POST.get('cur_memory_custom', '')
if cur_memory_custom:
cur_memory = cur_memory_custom
conn.resize(cur_memory, memory, cur_vcpu, vcpu)
return HttpResponseRedirect(request.get_full_path() + '#instancesettings')
if 'change_xml' in request.POST:
exit_xml = request.POST.get('inst_xml', '')
if exit_xml:
conn._defineXML(exit_xml)
return HttpResponseRedirect(request.get_full_path() + '#instancexml')
if 'set_console_passwd' in request.POST:
if request.POST.get('auto_pass', ''):
passwd = ''.join([choice(letters + digits) for i in xrange(12)])
else:
passwd = request.POST.get('console_passwd', '')
clear = request.POST.get('clear_pass', False)
if clear:
passwd = ''
if not passwd and not clear:
msg = _("Enter the console password or select Generate")
error_messages.append(msg)
if not error_messages:
if not conn.set_console_passwd(passwd):
msg = _("Error setting console password. You should check that your instance have an graphic device.")
error_messages.append(msg)
else:
return HttpResponseRedirect(request.get_full_path() + '#console_pass')
if 'set_console_keymap' in request.POST:
keymap = request.POST.get('console_keymap', '')
clear = request.POST.get('clear_keymap', False)
if clear:
conn.set_console_keymap('')
else:
conn.set_console_keymap(keymap)
return HttpResponseRedirect(request.get_full_path() + '#console_keymap')
if 'set_console_type' in request.POST:
console_type = request.POST.get('console_type', '')
conn.set_console_type(console_type)
return HttpResponseRedirect(request.get_full_path() + '#console_type')
if 'migrate' in request.POST:
compute_id = request.POST.get('compute_id', '')
live = request.POST.get('live_migrate', False)
unsafe = request.POST.get('unsafe_migrate', False)
xml_del = request.POST.get('xml_delete', False)
new_compute = Compute.objects.get(id=compute_id)
conn_migrate = wvmInstances(new_compute.hostname,
new_compute.login,
new_compute.password,
new_compute.type)
conn_migrate.moveto(conn, vname, live, unsafe, xml_del)
conn_migrate.define_move(vname)
conn_migrate.close()
return HttpResponseRedirect(reverse('instance', args=[compute_id, vname]))
if 'delete_snapshot' in request.POST:
msg = _("Delete snapshot")
addlogmsg(request.user.id, instance.id, msg)
snap_name = request.POST.get('name', '')
conn.snapshot_delete(snap_name)
return HttpResponseRedirect(request.get_full_path() + '#istaceshapshosts')
if 'revert_snapshot' in request.POST:
msg = _("Revert snapshot")
addlogmsg(request.user.id, instance.id, msg)
snap_name = request.POST.get('name', '')
conn.snapshot_revert(snap_name)
msg = _("Successful revert snapshot: ")
msg += snap_name
messages.append(msg)
if 'clone' in request.POST:
clone_data = {}
clone_data['name'] = request.POST.get('name', '')
if request.user.is_superuser:
if 'suspend' in request.POST:
msg = _("Suspend")
addlogmsg(request.user.id, instance.id, msg)
conn.suspend()
return HttpResponseRedirect(request.get_full_path() + '#resume')
for post in request.POST:
if 'disk' or 'meta' in post:
clone_data[post] = request.POST.get(post, '')
if 'resume' in request.POST:
msg = _("Resume")
addlogmsg(request.user.id, instance.id, msg)
conn.resume()
return HttpResponseRedirect(request.get_full_path() + '#suspend')
conn.clone_instance(clone_data)
return HttpResponseRedirect(reverse('instance', args=[compute_id, clone_data['name']]))
if 'set_autostart' in request.POST:
msg = _("Set autostart")
addlogmsg(request.user.id, instance.id, msg)
conn.set_autostart(1)
return HttpResponseRedirect(request.get_full_path() + '#instancesettings')
if 'unset_autostart' in request.POST:
msg = _("Unset autostart")
addlogmsg(request.user.id, instance.id, msg)
conn.set_autostart(0)
return HttpResponseRedirect(request.get_full_path() + '#instancesettings')
if 'resize' in request.POST:
msg = _("Resize")
addlogmsg(request.user.id, instance.id, msg)
description = request.POST.get('description', '')
vcpu = request.POST.get('vcpu', '')
cur_vcpu = request.POST.get('cur_vcpu', '')
memory = request.POST.get('memory', '')
memory_custom = request.POST.get('memory_custom', '')
if memory_custom:
memory = memory_custom
cur_memory = request.POST.get('cur_memory', '')
cur_memory_custom = request.POST.get('cur_memory_custom', '')
if cur_memory_custom:
cur_memory = cur_memory_custom
conn.resize(cur_memory, memory, cur_vcpu, vcpu)
return HttpResponseRedirect(request.get_full_path() + '#instancesettings')
if 'change_xml' in request.POST:
msg = _("Edit XML")
addlogmsg(request.user.id, instance.id, msg)
exit_xml = request.POST.get('inst_xml', '')
if exit_xml:
conn._defineXML(exit_xml)
return HttpResponseRedirect(request.get_full_path() + '#instancexml')
if 'set_console_passwd' in request.POST:
msg = _("Set VNC password")
addlogmsg(request.user.id, instance.id, msg)
if request.POST.get('auto_pass', ''):
passwd = ''.join([choice(letters + digits) for i in xrange(12)])
else:
passwd = request.POST.get('console_passwd', '')
clear = request.POST.get('clear_pass', False)
if clear:
passwd = ''
if not passwd and not clear:
msg = _("Enter the console password or select Generate")
error_messages.append(msg)
if not error_messages:
if not conn.set_console_passwd(passwd):
msg = _("Error setting console password. You should check that your instance have an graphic device.")
error_messages.append(msg)
else:
return HttpResponseRedirect(request.get_full_path() + '#console_pass')
if 'set_console_keymap' in request.POST:
msg = _("Set VNC keymap")
addlogmsg(request.user.id, instance.id, msg)
keymap = request.POST.get('console_keymap', '')
clear = request.POST.get('clear_keymap', False)
if clear:
conn.set_console_keymap('')
else:
conn.set_console_keymap(keymap)
return HttpResponseRedirect(request.get_full_path() + '#console_keymap')
if 'set_console_type' in request.POST:
msg = _("Set VNC type")
addlogmsg(request.user.id, instance.id, msg)
console_type = request.POST.get('console_type', '')
conn.set_console_type(console_type)
return HttpResponseRedirect(request.get_full_path() + '#console_type')
if 'migrate' in request.POST:
msg = _("Migrate")
addlogmsg(request.user.id, instance.id, msg)
compute_id = request.POST.get('compute_id', '')
live = request.POST.get('live_migrate', False)
unsafe = request.POST.get('unsafe_migrate', False)
xml_del = request.POST.get('xml_delete', False)
new_compute = Compute.objects.get(id=compute_id)
conn_migrate = wvmInstances(new_compute.hostname,
new_compute.login,
new_compute.password,
new_compute.type)
conn_migrate.moveto(conn, vname, live, unsafe, xml_del)
conn_migrate.define_move(vname)
conn_migrate.close()
return HttpResponseRedirect(reverse('instance', args=[compute_id, vname]))
if 'clone' in request.POST:
msg = _("Clone")
addlogmsg(request.user.id, instance.id, msg)
clone_data = {}
clone_data['name'] = request.POST.get('name', '')
for post in request.POST:
if 'disk' or 'meta' in post:
clone_data[post] = request.POST.get(post, '')
conn.clone_instance(clone_data)
return HttpResponseRedirect(reverse('instance', args=[compute_id, clone_data['name']]))
conn.close()
except libvirtError as lib_err:
error_messages.append(lib_err)
error_messages.append(lib_err.message)
addlogmsg(request.user.id, instance.id, lib_err.message)
return render(request, 'instance.html', locals())

View file

@ -4,6 +4,15 @@ from django.core.urlresolvers import reverse
from logs.models import Logs
def addlogmsg(userid, instanceid, message):
"""
:param request:
:return:
"""
add_log_msg = Logs(user_id=userid, instance_id=instanceid, message=message)
add_log_msg.save()
def showlogs(request):
"""
:param request:

View file

@ -105,15 +105,21 @@
</li>
{% endif %}
{% endifequal %}
{% if request.user.is_superuser %}
{% ifequal status 3 %}
{% ifequal status 3 %}
{% if request.user.is_superuser %}
<li role="presentation" class="active">
<a href="#resume" aria-controls="resume" role="tab" data-toggle="tab">
{% trans "Resume" %}
</a>
</li>
{% endifequal %}
{% endif %}
{% else %}
<li role="presentation" class="active">
<a href="#resume" aria-controls="resume" role="tab" data-toggle="tab">
{% trans "Resume" %}
</a>
</li>
{% endif %}
{% endifequal %}
{% ifequal status 5 %}
<li role="presentation" class="active">
<a href="#boot" aria-controls="boot" role="tab" data-toggle="tab">
@ -149,8 +155,8 @@
</div>
{% endif %}
{% endifequal %}
{% if request.user.is_superuser %}
{% ifequal status 3 %}
{% ifequal status 3 %}
{% if request.user.is_superuser %}
<div role="tabpanel" class="tab-pane tab-pane-bordered active" id="resume">
<p>{% trans "This action restore the instance after suspend." %}</p>
<form action="" method="post" role="form">{% csrf_token %}
@ -158,8 +164,16 @@
<div class="clearfix"></div>
</form>
</div>
{% endifequal %}
{% endif %}
{% else %}
<div role="tabpanel" class="tab-pane tab-pane-bordered active" id="resume">
<p>{% trans "Administrator blocked your instance." %}</p>
<form action="" method="post" role="form">{% csrf_token %}
<button class="btn btn-lg btn-success disabled pull-right">{% trans "Resume" %}</button>
<div class="clearfix"></div>
</form>
</div>
{% endif %}
{% endifequal %}
{% ifequal status 5 %}
<div role="tabpanel" class="tab-pane tab-pane-bordered active" id="boot">
<p>{% trans "Click on Boot button to start this instance." %}</p>
@ -186,10 +200,10 @@
<div class="tab-content">
<div role="tabpanel" class="tab-pane tab-pane-bordered active" id="vnconsole">
<p>{% trans "This action opens a new window with a VNC connection to the console of the instance." %}</p>
{% ifequal status 5 %}
<button class="btn btn-lg btn-success pull-right disabled">{% trans "Console" %}</button>
{% else %}
{% ifequal status 1 %}
<a href="#" class="btn btn-lg btn-success pull-right" title="Console port: {{ console_port }}" onclick="open_console()">{% trans "Console" %}</a>
{% else %}
<button class="btn btn-lg btn-success pull-right disabled">{% trans "Console" %}</button>
{% endifequal %}
<div class="clearfix"></div>
</div>
@ -703,15 +717,19 @@
<div role="tabpanel" class="tab-pane tab-pane-bordered active" id="destroy">
<p>{% trans "Delete storage for instance?" %}</p>
{% if request.user.is_superuser or userinstace.is_delete %}
<form class="form-group" method="post" role="form">{% csrf_token %}
<div class="checkbox" style="margin-left: 8px;">
<label>
<input type="checkbox" name="delete_disk" value="true">
<strong>{% trans "Remove Instance's data" %}</strong>
</label>
</div>
<button type="submit" class="btn btn-lg btn-success pull-right" name="delete">{% trans "Destroy" %}</button>
</form>
{% ifequal status 3 %}
<button class="btn btn-lg btn-success disabled pull-right" name="delete">{% trans "Destroy" %}</button>
{% else %}
<form class="form-group" method="post" role="form">{% csrf_token %}
<div class="checkbox" style="margin-left: 8px;">
<label>
<input type="checkbox" name="delete_disk" value="true">
<strong>{% trans "Remove Instance's data" %}</strong>
</label>
</div>
<button type="submit" class="btn btn-lg btn-success pull-right" name="delete">{% trans "Destroy" %}</button>
</form>
{% endifequal %}
{% else %}
<button class="btn btn-lg btn-success disabled pull-right" name="delete">{% trans "Destroy" %}</button>
{% endif %}

View file

@ -39,7 +39,7 @@
<th>Status</th>
<th>VCPU</th>
<th>Memory</th>
<th data-sortable="false" style="width: 165px;">Actions</th>
<th data-sortable="false" style="width:205px;">Actions</th>
</tr>
</thead>
<tbody class="searchable">
@ -64,44 +64,50 @@
<input type="hidden" name="name" value="{{ vm }}"/>
<input type="hidden" name="compute_id" value="{{ host.0 }}"/>
{% ifequal info.status 5 %}
<button class="btn btn-sm btn-default" type="submit" name="start" title="Start">
<button class="btn btn-sm btn-default" type="submit" name="poweron" title="{% trans "Power On" %}">
<span class="glyphicon glyphicon-play"></span>
</button>
<button class="btn btn-sm btn-default disabled" title="{% trans "Suspend" %}">
<span class="glyphicon glyphicon-pause"></span>
</button>
<button class="btn btn-sm btn-default disabled" title="{% trans "Destroy" %}">
<button class="btn btn-sm btn-default disabled" title="{% trans "Power Off" %}">
<span class="glyphicon glyphicon-off"></span>
</button>
<button class="btn btn-sm btn-default disabled" title="{% trans "Power Cycle" %}">
<span class="glyphicon glyphicon-stop"></span>
</button>
<button class="btn btn-sm btn-default disabled" title="{% trans "Console" %}">
<button class="btn btn-sm btn-default disabled" title="{% trans "VNC Console" %}">
<span class="glyphicon glyphicon-eye-open"></span>
</button>
{% endifequal %}
{% ifequal info.status 3 %}
<button class="btn btn-sm btn-default" type="submit" name="resume"
title="{% trans "Resume" %}">
<button class="btn btn-sm btn-default" type="submit" name="resume" title="{% trans "Resume" %}">
<span class="glyphicon glyphicon-play"></span>
</button>
<button class="btn btn-sm btn-default disabled" title="{% trans "Suspend" %}">
<span class="glyphicon glyphicon-pause"></span>
</button>
<button class="btn btn-sm btn-default disabled" title="{% trans "Destroy" %}">
<button class="btn btn-sm btn-default disabled" title="{% trans "Power Off" %}">
<span class="glyphicon glyphicon-off"></span>
</button>
<button class="btn btn-sm btn-default disabled" title="{% trans "Power Cycle" %}">
<span class="glyphicon glyphicon-stop"></span>
</button>
<button class="btn btn-sm btn-default disabled" title="{% trans "Console" %}">
<button class="btn btn-sm btn-default disabled" title="{% trans "VNC Console" %}">
<span class="glyphicon glyphicon-eye-open"></span>
</button>
{% endifequal %}
{% ifequal info.status 1 %}
<button class="btn btn-sm btn-default disabled" title="{% trans "Start" %}">
<button class="btn btn-sm btn-default disabled" title="{% trans "Power On" %}">
<span class="glyphicon glyphicon-play"></span>
</button>
<button class="btn btn-sm btn-default" type="submit" name="suspend"
title="{% trans "Suspend" %}">
<button class="btn btn-sm btn-default" type="submit" name="suspend" title="{% trans "Suspend" %}">
<span class="glyphicon glyphicon-pause"></span>
</button>
<button class="btn btn-sm btn-default" type="submit" name="destroy"
title="{% trans "Destroy" %}" onclick="return confirm('Are you sure?')">
<button class="btn btn-sm btn-default" type="submit" name="poweroff" title="{% trans "Power Off" %}" onclick="return confirm('Are you sure?')">
<span class="glyphicon glyphicon-off"></span>
</button>
<button class="btn btn-sm btn-default" type="submit" name="powercycle" title="{% trans "Power Cycle" %}" onclick="return confirm('Are you sure?')">
<span class="glyphicon glyphicon-stop"></span>
</button>
<a href="#" class="btn btn-sm btn-default" onclick='open_console("{{ host.0 }}-{{ info.uuid }}")' title="{% trans "Console" %}">
@ -155,48 +161,44 @@
<input type="hidden" name="name" value="{{ vm.name }}"/>
<input type="hidden" name="compute_id" value="{{ vm.compute_id }}"/>
{% ifequal vm.status 5 %}
<button class="btn btn-sm btn-default" type="submit" name="start" title="Start">
<button class="btn btn-sm btn-default" type="submit" name="poweron" title="Power On">
<span class="glyphicon glyphicon-play"></span>
</button>
<button class="btn btn-sm btn-default disabled" title="{% trans "Suspend" %}">
<span class="glyphicon glyphicon-pause"></span>
<button class="btn btn-sm btn-default disabled" title="{% trans "Power Off" %}">
<span class="glyphicon glyphicon-off"></span>
</button>
<button class="btn btn-sm btn-default disabled" title="{% trans "Destroy" %}">
<button class="btn btn-sm btn-default disabled" title="{% trans "Power Cycle" %}">
<span class="glyphicon glyphicon-stop"></span>
</button>
<button class="btn btn-sm btn-default disabled" title="{% trans "Console" %}">
<button class="btn btn-sm btn-default disabled" title="{% trans "VNC Console" %}">
<span class="glyphicon glyphicon-eye-open"></span>
</button>
{% endifequal %}
{% ifequal vm.status 3 %}
<button class="btn btn-sm btn-default" type="submit" name="resume"
title="{% trans "Resume" %}">
<button class="btn btn-sm btn-default disabled" title="{% trans "Power On" %}">
<span class="glyphicon glyphicon-play"></span>
</button>
<button class="btn btn-sm btn-default disabled" title="{% trans "Suspend" %}">
<span class="glyphicon glyphicon-pause"></span>
<button class="btn btn-sm btn-default disabled" title="{% trans "Power Off" %}">
<span class="glyphicon glyphicon-off"></span>
</button>
<button class="btn btn-sm btn-default disabled" title="{% trans "Destroy" %}">
<button class="btn btn-sm btn-default disabled" title="{% trans "Power Cycle" %}">
<span class="glyphicon glyphicon-stop"></span>
</button>
<button class="btn btn-sm btn-default disabled" title="{% trans "Console" %}">
<button class="btn btn-sm btn-default disabled" title="{% trans "VNC Console" %}">
<span class="glyphicon glyphicon-eye-open"></span>
</button>
{% endifequal %}
{% ifequal vm.status 1 %}
<button class="btn btn-sm btn-default disabled" title="{% trans "Start" %}">
<button class="btn btn-sm btn-default disabled" title="{% trans "Power On" %}">
<span class="glyphicon glyphicon-play"></span>
</button>
<button class="btn btn-sm btn-default" type="submit" name="suspend"
title="{% trans "Suspend" %}">
<span class="glyphicon glyphicon-pause"></span>
<button class="btn btn-sm btn-default" type="submit" name="poweroff" title="{% trans "Power Off" %}">
<span class="glyphicon glyphicon-off"></span>
</button>
<button class="btn btn-sm btn-default" type="submit" name="destroy"
title="{% trans "Destroy" %}" onclick="return confirm('Are you sure?')">
<button class="btn btn-sm btn-default" type="submit" name="powercycle" title="{% trans "Power Cycle" %}" onclick="return confirm('Are you sure?')">
<span class="glyphicon glyphicon-stop"></span>
</button>
<a href="#" class="btn btn-sm btn-default"
onclick='open_console("{{ host.0 }}-{{ vm.uuid }}")' title="{% trans "Console" %}">
<a href="#" class="btn btn-sm btn-default" onclick='open_console("{{ host.0 }}-{{ vm.uuid }}")' title="{% trans "Console" %}">
<span class="glyphicon glyphicon-eye-open"></span>
</a>
{% endifequal %}

View file

@ -38,9 +38,9 @@
<tr>
<td>{{ forloop.counter }}</td>
<td><a href="#">{{ log.user }}</a></td>
<td><a href="#">{{ log.instance }}<a></td>
<td><a href="#">{{ log.instance }}</a></td>
<td>{{ log.message }}</td>
<td>{{ log.date }}</td>
<td style="width:120px;">{{ log.date|date:"M d H:i:s" }}</td>
</tr>
{% endfor %}
</tbody>