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