Skip to content

Commit 3d6ec29

Browse files
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>
1 parent 66a5846 commit 3d6ec29

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

plugins/backup/dummy/src/main/java/org/apache/cloudstack/backup/DummyBackupProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ public boolean supportsInstanceFromBackup() {
191191

192192
@Override
193193
public Pair<Long, Long> getBackupStorageStats(Long zoneId) {
194-
return new Pair<>(8L * 1024 * 1024 * 1024, 10L * 1024 * 1024 * 1024);
194+
return new Pair<>(0L, 0L);
195195
}
196196

197197
@Override

server/src/main/java/org/apache/cloudstack/backup/BackupManagerImpl.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2161,6 +2161,9 @@ public BackupResponse createBackupResponse(Backup backup, Boolean listVmDetails)
21612161

21622162
@Override
21632163
public CapacityVO getBackupStorageUsedStats(Long zoneId) {
2164+
if (isDisabled(zoneId)) {
2165+
return new CapacityVO(null, zoneId, null, null, 0L, 0L, Capacity.CAPACITY_TYPE_BACKUP_STORAGE);
2166+
}
21642167
final BackupProvider backupProvider = getBackupProvider(zoneId);
21652168
Pair<Long, Long> backupUsage = backupProvider.getBackupStorageStats(zoneId);
21662169
return new CapacityVO(null, zoneId, null, null, backupUsage.first(), backupUsage.second(), Capacity.CAPACITY_TYPE_BACKUP_STORAGE);

ui/src/views/dashboard/CapacityDashboard.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,7 @@ export default {
673673
674674
.dashboard-storage {
675675
width: 100%;
676+
min-height: 370px;
676677
overflow-x:hidden;
677678
overflow-y: scroll;
678679
max-height: 370px;

0 commit comments

Comments
 (0)