Don't show backup in list_capacity for dummy plugin or if backup_framework is disabled (#11485)

* Don't show backup storage in list_capacity for dummy plugin or if backup_framework is disabled

* Fix the tile to full size

---------

Co-authored-by: Harikrishna Patnala <harikrishna.patnala@gmail.com>
This commit is contained in:
Abhisar Sinha 2025-09-03 15:50:46 +05:30 committed by GitHub
parent 66a584624f
commit 3d6ec29c9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 1 deletions

View File

@ -191,7 +191,7 @@ public class DummyBackupProvider extends AdapterBase implements BackupProvider {
@Override
public Pair<Long, Long> getBackupStorageStats(Long zoneId) {
return new Pair<>(8L * 1024 * 1024 * 1024, 10L * 1024 * 1024 * 1024);
return new Pair<>(0L, 0L);
}
@Override

View File

@ -2161,6 +2161,9 @@ public class BackupManagerImpl extends ManagerBase implements BackupManager {
@Override
public CapacityVO getBackupStorageUsedStats(Long zoneId) {
if (isDisabled(zoneId)) {
return new CapacityVO(null, zoneId, null, null, 0L, 0L, Capacity.CAPACITY_TYPE_BACKUP_STORAGE);
}
final BackupProvider backupProvider = getBackupProvider(zoneId);
Pair<Long, Long> backupUsage = backupProvider.getBackupStorageStats(zoneId);
return new CapacityVO(null, zoneId, null, null, backupUsage.first(), backupUsage.second(), Capacity.CAPACITY_TYPE_BACKUP_STORAGE);

View File

@ -673,6 +673,7 @@ export default {
.dashboard-storage {
width: 100%;
min-height: 370px;
overflow-x:hidden;
overflow-y: scroll;
max-height: 370px;