-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathInstanceDetailsView.xaml
More file actions
282 lines (263 loc) · 13.6 KB
/
InstanceDetailsView.xaml
File metadata and controls
282 lines (263 loc) · 13.6 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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
<UserControl x:Class="ServiceControl.Config.UI.InstanceDetails.InstanceDetailsView"
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="700"
mc:Ignorable="d">
<UserControl.Resources>
<DataTemplate x:Key="SimpleHeaderedGroupBox">
<TextBlock Text="{Binding}" Foreground="{StaticResource Gray40Brush}" FontSize="13" />
</DataTemplate>
</UserControl.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="20" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="90" />
<RowDefinition Height="8" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Border Grid.Row="9"
Grid.ColumnSpan="2"
BorderBrush="{StaticResource Gray90Brush}"
BorderThickness="0,1,0,0"
Padding="0 10"
Visibility="{Binding Converter={StaticResource lastItemCollapseConverter},
RelativeSource={RelativeSource AncestorType={x:Type ContentPresenter},
AncestorLevel=3}}" />
<TextBlock VerticalAlignment="Center" Grid.Row="1" Grid.ColumnSpan="2"
FontSize="18px"
FontWeight="Bold"
Text="{Binding Name}" />
<StackPanel Grid.Row="2" Orientation="Horizontal" Margin="0 0 0 10px">
<ContentControl Margin="0,0,0,-3"
VerticalContentAlignment="Bottom"
Template="{Binding InstanceTypeIcon, Converter={StaticResource nameToResourceConverter}}"
Height="14px" />
<TextBlock Margin="3,0,0,0"
VerticalAlignment="Center"
FontSize="13px"
Foreground="{StaticResource Gray40Brush}"
Typography.Capitals="SmallCaps"
Text="{Binding InstanceTypeDisplayName}" />
</StackPanel>
<StackPanel Grid.Row="2" Grid.Column="1" Margin="0 0 0 10">
<StackPanel Orientation="Horizontal">
<ContentControl Margin="0,0,0,0"
VerticalAlignment="Center"
Template="{StaticResource RunningIcon}"
Visibility="{Binding IsRunning,
Converter={StaticResource boolToVis}}" />
<ContentControl Margin="0,0,0,0"
VerticalAlignment="Center"
Template="{StaticResource StoppedIcon}"
Visibility="{Binding IsStopped,
Converter={StaticResource boolToVis}}" />
<TextBlock Margin="3,0,0,0"
VerticalAlignment="Center"
FontSize="13px"
Foreground="{StaticResource Gray40Brush}"
Text="{Binding Status}" />
<TextBlock Margin="3,0,0,0"
VerticalAlignment="Center"
FontSize="13px"
Visibility="{Binding InMaintenanceMode, Converter={StaticResource boolToVis}}">
<Hyperlink Foreground="DarkOrange" Command="{Binding AdvancedOptionsCommand}" CommandParameter="{Binding DataContext, ElementName=root}">IN MAINTENANCE MODE</Hyperlink>
</TextBlock>
</StackPanel>
</StackPanel>
<StackPanel Grid.Row="1"
Grid.Column="1"
Margin="0,0,0,7"
HorizontalAlignment="Right"
Orientation="Horizontal">
<Button Margin="5,0"
Command="{Binding StopCommand}"
Style="{StaticResource StopButton}"
Visibility="{Binding AllowStop,
Converter={StaticResource boolToVis}}" />
<Button Margin="5,0"
Command="{Binding StartCommand}"
Style="{StaticResource StartButton}"
Visibility="{Binding AllowStart,
Converter={StaticResource boolToVis}}" />
<Button Margin="5,0"
Command="{Binding EditCommand}"
CommandParameter="{Binding DataContext,
ElementName=root}"
Style="{StaticResource ConfigurationButton}" />
<Button Margin="5,0"
Command="{Binding AdvancedOptionsCommand}"
CommandParameter="{Binding DataContext,
ElementName=root}"
Style="{StaticResource AdvancedOptionsButton}" />
</StackPanel>
<GroupBox Grid.Row="4" Header="VERSION" Margin="0 5 0 0">
<GroupBox.HeaderTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Margin="0,0,5,0"
FontSize="13"
Foreground="{StaticResource Gray40Brush}"
Text="{Binding}" />
<TextBlock Visibility="{Binding DataContext.HasNewVersion, ElementName=root, Converter={StaticResource boolToVis}}">
<Hyperlink Command="{Binding DataContext.UpgradeToNewVersionCommand, ElementName=root}" CommandParameter="{Binding DataContext, ElementName=root}">
<TextBlock FontSize="13" Text="{Binding DataContext.NewVersion, ElementName=root, StringFormat=• UPGRADE TO {0}}" />
</Hyperlink>
</TextBlock>
</StackPanel>
</DataTemplate>
</GroupBox.HeaderTemplate>
<TextBlock FontSize="14px" Text="{Binding Version, StringFormat={}{0}}" />
</GroupBox>
<GroupBox Grid.Row="4"
Grid.Column="1"
Visibility="{Binding HasBrowsableUrl, Converter={StaticResource boolToVis}}"
Header="{Binding UrlHeading}"
HeaderTemplate="{StaticResource SimpleHeaderedGroupBox}">
<Hyperlink Command="{Binding OpenUrl}" CommandParameter="{Binding BrowsableUrl}">
<Hyperlink.ContextMenu>
<ContextMenu>
<MenuItem Command="{Binding CopyToClipboard}"
CommandParameter="{Binding BrowsableUrl}"
Header="Copy to Clipboard" />
</ContextMenu>
</Hyperlink.ContextMenu>
<TextBlock FontSize="14px" Text="{Binding Host}" />
</Hyperlink>
</GroupBox>
<GroupBox Grid.Row="6" Grid.Column="0"
Header="INSTALLATION PATH"
Margin="0 1 0 0"
HeaderTemplate="{StaticResource SimpleHeaderedGroupBox}">
<Hyperlink Command="{Binding OpenUrl}" CommandParameter="{Binding InstallPath}">
<Hyperlink.ContextMenu>
<ContextMenu>
<MenuItem Command="{Binding CopyToClipboard}"
CommandParameter="{Binding InstallPath}"
Header="Copy path to clipboard" />
</ContextMenu>
</Hyperlink.ContextMenu>
<StackPanel Orientation="Horizontal">
<ContentControl Margin="0,1,0,0"
VerticalAlignment="Center"
Template="{StaticResource BrowseIcon}"
Height="12px" />
<TextBlock FontSize="14px" Text="Browse..." Margin="3,0,0,0" VerticalAlignment="Center" />
</StackPanel>
</Hyperlink>
</GroupBox>
<GroupBox Grid.Row="6"
Grid.Column="1"
Header="LOG PATH"
Margin="0 1 0 0"
HeaderTemplate="{StaticResource SimpleHeaderedGroupBox}">
<Hyperlink Command="{Binding OpenUrl}" CommandParameter="{Binding LogPath}">
<Hyperlink.ContextMenu>
<ContextMenu>
<MenuItem Command="{Binding CopyToClipboard}"
CommandParameter="{Binding LogPath}"
Header="Copy path to clipboard" />
</ContextMenu>
</Hyperlink.ContextMenu>
<StackPanel Orientation="Horizontal">
<ContentControl Margin="0,1,0,0"
VerticalAlignment="Center"
Template="{StaticResource BrowseIcon}"
Height="12px" />
<TextBlock FontSize="14px" Text="Browse..." Margin="3,0,0,0" VerticalAlignment="Center" />
</StackPanel>
</Hyperlink>
</GroupBox>
<GroupBox Grid.Row="7"
Grid.Column="0"
Visibility="{Binding HasBrowsableDBPath, Converter={StaticResource boolToVis}}"
Header="DB PATH"
Margin="0 1 0 0"
HeaderTemplate="{StaticResource SimpleHeaderedGroupBox}">
<Hyperlink Command="{Binding OpenUrl}" CommandParameter="{Binding DBPath}">
<Hyperlink.ContextMenu>
<ContextMenu>
<MenuItem Command="{Binding CopyToClipboard}"
CommandParameter="{Binding DBPath}"
Header="Copy path to clipboard" />
</ContextMenu>
</Hyperlink.ContextMenu>
<StackPanel Orientation="Horizontal">
<ContentControl Margin="0,1,0,0"
VerticalAlignment="Center"
Template="{StaticResource BrowseIcon}"
Height="12px" />
<TextBlock FontSize="14px" Text="Browse..." Margin="3,0,0,0" VerticalAlignment="Center" />
</StackPanel>
</Hyperlink>
</GroupBox>
<GroupBox Grid.Row="7"
Grid.Column="1"
Header="INSTANCE/QUEUE NAME"
Margin="0 1 0 0"
HeaderTemplate="{StaticResource SimpleHeaderedGroupBox}">
<TextBlock FontSize="14px" Text="{Binding InstanceName}" />
</GroupBox>
<GroupBox Grid.Row="8"
Header="TRANSPORT"
HeaderTemplate="{StaticResource SimpleHeaderedGroupBox}">
<TextBlock FontSize="14px" Text="{Binding Transport.DisplayName}" TextWrapping="WrapWithOverflow" />
</GroupBox>
<GroupBox Grid.Row="8"
Grid.Column="1"
Header="PERSISTER"
HeaderTemplate="{StaticResource SimpleHeaderedGroupBox}" >
<TextBlock FontSize="14px" Text="{Binding Persister}" />
</GroupBox>
<Border Grid.Row="1"
Grid.RowSpan="7"
Grid.ColumnSpan="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>
</Grid>
</UserControl>