Show spinner when decompressing files.

This commit is contained in:
Dane Everitt 2016-10-28 15:54:57 -04:00
parent ac82194ed4
commit 449324fa1c
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53

View file

@ -325,6 +325,15 @@ class ActionsClass {
const compPath = decodeURIComponent(nameBlock.data('path')); const compPath = decodeURIComponent(nameBlock.data('path'));
const compName = decodeURIComponent(nameBlock.data('name')); const compName = decodeURIComponent(nameBlock.data('name'));
swal({
title: '<i class="fa fa-refresh fa-spin"></i> Decompressing...',
text: 'This might take a few seconds to complete.',
html: true,
allowOutsideClick: false,
allowEscapeKey: false,
showConfirmButton: false,
});
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
url: `{{ $node->scheme }}://{{ $node->fqdn }}:{{ $node->daemonListen }}/server/file/decompress`, url: `{{ $node->scheme }}://{{ $node->fqdn }}:{{ $node->daemonListen }}/server/file/decompress`,
@ -337,6 +346,7 @@ class ActionsClass {
files: `${compPath}${compName}` files: `${compPath}${compName}`
}) })
}).done(data => { }).done(data => {
swal.close();
Files.list(compPath); Files.list(compPath);
}).fail(jqXHR => { }).fail(jqXHR => {
console.error(jqXHR); console.error(jqXHR);