Add enterprise configuration handling in SettingsPanelProviders

This commit is contained in:
Thorsten Sommer 2025-06-01 20:49:52 +02:00
parent f1fcae3ab8
commit ab84cf1093
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -45,15 +45,24 @@
</MudTd> </MudTd>
<MudTd> <MudTd>
<MudStack Row="true" Class="mb-2 mt-2" Spacing="1" Wrap="Wrap.Wrap"> <MudStack Row="true" Class="mb-2 mt-2" Spacing="1" Wrap="Wrap.Wrap">
<MudTooltip Text="@T("Open Dashboard")"> @if (context.IsEnterpriseConfiguration)
<MudIconButton Color="Color.Info" Icon="@Icons.Material.Filled.OpenInBrowser" Href="@context.UsedLLMProvider.GetDashboardURL()" Target="_blank" Disabled="@(!context.UsedLLMProvider.HasDashboard())"/> {
</MudTooltip> <MudTooltip Text="@T("This provider is managed by your organization.")">
<MudTooltip Text="@T("Edit")"> <MudIconButton Color="Color.Info" Icon="@Icons.Material.Filled.Business" Disabled="true"/>
<MudIconButton Color="Color.Info" Icon="@Icons.Material.Filled.Edit" OnClick="() => this.EditLLMProvider(context)"/> </MudTooltip>
</MudTooltip> }
<MudTooltip Text="@T("Delete")"> else
<MudIconButton Color="Color.Error" Icon="@Icons.Material.Filled.Delete" OnClick="() => this.DeleteLLMProvider(context)"/> {
</MudTooltip> <MudTooltip Text="@T("Open Dashboard")">
<MudIconButton Color="Color.Info" Icon="@Icons.Material.Filled.OpenInBrowser" Href="@context.UsedLLMProvider.GetDashboardURL()" Target="_blank" Disabled="@(!context.UsedLLMProvider.HasDashboard())"/>
</MudTooltip>
<MudTooltip Text="@T("Edit")">
<MudIconButton Color="Color.Info" Icon="@Icons.Material.Filled.Edit" OnClick="() => this.EditLLMProvider(context)"/>
</MudTooltip>
<MudTooltip Text="@T("Delete")">
<MudIconButton Color="Color.Error" Icon="@Icons.Material.Filled.Delete" OnClick="() => this.DeleteLLMProvider(context)"/>
</MudTooltip>
}
</MudStack> </MudStack>
</MudTd> </MudTd>
</RowTemplate> </RowTemplate>