Skip to content

Commit

Permalink
fix: home display
Browse files Browse the repository at this point in the history
  • Loading branch information
Dim145 committed Feb 14, 2024
1 parent 54cad9c commit cde95de
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions DatabaseBackupManager/Controllers/HomeController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,7 @@ public IActionResult Index()
{
switch (Seeds.StorageSettings.StorageType)
{
case "S3":
ViewBag.Drives = new Dictionary<string, string>[]
{
new()
{
{ "Name", Seeds.StorageSettings.S3Bucket },
{ "Info", "" },
{ "Total", "Unlimited" },
{ "Used", DbContext.Backups.Sum(b => b.Size).ToString() }
}
};
break;
default:
case "Local":
ViewBag.Drives = DriveInfo.GetDrives()
.Where(d => Directory.Exists(d.VolumeLabel) || Directory.Exists(d.Name))
.Where(d =>
Expand All @@ -62,6 +50,18 @@ public IActionResult Index()
})
.ToArray();
break;
default:
ViewBag.Drives = new Dictionary<string, string>[]
{
new()
{
{ "Name", Seeds.StorageSettings.S3Bucket },
{ "Info", "" },
{ "Total", "Unlimited" },
{ "Used", DbContext.Backups.Sum(b => b.Size).ToString() }
}
};
break;
}

return View();
Expand Down

0 comments on commit cde95de

Please sign in to comment.