diff --git a/app/MindWork AI Studio/Pages/Information.razor.cs b/app/MindWork AI Studio/Pages/Information.razor.cs index 9fd37802..b9172217 100644 --- a/app/MindWork AI Studio/Pages/Information.razor.cs +++ b/app/MindWork AI Studio/Pages/Information.razor.cs @@ -117,7 +117,10 @@ public partial class Information : MSGComponentBase protected override async Task OnInitializedAsync() { + this.ApplyFilters([], [ Event.ENTERPRISE_ENVIRONMENTS_CHANGED ]); await base.OnInitializedAsync(); + + this.RefreshEnterpriseConfigurationState(); this.osLanguage = await this.RustService.ReadUserLanguage(); this.logPaths = await this.RustService.GetLogPaths(); @@ -141,10 +144,8 @@ public partial class Information : MSGComponentBase switch (triggeredEvent) { case Event.PLUGINS_RELOADED: - this.configPlugins = PluginFactory.AvailablePlugins - .Where(x => x.Type is PluginType.CONFIGURATION) - .OfType() - .ToList(); + case Event.ENTERPRISE_ENVIRONMENTS_CHANGED: + this.RefreshEnterpriseConfigurationState(); await this.InvokeAsync(this.StateHasChanged); break; } @@ -154,6 +155,16 @@ public partial class Information : MSGComponentBase #endregion + private void RefreshEnterpriseConfigurationState() + { + this.configPlugins = PluginFactory.AvailablePlugins + .Where(x => x.Type is PluginType.CONFIGURATION) + .OfType() + .ToList(); + + this.enterpriseEnvironments = EnterpriseEnvironmentService.CURRENT_ENVIRONMENTS.ToList(); + } + private async Task DeterminePandocVersion() { this.pandocInstallation = await Pandoc.CheckAvailabilityAsync(this.RustService, false); diff --git a/app/MindWork AI Studio/Tools/Event.cs b/app/MindWork AI Studio/Tools/Event.cs index 6e899a79..f13d5ead 100644 --- a/app/MindWork AI Studio/Tools/Event.cs +++ b/app/MindWork AI Studio/Tools/Event.cs @@ -11,6 +11,7 @@ public enum Event STARTUP_PLUGIN_SYSTEM, STARTUP_COMPLETED, STARTUP_ENTERPRISE_ENVIRONMENT, + ENTERPRISE_ENVIRONMENTS_CHANGED, PLUGINS_RELOADED, SHOW_ERROR, SHOW_WARNING, diff --git a/app/MindWork AI Studio/Tools/Services/EnterpriseEnvironmentService.cs b/app/MindWork AI Studio/Tools/Services/EnterpriseEnvironmentService.cs index 708993d0..4d38eb15 100644 --- a/app/MindWork AI Studio/Tools/Services/EnterpriseEnvironmentService.cs +++ b/app/MindWork AI Studio/Tools/Services/EnterpriseEnvironmentService.cs @@ -171,6 +171,9 @@ public sealed class EnterpriseEnvironmentService(ILogger(null, Event.ENTERPRISE_ENVIRONMENTS_CHANGED); } catch (Exception e) {