APmanageur Wi-Fi V1.0
This commit is contained in:
1 parent
7d04d142e4
commit
ab4ed099b7
1 file changed
+7
-4
+7
-4
@@ -10814,6 +10814,7 @@ ${vpnBadgeTopo}
|
||||
Onglet Sauvegardes : Planification Cron & Gestion des fichiers
|
||||
============================================================ */
|
||||
let serverBackupsCache = [];
|
||||
let serverBackupsTotalSize = '0 o';
|
||||
|
||||
function initBackupCronSelects() {
|
||||
const hSel = $('backupCronHour');
|
||||
@@ -10901,12 +10902,16 @@ ${vpnBadgeTopo}
|
||||
|
||||
function renderServerBackupsTable(backups, totalSizeStr) {
|
||||
serverBackupsCache = Array.isArray(backups) ? backups : [];
|
||||
if (typeof totalSizeStr === 'string' && totalSizeStr) {
|
||||
const cleanSize = totalSizeStr.replace(/^.*:\s*/, '').trim();
|
||||
if (cleanSize) serverBackupsTotalSize = cleanSize;
|
||||
}
|
||||
const tbody = $('backupsTableBody');
|
||||
const summary = $('backupsListSummary');
|
||||
if (summary) {
|
||||
summary.textContent = t('backup_list_summary', '{count} sauvegarde(s) • Espace utilisé : {size}')
|
||||
.replace('{count}', String(serverBackupsCache.length))
|
||||
.replace('{size}', totalSizeStr || '0 o');
|
||||
.replace('{size}', serverBackupsTotalSize || '0 o');
|
||||
}
|
||||
if (!tbody) return;
|
||||
if (!serverBackupsCache.length) {
|
||||
@@ -11182,9 +11187,7 @@ ${vpnBadgeTopo}
|
||||
});
|
||||
// Mettre à jour les boutons Distant dans la table des sauvegardes
|
||||
if (serverBackupsCache && serverBackupsCache.length) {
|
||||
const summary = $('backupsListSummary');
|
||||
const sumText = summary ? summary.textContent.split('•')[1]?.trim() : '';
|
||||
renderServerBackupsTable(serverBackupsCache, sumText);
|
||||
renderServerBackupsTable(serverBackupsCache, serverBackupsTotalSize);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user