1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-01-12 00:15:19 +00:00

increase nginx timeout. Enable live snapshot.

This commit is contained in:
catborise 2020-11-06 14:30:41 +03:00
parent 9aed7c7716
commit 4b7554ea14
4 changed files with 16 additions and 28 deletions

View file

@ -196,9 +196,9 @@ server {
proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for;
proxy_set_header Host $host:$server_port; proxy_set_header Host $host:$server_port;
proxy_set_header X-Forwarded-Proto $remote_addr; proxy_set_header X-Forwarded-Proto $remote_addr;
proxy_connect_timeout 600; proxy_connect_timeout 1800;
proxy_read_timeout 600; proxy_read_timeout 1800;
proxy_send_timeout 600; proxy_send_timeout 1800;
client_max_body_size 1024M; client_max_body_size 1024M;
} }
} }

View file

@ -16,9 +16,9 @@ server {
proxy_set_header Host $host:$server_port; proxy_set_header Host $host:$server_port;
proxy_set_header X-Forwarded-Proto $remote_addr; proxy_set_header X-Forwarded-Proto $remote_addr;
proxy_set_header X-Forwarded-Ssl off; proxy_set_header X-Forwarded-Ssl off;
proxy_connect_timeout 600; proxy_connect_timeout 1800;
proxy_read_timeout 600; proxy_read_timeout 1800;
proxy_send_timeout 600; proxy_send_timeout 1800;
client_max_body_size 1024M; client_max_body_size 1024M;
} }

View file

@ -18,25 +18,17 @@
<!-- Tab panes --> <!-- Tab panes -->
<div class="tab-content"> <div class="tab-content">
<div role="tabpanel" class="tab-pane tab-pane-bordered active" id="takesnapshot"> <div role="tabpanel" class="tab-pane tab-pane-bordered active" id="takesnapshot">
{% if instance.status == 5 %} <p>{% trans "This may take more than an hour, depending on how much content is on your instance and how large the disk is. It could cause web server timeout.." %}</p>
<p>{% trans "This may take more than an hour, depending on how much content is on your instance and how large the disk is." %}</p> <form action="{% url 'instances:snapshot' instance.id %}" class="form-inline" method="post" role="form" aria-label="Create snapshot form">
<form action="{% url 'instances:snapshot' instance.id %}" class="form-inline" method="post" role="form" aria-label="Create snapshot form"> {% csrf_token %}
{% csrf_token %} <div class="form-group row">
<div class="form-group row"> <div class="col-sm-12">
<div class="col-sm-12"> <input type="text" class="form-control form-control-lg" name="name" placeholder="{% trans "Enter Snapshot Name" %}" maxlength="14">
<input type="text" class="form-control form-control-lg" name="name" placeholder="{% trans "Enter Snapshot Name" %}" maxlength="14">
</div>
</div> </div>
{% if instance.status == 5 %} </div>
<input type="submit" class="btn btn-lg btn-success float-right" name="snapshot" value="{% trans "Take Snapshot" %}"> <input type="submit" class="btn btn-lg btn-success float-right" name="snapshot" value="{% trans "Take Snapshot" %}" onclick="showPleaseWaitDialog();">
{% else %} </form>
<button class="btn btn-lg btn-success float-right disabled">{% trans "Take Snapshot" %}</button> <div class="clearfix"></div>
{% endif %}
</form>
<div class="clearfix"></div>
{% else %}
<p>{% trans "To take a snapshot please Power Off the instance." %}</p>
{% endif %}
</div> </div>
<div role="tabpanel" class="tab-pane tab-pane-bordered" id="managesnapshot"> <div role="tabpanel" class="tab-pane tab-pane-bordered" id="managesnapshot">
{% if instance.snapshots %} {% if instance.snapshots %}

View file

@ -1063,11 +1063,7 @@ def clone(request, pk):
} }
messages.error(request, msg) messages.error(request, msg)
elif check_instance: elif check_instance:
<<<<<<< HEAD
msg = _("Instance '%(clone_name)s' already exists!") % {"clone_name": clone_data["name"]} msg = _("Instance '%(clone_name)s' already exists!") % {"clone_name": clone_data["name"]}
=======
msg = _("Instance '%(clone_name)s' already exists!") % {'clone_name': clone_data['name']}
>>>>>>> 159e06221af435700047a8e5ababe758a12d7579
messages.error(request, msg) messages.error(request, msg)
elif not re.match(r"^[a-zA-Z0-9-]+$", clone_data["name"]): elif not re.match(r"^[a-zA-Z0-9-]+$", clone_data["name"]):
msg = _("Instance name '%(clone_name)s' contains invalid characters!") % {"clone_name": clone_data["name"]} msg = _("Instance name '%(clone_name)s' contains invalid characters!") % {"clone_name": clone_data["name"]}