Minor UI fixes
This commit is contained in:
parent
2a7a24c9e7
commit
e08cfa84bb
@ -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,7 +407,7 @@
|
||||
Upsert = false,
|
||||
ClearDestinationBefore = false,
|
||||
BatchSize = 1,
|
||||
Status = _currentNodes[0].Children
|
||||
Status = GetAllNodes(_currentNodes[0])
|
||||
.Where(x => (x.Data?.IsSelected ?? false) && x.Data.Collection != null)
|
||||
.Select(x => new MigrationJob.CollectionJob
|
||||
{
|
||||
@ -403,7 +415,6 @@
|
||||
DestinationCollection = x.Data!.Collection!.Name,
|
||||
})
|
||||
.ToList()
|
||||
|
||||
};
|
||||
|
||||
if (newJob.Status.Count == 0)
|
||||
|
||||
@ -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>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user