Merge remote-tracking branch 'origin/admin-warning-1176' into staging

This commit is contained in:
David Benque 2023-09-29 16:19:17 +01:00
commit 24b94dc8e4

View File

@ -2091,11 +2091,16 @@ Example
onRefreshStats.reg(onRefresh);
return $div;
};
Messages.admin_diskUsageWarning = "Depending on the size of the data stored on your instance, generating this report can consume all the memory available on your server and lead to a crash. Use with caution!"; // XXX
create['disk-usage'] = function () {
var key = 'disk-usage';
var $div = makeBlock(key, true); // Msg.admin_diskUsageHint, .admin_diskUsageTitle, .admin_diskUsageButton
var called = false;
$div.find('button').click(function () {
UI.confirm(Messages.admin_diskUsageWarning, function (yes) {
if (!yes) { return; }
$div.find('button').hide();
if (called) { return; }
called = true;
@ -2125,6 +2130,8 @@ Example
})));
});
});
});
return $div;
};