Skip to content

Commit 1a75511

Browse files
Merge pull request #5237 from Particular/ravendb-custom-host-name-bug-fix
Point RavenDB Management Studio link to localhost
2 parents 1027240 + 0fa57ab commit 1a75511

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

src/ServiceControl.Config/UI/AdvancedOptions/ServiceControlAdvancedView.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@
5454
Visibility="{Binding InMaintenanceMode, Converter={StaticResource boolToVis}}"
5555
Margin="0,0,0,20"
5656
>
57-
This instance is in database maintenance mode. All message processing is disabled and the REST API is unavailable.<LineBreak />ServicePulse and ServiceInsight cannot connect to this instance while it is in maintenance mode.<LineBreak />Launch <Hyperlink Command="{Binding OpenUrl}" CommandParameter="{Binding StorageUrl}">
57+
This instance is in database maintenance mode. All message processing is disabled and the REST API is unavailable.<LineBreak />ServicePulse and ServiceInsight cannot connect to this instance while it is in maintenance mode.<LineBreak />Launch <Hyperlink Command="{Binding OpenUrl}" CommandParameter="{Binding RavenDbStudioUrl}">
5858
RavenDB Management Studio
5959
<Hyperlink.ContextMenu>
6060
<ContextMenu>
6161
<MenuItem Command="{Binding CopyToClipboard}"
62-
CommandParameter="{Binding StorageUrl}"
62+
CommandParameter="{Binding RavenDbStudioUrl}"
6363
Header="Copy to Clipboard" />
6464
</ContextMenu>
6565
</Hyperlink.ContextMenu>

src/ServiceControl.Config/UI/AdvancedOptions/ServiceControlAdvancedViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ ForceUpgradeAuditInstanceCommand forceUpgradeAuditCommand
8181

8282
public bool InMaintenanceMode => ServiceControlInstance.InMaintenanceMode;
8383

84-
public string StorageUrl => ServiceControlInstance.StorageUrl;
84+
public string RavenStudioUrl => ServiceControlInstance.RavenDbStudioUrl;
8585

8686
public bool IsRunning
8787
{

src/ServiceControlInstaller.Engine/Instances/ServiceControlBaseService.cs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,12 @@ protected ServiceControlBaseService(IWindowsServiceController service)
3232
/// <summary>
3333
/// Raven management URL
3434
/// </summary>
35-
public string StorageUrl
35+
public string RavenDbStudioUrl
3636
{
3737
get
3838
{
39-
string host = HostName switch
40-
{
41-
"*" or "+" => "localhost",
42-
_ => HostName,
43-
};
44-
return $"http://{host}:{DatabaseMaintenancePort}/studio/index.html#databases";
39+
var port = DatabaseMaintenancePort ?? 33334;
40+
return $"http://localhost:{port}/studio/index.html#databases";
4541
}
4642
}
4743

0 commit comments

Comments
 (0)