diff --git a/logs/views.py b/logs/views.py index 0d779d8..ff8493f 100644 --- a/logs/views.py +++ b/logs/views.py @@ -5,4 +5,17 @@ from logs.models import Logs def showlogs(request): + """ + :param request: + :return: + """ + + if not request.user.is_authenticated(): + return HttpResponseRedirect(reverse('index')) + + if not request.user.is_superuser: + return HttpResponseRedirect(reverse('index')) + + + return render(request, 'showlogs.html', locals()) \ No newline at end of file diff --git a/templates/instance.html b/templates/instance.html index 118ba79..da4e724 100644 --- a/templates/instance.html +++ b/templates/instance.html @@ -97,7 +97,7 @@ {% trans "Power Off" %} - {% if status %} + {% if request.user.is_superuser %}
{% trans "This action suspends the instance." %}
- -{% trans "This action restore the instance after suspend." %}
- -{% trans "This action suspends the instance." %}
+ +{% trans "This action restore the instance after suspend." %}
+ +{% trans "Click on Boot button to start this instance." %}
@@ -375,31 +381,33 @@ {% trans "Media" %} -{% trans "Autostart your instance when host server is power on" %}
- - -{% trans "To set console's type, shutdown the instance." %}
- -{% trans "To create console password, shutdown the instance." %}
- -{% trans "To set console's keymap, shutdown the instance." %}
- - -{% trans "Create a clone" %}
- - -{% trans "For migration both host servers must have equal settings and OS type" %}
-