Minor UI fixes

This commit is contained in:
Alexander Shabarshov 2025-11-03 14:50:49 +00:00
parent 2a7a24c9e7
commit e08cfa84bb
2 changed files with 21 additions and 10 deletions

View File

@ -382,6 +382,18 @@
return InvokeAsync(StateHasChanged);
}
private static IEnumerable<TreeNode<IndexTreeItem>> GetAllNodes(TreeNode<IndexTreeItem> node)
{
yield return node;
foreach (var child in node.Children)
{
foreach (var descendant in GetAllNodes(child))
{
yield return descendant;
}
}
}
private async Task OnDownload()
{
var newJob = new MigrationJob
@ -395,15 +407,14 @@
Upsert = false,
ClearDestinationBefore = false,
BatchSize = 1,
Status = _currentNodes[0].Children
.Where(x => (x.Data?.IsSelected ?? false) && x.Data.Collection != null)
.Select(x => new MigrationJob.CollectionJob
{
SourceCollection = x.Data!.Collection!.Name,
DestinationCollection = x.Data!.Collection!.Name,
})
.ToList()
Status = GetAllNodes(_currentNodes[0])
.Where(x => (x.Data?.IsSelected ?? false) && x.Data.Collection != null)
.Select(x => new MigrationJob.CollectionJob
{
SourceCollection = x.Data!.Collection!.Name,
DestinationCollection = x.Data!.Collection!.Name,
})
.ToList()
};
if (newJob.Status.Count == 0)

View File

@ -104,7 +104,7 @@
{
<div class="m-1">Sharded</div>
}
<div class="m-1 ">@NumbersUtils.ToHumanReadable(stat.TotalSize)</div>
<div class="m-1 ">@NumbersUtils.ToHumanReadable(stat.Size)</div>
}
</div>
</OptionTemplate>