Added file patterns and exclusions to folder data sources (#1057)

Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
Paul KoudelkaandThorsten Sommer authored and GitHub committed 2026-10-17 19:12:43 +02:00
1 parent 249fc778a2
commit 031874cebf
75 files changed
+4808 -589

No files matched your search

+82 -2
View File
@@ -94,7 +94,7 @@
</MudText>
}
@if (status.PermanentlySkippedDocuments > 0)
@if (status.SkippedDocuments > 0)
{
<MudText Typo="Typo.body2">
@this.GetSkippedText(status)
@@ -120,7 +120,7 @@
hundred scanned documents were skipped otherwise buries the handful of
files somebody has to look at.
*@
@if (status.Failures.Count > 0)
@if (status.Failures.Count > 0 || status.IgnoredFiles.Count > 0)
{
<MudExpansionPanels MultiExpansion="@true" Class="mt-2">
@foreach (var group in this.GetFailureGroups(status))
@@ -189,9 +189,89 @@
</MudStack>
</ExpansionPanel>
}
@foreach (var group in this.GetIgnoredFileGroups(status))
{
<ExpansionPanel HeaderIcon="@group.Cause.Icon" IconColor="@group.Cause.Color" IconSize="Size.Small" HeaderTypo="Typo.subtitle1" HeaderClass="expansion-panel-header-compact" HeaderText="@GetIgnoredGroupHeader(group)">
<MudStack Spacing="3">
<MudText Typo="Typo.body2">@group.Cause.Description</MudText>
<MudStack Row="@true" Wrap="Wrap.Wrap" Spacing="2" AlignItems="AlignItems.Center">
<MudChip T="string" Size="Size.Small" Color="Color.Default" Variant="Variant.Outlined">
@T("Not added to the index")
</MudChip>
@if (group.Cause.NeedsDataSourceSettings)
{
<MudSpacer/>
<MudButton Variant="Variant.Text" Size="Size.Small" Color="Color.Primary" StartIcon="@Icons.Material.Filled.Settings" OnClick="@this.OpenDataSourceSettings">
@T("Manage the data sources")
</MudButton>
}
</MudStack>
<MudTable Items="@group.Files" Dense="@true" Hover="@true" Elevation="0" Breakpoint="Breakpoint.None" RowsPerPage="10" Class="border-dashed border rounded-lg">
<ColGroup>
<col/>
<col style="width: 7em;"/>
</ColGroup>
<HeaderContent>
<MudTh>@T("File")</MudTh>
<MudTh>@T("Actions")</MudTh>
</HeaderContent>
<RowTemplate>
<MudTd Style="white-space: normal; overflow-wrap: anywhere;">
<MudText Typo="Typo.body2">@GetFileName(context.FilePath)</MudText>
<MudText Typo="Typo.caption" Class="mud-text-secondary d-block">@context.FilePath</MudText>
</MudTd>
<MudTd>
@if (CanShowInFileManager(status, context.FilePath))
{
<MudTooltip Text="@T("Show this file in the file browser of your system")">
<MudIconButton Icon="@Icons.Material.Filled.FolderOpen" Color="Color.Info" Size="Size.Small" OnClick="@(async () => await this.ShowInFileManager(context.FilePath))"/>
</MudTooltip>
}
</MudTd>
</RowTemplate>
<PagerContent>
<MudTablePager PageSizeOptions="@PAGE_SIZE_OPTIONS"/>
</PagerContent>
</MudTable>
</MudStack>
</ExpansionPanel>
}
</MudExpansionPanels>
}
@if (status.FilePatternExclusions.Count > 0 || status.ExcludedFolders.Count > 0)
{
<MudPaper Class="pa-3 border-dashed border rounded-lg mt-2" Elevation="0">
<MudStack Spacing="2">
<MudStack Row="@true" AlignItems="AlignItems.Center" Spacing="2">
<MudIcon Icon="@Icons.Material.Filled.FilterAlt" Color="Color.Default" Size="Size.Small"/>
<MudText Typo="Typo.subtitle1">@T("Outside the selection")</MudText>
<MudSpacer/>
<MudButton Variant="Variant.Text" Size="Size.Small" Color="Color.Primary" StartIcon="@Icons.Material.Filled.Settings" OnClick="@this.OpenDataSourceSettings">
@T("Manage the data sources")
</MudButton>
</MudStack>
<MudText Typo="Typo.body2">
@T("These file types and folders were found in the folder of the data source, but its file patterns or its list of excluded files and folders leave them out. They are intentionally excluded and do not affect the indexing status. Excluded folders are not searched at all.")
</MudText>
<MudStack Row="@true" Wrap="Wrap.Wrap" Spacing="1">
@foreach (var group in status.ExcludedFolders)
{
<MudChip T="string" Size="Size.Small" Color="Color.Default" Variant="Variant.Outlined" Icon="@Icons.Material.Filled.FolderOff">
@this.GetExcludedFolderGroupText(group)
</MudChip>
}
@foreach (var group in status.FilePatternExclusions)
{
<MudChip T="string" Size="Size.Small" Color="Color.Default" Variant="Variant.Outlined">
@this.GetFilePatternExclusionGroupText(group)
</MudChip>
}
</MudStack>
</MudStack>
</MudPaper>
}
@*
Shown next to the list, not instead of it: the list says which files failed,
while this is the one sentence about the data source as a whole. Hiding it