\x89PNG\r\n\x1a\n\x00\x00\x00\x0DIHDR\x00\x00\x00\x01\x00 \x00\x00\x01\x08\x06\x00\x00\x00\x1F\x15\xC4\x89\x00\x00\x00 \x0AIDATx\x9Ccb\x00\x00\x00\x06\x00\x03\x1A\x05\x9D\x00\x00 \x00\x00IEND\xAE\x42\x60\x82
| Path : /var/www/html/yedekledb24/DatabaseBackupMasterv7/ |
|
B-Con CMD Config cPanel C-Rdp D-Log Info Jump Mass Ransom Symlink vHost Zone-H |
| Current File : /var/www/html/yedekledb24/DatabaseBackupMasterv7/utils.py |
def format_size(size_bytes):
"""Format size in bytes to human-readable format"""
if size_bytes is None:
return "0 B"
for unit in ['B', 'KB', 'MB', 'GB', 'TB']:
if size_bytes < 1024.0:
return f"{size_bytes:.2f} {unit}"
size_bytes /= 1024.0
return f"{size_bytes:.2f} PB"
# Icons for database and storage types
def get_db_type_icon(db_type):
"""Return the appropriate icon class for database type."""
if db_type == 'mysql':
return 'fa-database text-primary'
elif db_type == 'mariadb':
return 'fa-database text-info'
elif db_type == 'postgresql':
return 'fa-database text-success'
else:
return 'fa-database'
def get_storage_type_icon(storage_type):
"""Return the appropriate icon class for storage type."""
if storage_type == 'smb':
return 'fa-folder text-primary'
elif storage_type == 'nfs':
return 'fa-folder text-success'
elif storage_type == 'ftp':
return 'fa-folder text-danger'
else:
return 'fa-folder'