2025-02-15 14:41:12 +00:00
@using AIStudio.Settings.DataModel
2025-05-18 19:31:15 +00:00
@inherits MSGComponentBase
2025-02-15 14:41:12 +00:00
2025-02-09 11:36:37 +00:00
<MudDialog>
<DialogContent>
2025-05-18 19:31:15 +00:00
<TextInfoLine Icon="@Icons.Material.Filled.Tag" Label="@T("Data source name")" Value="@this.DataSource.Name" ClipboardTooltipSubject="@T("the data source name")"/>
2025-02-09 11:36:37 +00:00
2025-05-18 19:31:15 +00:00
<TextInfoLine Icon="@Icons.Material.Filled.FolderOpen" Label="@T("Path")" Value="@this.DataSource.Path" ClipboardTooltipSubject="@T("this path")"/>
2025-02-09 11:36:37 +00:00
@if (!this.IsDirectoryAvailable)
{
<MudJustifiedText Typo="Typo.body1" Color="Color.Error" Class="mb-3">
2025-05-18 19:31:15 +00:00
@T("The directory chosen for the data source does not exist anymore. Please edit the data source and correct the path.")
2025-02-09 11:36:37 +00:00
</MudJustifiedText>
}
else
{
<MudJustifiedText Typo="Typo.body1" Color="Color.Tertiary" Class="mb-3">
2025-05-18 19:31:15 +00:00
@T("The directory chosen for the data source exists.")
2025-02-09 11:36:37 +00:00
</MudJustifiedText>
}
2025-05-18 19:31:15 +00:00
<TextInfoLine Icon="@Icons.Material.Filled.Layers" Label="@T("Embedding name")" Value="@this.embeddingProvider.Name" ClipboardTooltipSubject="@T("the embedding name")"/>
2025-02-09 11:36:37 +00:00
@if (this.IsCloudEmbedding)
{
<MudJustifiedText Typo="Typo.body1" Color="Color.Error" Class="mb-3">
2025-05-18 19:31:15 +00:00
@string.Format(T("The embedding runs in the cloud. All your data from the folder '{0}' and all its subdirectories will be sent to the cloud."), this.DataSource.Path)
2025-02-09 11:36:37 +00:00
</MudJustifiedText>
}
else
{
<MudJustifiedText Typo="Typo.body1" Color="Color.Tertiary" Class="mb-3">
2025-05-18 19:31:15 +00:00
@T("The embedding runs locally or in your organization. Your data is not sent to the cloud.")
2025-02-09 11:36:37 +00:00
</MudJustifiedText>
}
2025-05-18 19:31:15 +00:00
<TextInfoLines Label="@T("Your security policy")" MaxLines="3" Value="@this.DataSource.SecurityPolicy.ToInfoText()" Color="@this.DataSource.SecurityPolicy.GetColor()" ClipboardTooltipSubject="@T("your security policy")"/>
2025-02-15 14:41:12 +00:00
2025-05-18 19:31:15 +00:00
<TextInfoLine Icon="@Icons.Material.Filled.SquareFoot" Label="@T("Number of files")" Value="@this.NumberFilesInDirectory" ClipboardTooltipSubject="@T("the number of files in the directory")"/>
<TextInfoLines Label="@T("Files list")" MaxLines="14" Value="@this.directoryFiles.ToString()" ClipboardTooltipSubject="@T("the files list")"/>
2025-02-09 11:36:37 +00:00
@if (this.directorySizeNumFiles > 100)
{
<MudJustifiedText Typo="Typo.body1" Color="Color.Warning" Class="mb-3">
2025-05-18 19:31:15 +00:00
@string.Format(T("For performance reasons, only the first 100 files are shown. The directory contains {0} files in total."), this.NumberFilesInDirectory)
2025-02-09 11:36:37 +00:00
</MudJustifiedText>
}
2025-05-18 19:31:15 +00:00
<TextInfoLine Icon="@Icons.Material.Filled.SquareFoot" Label="@T("Total directory size")" Value="@this.directorySizeBytes.FileSize()" ClipboardTooltipSubject="@T("the total directory size")"/>
2025-02-09 11:36:37 +00:00
</DialogContent>
<DialogActions>
@if (this.IsOperationInProgress)
{
<MudProgressLinear Color="Color.Primary" Indeterminate="true" Class="ml-5 mr-5"/>
}
2025-05-18 19:31:15 +00:00
<MudButton OnClick="@this.Close" Variant="Variant.Filled">
@T("Close")
</MudButton>
2025-02-09 11:36:37 +00:00
</DialogActions>
</MudDialog>