From 853aa4728fb27a95444ba3213ac52ddccbb98925 Mon Sep 17 00:00:00 2001 From: Dharmishtha Date: Sat, 20 Dec 2025 10:24:36 -0800 Subject: [PATCH 1/2] Merge pull request #5237 from Particular/ravendb-custom-host-name-bug-fix Point RavenDB Management Studio link to localhost --- .../UI/AdvancedOptions/ServiceControlAdvancedView.xaml | 4 ++-- .../AdvancedOptions/ServiceControlAdvancedViewModel.cs | 2 +- .../Instances/ServiceControlBaseService.cs | 10 +++------- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/ServiceControl.Config/UI/AdvancedOptions/ServiceControlAdvancedView.xaml b/src/ServiceControl.Config/UI/AdvancedOptions/ServiceControlAdvancedView.xaml index 896125aca5..00da1aaecd 100644 --- a/src/ServiceControl.Config/UI/AdvancedOptions/ServiceControlAdvancedView.xaml +++ b/src/ServiceControl.Config/UI/AdvancedOptions/ServiceControlAdvancedView.xaml @@ -54,12 +54,12 @@ Visibility="{Binding InMaintenanceMode, Converter={StaticResource boolToVis}}" Margin="0,0,0,20" > - This instance is in database maintenance mode. All message processing is disabled and the REST API is unavailable.ServicePulse and ServiceInsight cannot connect to this instance while it is in maintenance mode.Launch + This instance is in database maintenance mode. All message processing is disabled and the REST API is unavailable.ServicePulse and ServiceInsight cannot connect to this instance while it is in maintenance mode.Launch RavenDB Management Studio diff --git a/src/ServiceControl.Config/UI/AdvancedOptions/ServiceControlAdvancedViewModel.cs b/src/ServiceControl.Config/UI/AdvancedOptions/ServiceControlAdvancedViewModel.cs index 06a650ce21..3bfed4981f 100644 --- a/src/ServiceControl.Config/UI/AdvancedOptions/ServiceControlAdvancedViewModel.cs +++ b/src/ServiceControl.Config/UI/AdvancedOptions/ServiceControlAdvancedViewModel.cs @@ -81,7 +81,7 @@ ForceUpgradeAuditInstanceCommand forceUpgradeAuditCommand public bool InMaintenanceMode => ServiceControlInstance.InMaintenanceMode; - public string StorageUrl => ServiceControlInstance.StorageUrl; + public string RavenStudioUrl => ServiceControlInstance.RavenDbStudioUrl; public bool IsRunning { diff --git a/src/ServiceControlInstaller.Engine/Instances/ServiceControlBaseService.cs b/src/ServiceControlInstaller.Engine/Instances/ServiceControlBaseService.cs index eb9e8f8f97..5e2a3a762f 100644 --- a/src/ServiceControlInstaller.Engine/Instances/ServiceControlBaseService.cs +++ b/src/ServiceControlInstaller.Engine/Instances/ServiceControlBaseService.cs @@ -32,16 +32,12 @@ protected ServiceControlBaseService(IWindowsServiceController service) /// /// Raven management URL /// - public string StorageUrl + public string RavenDbStudioUrl { get { - string host = HostName switch - { - "*" or "+" => "localhost", - _ => HostName, - }; - return $"http://{host}:{DatabaseMaintenancePort}/studio/index.html#databases"; + var port = DatabaseMaintenancePort ?? 33334; + return $"http://localhost:{port}/studio/index.html#databases"; } } From 8430334dee46be0ff052bc6efb92632a4018cb52 Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 23 Dec 2025 01:04:08 -0600 Subject: [PATCH 2/2] # Fix RavenDB Management Studio link binding issue # Fix RavenDB Management Studio link binding issue ## Summary This PR fixes a property name mismatch introduced in PR #5237 that caused the RavenDB Management Studio hyperlink to be grayed out and non-functional in the ServiceControl Management UI. ## Problem After merging PR #5237 "Point RavenDB Management Studio link to localhost", the RavenDB Management Studio link in the Advanced Options maintenance mode section became unresponsive. The link appeared grayed out and clicking it had no effect. ## Root Cause PR #5237 renamed the property from `StorageUrl` to `RavenDbStudioUrl` in `ServiceControlBaseService.cs`, but the corresponding ViewModel property in `ServiceControlAdvancedViewModel.cs` was incorrectly named `RavenStudioUrl` (missing "Db"). This property name mismatch caused the WPF data binding to fail. ## Solution - Fixed property name in `ServiceControlAdvancedViewModel.cs` from `RavenStudioUrl` to `RavenDbStudioUrl` - This ensures proper binding between the ViewModel and the underlying ServiceControlInstance property ## Files Changed - `src/ServiceControl.Config/UI/AdvancedOptions/ServiceControlAdvancedViewModel.cs` ## Testing - RavenDB Management Studio hyperlink now appears as an active blue link - Clicking the link properly opens the RavenDB Studio at `http://localhost:{port}/studio/index.html#databases` - Right-click context menu "Copy to Clipboard" functionality works correctly Fixes issue introduced in #5237 --- .../UI/AdvancedOptions/ServiceControlAdvancedViewModel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ServiceControl.Config/UI/AdvancedOptions/ServiceControlAdvancedViewModel.cs b/src/ServiceControl.Config/UI/AdvancedOptions/ServiceControlAdvancedViewModel.cs index 3bfed4981f..d83e9edb0a 100644 --- a/src/ServiceControl.Config/UI/AdvancedOptions/ServiceControlAdvancedViewModel.cs +++ b/src/ServiceControl.Config/UI/AdvancedOptions/ServiceControlAdvancedViewModel.cs @@ -81,7 +81,7 @@ ForceUpgradeAuditInstanceCommand forceUpgradeAuditCommand public bool InMaintenanceMode => ServiceControlInstance.InMaintenanceMode; - public string RavenStudioUrl => ServiceControlInstance.RavenDbStudioUrl; + public string RavenDbStudioUrl => ServiceControlInstance.RavenDbStudioUrl; public bool IsRunning {