Skip to content

Commit 51211ca

Browse files
Dharmishtha PatelDharmishtha Patel
authored andcommitted
Point RavenDB Management Studio link to localhost
1 parent 7ba444c commit 51211ca

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
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: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,16 @@ protected ServiceControlBaseService(IWindowsServiceController service)
2828

2929
public bool InMaintenanceMode { get; set; }
3030
public ReportCard ReportCard { get; set; }
31-
31+
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)