Minor UI fixes
This commit is contained in:
parent
2a7a24c9e7
commit
e08cfa84bb
@ -382,6 +382,18 @@
|
|||||||
return InvokeAsync(StateHasChanged);
|
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()
|
private async Task OnDownload()
|
||||||
{
|
{
|
||||||
var newJob = new MigrationJob
|
var newJob = new MigrationJob
|
||||||
@ -395,15 +407,14 @@
|
|||||||
Upsert = false,
|
Upsert = false,
|
||||||
ClearDestinationBefore = false,
|
ClearDestinationBefore = false,
|
||||||
BatchSize = 1,
|
BatchSize = 1,
|
||||||
Status = _currentNodes[0].Children
|
Status = GetAllNodes(_currentNodes[0])
|
||||||
.Where(x => (x.Data?.IsSelected ?? false) && x.Data.Collection != null)
|
.Where(x => (x.Data?.IsSelected ?? false) && x.Data.Collection != null)
|
||||||
.Select(x => new MigrationJob.CollectionJob
|
.Select(x => new MigrationJob.CollectionJob
|
||||||
{
|
{
|
||||||
SourceCollection = x.Data!.Collection!.Name,
|
SourceCollection = x.Data!.Collection!.Name,
|
||||||
DestinationCollection = x.Data!.Collection!.Name,
|
DestinationCollection = x.Data!.Collection!.Name,
|
||||||
})
|
})
|
||||||
.ToList()
|
.ToList()
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (newJob.Status.Count == 0)
|
if (newJob.Status.Count == 0)
|
||||||
|
|||||||
@ -104,7 +104,7 @@
|
|||||||
{
|
{
|
||||||
<div class="m-1">Sharded</div>
|
<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>
|
</div>
|
||||||
</OptionTemplate>
|
</OptionTemplate>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user