-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy pathServiceControlAdvancedView.xaml
More file actions
208 lines (188 loc) · 10.1 KB
/
ServiceControlAdvancedView.xaml
File metadata and controls
208 lines (188 loc) · 10.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<UserControl x:Class="ServiceControl.Config.UI.AdvancedOptions.ServiceControlAdvancedView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
x:Name="root"
d:DesignHeight="300"
d:DesignWidth="300"
mc:Ignorable="d">
<ScrollViewer IsTabStop="False" VerticalScrollBarVisibility="Auto">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="10" />
<RowDefinition Height="30" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.Resources>
<Style TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="14px" />
</Style>
</Grid.Resources>
<!--Instance Title -->
<TextBlock Grid.Row="1"
FontSize="18px"
FontWeight="Bold"
Text="{Binding Name}" Margin="60,0,60,0" VerticalAlignment="Center" />
<!-- Maintenance Section-->
<StackPanel Grid.Row="2" Margin="60,10,60,0">
<StackPanel Visibility="{Binding MaintenanceModeSupported, Converter={StaticResource boolToVis}}" Margin="0,0,0,30">
<Border Margin="0,0,0,20"
BorderBrush="{StaticResource Gray90Brush}"
BorderThickness="0,0,0,1">
<TextBlock FontSize="13px"
FontWeight="Bold"
Text="MAINTENANCE MODE" />
</Border>
<TextBlock FontSize="12px"
TextWrapping="Wrap"
Visibility="{Binding InMaintenanceMode, Converter={StaticResource boolToVisInverted}}"
Margin="0,0,0,20"
>
Enter database maintenance mode to access to RavenDB Management Studio. While in this mode all message processing is disabled and the REST API is unavailable. This will prevent ServicePulse and ServiceInsight connecting to this instance.
</TextBlock>
<TextBlock FontSize="12px"
TextWrapping="Wrap"
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.<LineBreak />ServicePulse and ServiceInsight cannot connect to this instance while it is in maintenance mode.<LineBreak />Launch <Hyperlink Command="{Binding OpenUrl}" CommandParameter="{Binding RavenDbStudioUrl}">
RavenDB Management Studio
<Hyperlink.ContextMenu>
<ContextMenu>
<MenuItem Command="{Binding CopyToClipboard}"
CommandParameter="{Binding RavenDbStudioUrl}"
Header="Copy to Clipboard" />
</ContextMenu>
</Hyperlink.ContextMenu>
</Hyperlink> to carry out maintenance on the embedded database.</TextBlock>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>
<Button Command="{Binding StartServiceInMaintenanceModeCommand}"
CommandParameter="{Binding DataContext, ElementName=root}"
Content="Start Maintenance Mode"
Visibility="{Binding InMaintenanceMode, Converter={StaticResource boolToVisInverted}}"
Padding="10,10"
Width="180"
/>
<Button Command="{Binding StopMaintenanceModeCommand}"
CommandParameter="{Binding DataContext, ElementName=root}"
Content="Stop Maintenance Mode"
Visibility="{Binding InMaintenanceMode, Converter={StaticResource boolToVis}}"
Padding="10,10"
Width="180"
/>
</Grid>
</StackPanel>
<!-- Removal Section-->
<Border Margin="0,0,0,0"
BorderBrush="{StaticResource Gray90Brush}"
BorderThickness="0,0,0,1">
<TextBlock FontSize="13px"
FontWeight="Bold"
Text="REMOVE INSTANCE"
/>
</Border>
<TextBlock FontSize="12px"
TextWrapping="Wrap"
Margin="0,0,0,20">
Removing this instance of ServiceControl will delete the associated Windows service and installation directory.<LineBreak />The associated database and logs can be also removed via the confirmation dialog.
</TextBlock>
<Button
Command="{Binding DeleteCommand}"
CommandParameter="{Binding}"
Content="Remove"
Style="{StaticResource ErrorButton}"
HorizontalAlignment="Left"
Padding="10,10"
Width="180"
/>
<!-- Forced Upgrade to Version 5 Section-->
<StackPanel Visibility="{Binding ForcedUpgradeAllowed, Converter={StaticResource boolToVis}}">
<Border Margin="0,25,0,0"
BorderBrush="{StaticResource Gray90Brush}"
BorderThickness="0,0,0,1">
<TextBlock FontSize="13px"
FontWeight="Bold"
Text="FORCE UPGRADE TO VERSION 5"
/>
</Border>
<TextBlock FontSize="12px"
TextWrapping="Wrap"
Margin="0,0,0,20"
>
Forced upgrade will not preserve data stored by the instance. Before the migration, the current, RavenDB 3.5 database will be moved to
<TextBlock FontSize="12px" FontWeight="Bold" Text="{Binding ForcedUpgradeBackupLocation}" /> directory.
<LineBreak/>
<LineBreak/>
If you want perform the migration preserving the data follow
<Hyperlink Command="{Binding OpenUrl}" CommandParameter="https://docs.particular.net/servicecontrol/upgrades/4to5/">
the version 4 to 5 upgrade guide
</Hyperlink>.
</TextBlock>
<Button
Command="{Binding ForceUpgradeCommand}"
CommandParameter="{Binding DataContext, ElementName=root}"
Content="Upgrade instance"
Style="{StaticResource ErrorButton}"
HorizontalAlignment="Left"
Padding="10,10"
Width="180"
/>
</StackPanel>
</StackPanel>
<!-- Progress Bar -->
<Border Grid.Row="2"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="#CCFFFFFF"
Visibility="{Binding InProgress,
Converter={StaticResource boolToVis}}">
<Border.Resources>
<Style TargetType="{x:Type TextBlock}">
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="FontSize" Value="14" />
</Style>
</Border.Resources>
<Border HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="White">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBlock Grid.Row="0"
FontWeight="Bold"
Text="{Binding ProgressTitle}" />
<ProgressBar Grid.Row="1"
Width="420"
Height="20"
IsIndeterminate="{Binding ProgressIndeterminate}"
Maximum="100"
Value="{Binding ProgressPercent}" />
<TextBlock Grid.Row="2" Text="{Binding ProgressMessage}" />
</Grid>
</Border>
</Border>
<!-- Back Button -->
<Grid Grid.Row="3"
Margin="40,40"
HorizontalAlignment="Right" Visibility="{Binding InProgress,
Converter={StaticResource boolToVisInverted}}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>
<Button Grid.Column="1"
Command="{Binding Cancel}"
Content="Back"
IsCancel="True" />
</Grid>
</Grid>
</ScrollViewer>
</UserControl>