mirror of
https://github.com/Sebclem/hassio-nextcloud-backup.git
synced 2024-11-22 01:02:59 +01:00
🔨 periodically checking update for local snapshots list
This commit is contained in:
parent
a2c93646a6
commit
b28796a66c
@ -346,6 +346,7 @@
|
||||
<script src="./js/index.js"></script>
|
||||
<script>
|
||||
var last_status = "";
|
||||
var last_local_snap = "";
|
||||
|
||||
var loadingModal = null;
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
@ -357,12 +358,16 @@
|
||||
M.Dropdown.init(drops, { constrainWidth: false, coverTrigger: false, alignment: 'right', onOpenStart: () => $('#setting-trigger').addClass('active'), onCloseEnd: () => $('#setting-trigger').removeClass('active') });
|
||||
|
||||
setInterval(update_status, 500);
|
||||
setInterval(updateLocalSnaps, 2000);
|
||||
listeners();
|
||||
|
||||
});
|
||||
|
||||
function updateLocalSnaps() {
|
||||
$.get('./api/formated-local-snap', (data) => {
|
||||
if (JSON.stringify(data) === last_local_snap)
|
||||
return;
|
||||
last_local_snap = JSON.stringify(data);
|
||||
$('#local_snaps').empty();
|
||||
$('#local_snaps').html(data);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user