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
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
|
<UserControl x:Class="Tango.FSE.Insights.Views.InsightsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:global="clr-namespace:Tango.FSE.Insights"
xmlns:vm="clr-namespace:Tango.FSE.Insights.ViewModels"
xmlns:auth="clr-namespace:Tango.FSE.Common.Authorization;assembly=Tango.FSE.Common"
xmlns:local="clr-namespace:Tango.FSE.Insights.Views"
xmlns:material="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:insights="clr-namespace:Tango.FSE.Insights.SciChart"
xmlns:s="http://schemas.abtsoftware.co.uk/scichart"
xmlns:controls="clr-namespace:Tango.FSE.Common.Controls;assembly=Tango.FSE.Common"
mc:Ignorable="d"
d:DesignHeight="1080" d:DesignWidth="1920" d:DataContext="{d:DesignInstance Type=vm:InsightsViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.InsightsViewVM}">
<Grid IsEnabled="{Binding IsFree}">
<Grid>
<!--Actual Visible Charts-->
<Grid>
<ItemsControl x:Name="chartsItemsControl" ItemsSource="{Binding VisibleCharts}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid IsItemsHost="True" Columns="1" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid Loaded="SciChartSurface_Loaded">
<Border BorderBrush="{StaticResource FSE_BorderBrush}" BorderThickness="0 1 0 1" Margin="0 2" CornerRadius="0" Padding="0">
<s:SciChartSurface Annotations="{Binding Annotations}" Background="{StaticResource FSE_PrimaryBackgroundDarkBrush}" Visibility="{Binding IsVisible,Converter={StaticResource BooleanToVisibilityConverter}}" s:SciChartGroup.VerticalChartGroup="SyncedChartsSameAxisSizes" RenderableSeries="{s:SeriesBinding RenderableSeries}">
<s:SciChartSurface.GridLinesPanelStyle>
<Style TargetType="s:GridLinesPanel">
<Setter Property="Background" Value="#191919"></Setter>
</Style>
</s:SciChartSurface.GridLinesPanelStyle>
<!-- Define X and Y Axis. Optional bands give a cool look and feel for minimal performance impact -->
<s:SciChartSurface.YAxis>
<s:NumericAxis AxisBandsFill="{StaticResource FSE_PrimaryBackgroundDarkColor}" GrowBy="0.1,0.1" MinorsPerMajor="2" VisibleRange="0,1"/>
</s:SciChartSurface.YAxis>
<s:SciChartSurface.XAxis>
<s:DateTimeAxis AxisBandsFill="{StaticResource FSE_PrimaryBackgroundDarkColor}" Visibility="{Binding IsLast,Converter={StaticResource BooleanToVisibilityConverter}}" DrawMajorBands="True" VisibleRange="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.VisibleChartsRange, Mode=TwoWay}"/>
</s:SciChartSurface.XAxis>
<s:SciChartSurface.ChartModifier>
<!-- Whats going on here? -->
<!-- We share the mouse events by using MouseManager.MouseEventGroup="..." -->
<!-- We ensure modifiers receive events even when another has handled by setting ReceiveHandledEvents=true -->
<!-- We bind both charts XAxis to shared property on the viewmodel to ensure they stay in sync -->
<s:ModifierGroup s:MouseManager.MouseEventGroup="myCustomGroup">
<insights:InsightsRubberBandXYZoomModifier IsXAxisOnly="True" ReceiveHandledEvents="True" />
<insights:InsightsZoomPanModifier ReceiveHandledEvents="True" XyDirection="XDirection" />
<!--<s:MouseWheelZoomModifier/>-->
<!--<s:RolloverModifier ReceiveHandledEvents="True"/>-->
<s:CursorModifier ReceiveHandledEvents="True"/>
<!--<s:YAxisDragModifier Tag="FirstYAxis"/>-->
<!--<s:XAxisDragModifier />-->
<s:ZoomExtentsModifier/>
</s:ModifierGroup>
</s:SciChartSurface.ChartModifier>
</s:SciChartSurface>
</Border>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Grid>
<!--Welcome / Busy-->
<Grid>
<Grid.Style>
<Style TargetType="Grid">
<Setter Property="Visibility" Value="Collapsed"></Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding VisibleCharts.Count}" Value="0">
<Setter Property="Visibility" Value="Visible"></Setter>
</DataTrigger>
<DataTrigger Binding="{Binding IsFree}" Value="False">
<Setter Property="Visibility" Value="Visible"></Setter>
</DataTrigger>
<DataTrigger Binding="{Binding InsightsPackage}" Value="{x:Null}">
<Setter Property="Visibility" Value="Visible"></Setter>
</DataTrigger>
<DataTrigger Binding="{Binding IsDetecting}" Value="True">
<Setter Property="Visibility" Value="Collapsed"></Setter>
</DataTrigger>
</Style.Triggers>
</Style>
</Grid.Style>
<s:SciChartSurface Background="{StaticResource FSE_PrimaryBackgroundDarkBrush}">
<s:SciChartSurface.GridLinesPanelStyle>
<Style TargetType="s:GridLinesPanel">
<Setter Property="Background" Value="#191919"></Setter>
</Style>
</s:SciChartSurface.GridLinesPanelStyle>
<!-- Define X and Y Axis. Optional bands give a cool look and feel for minimal performance impact -->
<s:SciChartSurface.YAxis>
<s:NumericAxis GrowBy="0.1,0.1" MinorsPerMajor="2" AxisBandsFill="{StaticResource FSE_PrimaryBackgroundDarkColor}" VisibleRange="0,1"/>
</s:SciChartSurface.YAxis>
<s:SciChartSurface.XAxis>
<s:DateTimeAxis DrawMajorBands="True" AxisBandsFill="{StaticResource FSE_PrimaryBackgroundDarkColor}" />
</s:SciChartSurface.XAxis>
</s:SciChartSurface>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Height="420">
<Image Stretch="Uniform" RenderOptions.BitmapScalingMode="Fant" Source="../Images/insight_big.png" Opacity="0.5" Width="128" />
<TextBlock Margin="0 10 0 0" FontSize="70" HorizontalAlignment="Center" FontFamily="{StaticResource hand}" Foreground="{StaticResource FSE_PrimaryAccentBrush}">Insights</TextBlock>
<TextBlock Visibility="{Binding InsightsPackageAvailable,Converter={StaticResource BooleanToVisibilityInverseConverter}}" Margin="0 10 0 0" TextAlignment="Center" MaxWidth="700" TextWrapping="Wrap" LineHeight="20" Foreground="{StaticResource FSE_GrayBrush}">
<Run>Welcome to the Insights module</Run>
<Run>
This module allows you to collect, view and analyze important machine data using interactive charts and annotations.
</Run>
<LineBreak/>
<LineBreak/>
<Run>Use the search panel above to select target dates for data collection, then press 'Get Insights'.</Run>
<LineBreak/>
<LineBreak/>
<Run>Toggle the settings panel on the left to configure your workspace.</Run>
<LineBreak/>
<LineBreak/>
<Run>
The workspace supports panning and zooming.
Hold and drag the mouse to pan the charts, or hold the Ctrl key to zoom.
</Run>
</TextBlock>
<StackPanel Visibility="{Binding InsightsPackageAvailable,Converter={StaticResource BooleanToVisibilityConverter}}" >
<TextBlock Margin="0 10 0 0" FontSize="20" HorizontalAlignment="Center" Foreground="{StaticResource FSE_SuccessBrush}">Insights available !</TextBlock>
<TextBlock Margin="0 10 0 0" HorizontalAlignment="Center">Use the pane on the left to select monitors to display.</TextBlock>
</StackPanel>
</StackPanel>
</Grid>
<!--Annotations-->
<Grid x:Name="gridAnnotations" Loaded="SciChartSurface_Loaded" Grid.Column="1" Margin="10 5 0 25">
<Grid.Style>
<Style TargetType="Grid">
<Setter Property="Visibility" Value="Hidden"></Setter>
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding DisplayAnnotations}" Value="True" />
<Condition Binding="{Binding VisibleCharts.Count,Converter={StaticResource GreaterThanToBooleanConverter}}" Value="True" />
</MultiDataTrigger.Conditions>
<Setter Property="Visibility" Value="Visible"></Setter>
</MultiDataTrigger>
</Style.Triggers>
</Style>
</Grid.Style>
<s:SciChartSurface Annotations="{Binding Annotations}" Opacity="1" Background="{x:Null}" GridLinesPanelStyle="{x:Null}" s:SciChartGroup.VerticalChartGroup="SyncedChartsSameAxisSizes">
<!-- Define X and Y Axis. Optional bands give a cool look and feel for minimal performance impact -->
<s:SciChartSurface.YAxis>
<s:NumericAxis Visibility="Hidden" DrawMajorBands="False" DrawMajorGridLines="False" DrawMajorTicks="False" DrawMinorGridLines="False" DrawMinorTicks="False" GrowBy="0.1,0.1" MinorsPerMajor="2" VisibleRange="0,1"/>
</s:SciChartSurface.YAxis>
<s:SciChartSurface.XAxis>
<s:DateTimeAxis Visibility="Visible" FontSize="0.1" Background="{x:Null}" Foreground="{x:Null}" DrawMajorBands="False" DrawMajorGridLines="False" DrawMajorTicks="False" DrawMinorGridLines="False" DrawMinorTicks="False" VisibleRange="{Binding VisibleChartsRange, Mode=TwoWay}"/>
</s:SciChartSurface.XAxis>
<s:SciChartSurface.ChartModifier>
<!-- Whats going on here? -->
<!-- We share the mouse events by using MouseManager.MouseEventGroup="..." -->
<!-- We ensure modifiers receive events even when another has handled by setting ReceiveHandledEvents=true -->
<!-- We bind both charts XAxis to shared property on the viewmodel to ensure they stay in sync -->
<s:ModifierGroup s:MouseManager.MouseEventGroup="myCustomGroup">
<insights:InsightsRubberBandXYZoomModifier RubberBandFill="{x:Null}" RubberBandStroke="{x:Null}" IsXAxisOnly="True" ReceiveHandledEvents="True" />
<insights:InsightsZoomPanModifier ReceiveHandledEvents="True" XyDirection="XDirection" />
<s:CursorModifier ReceiveHandledEvents="True"/>
<!--<s:MouseWheelZoomModifier/>-->
<!--<s:RolloverModifier ReceiveHandledEvents="True"/>-->
<!--<s:CursorModifier ReceiveHandledEvents="True"/>-->
<!--<s:YAxisDragModifier Tag="FirstYAxis"/>-->
<!--<s:XAxisDragModifier />-->
<s:ZoomExtentsModifier/>
</s:ModifierGroup>
</s:SciChartSurface.ChartModifier>
</s:SciChartSurface>
</Grid>
<!--Charts Labels-->
<ItemsControl ItemsSource="{Binding VisibleCharts}" Margin="0 0 0 0" Visibility="{Binding InsightsPackageAvailable,Converter={StaticResource BooleanToVisibilityConverter}}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid IsItemsHost="True" Columns="1" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid>
<Grid HorizontalAlignment="Left" VerticalAlignment="Top" Width="320" Height="30" Margin="0 3 0 0">
<Polygon Points="0,0 300,0 240,40 0,40" Fill="#3800AFFF" Stretch="Fill" Stroke="Black" />
<DockPanel Margin="45 0 0 0" HorizontalAlignment="Left">
<controls:ToggleIconButton CheckedIcon="Close" IsChecked="{Binding IsVisible}" VerticalAlignment="Center" Width="16" Height="16" Margin="0 -2 0 0" />
<TextBlock Margin="5 0 0 0" Text="{Binding Description}" VerticalAlignment="Center" FontSize="{StaticResource FSE_SmallFontSize}"></TextBlock>
</DockPanel>
</Grid>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<!--Left Panel-->
<Border HorizontalAlignment="Left" Background="{StaticResource FSE_PrimaryBackgroundMidBrush}" BorderThickness="0 0 1 0" BorderBrush="{StaticResource FSE_BorderBrush}">
<Border.Style>
<Style TargetType="Border">
<Setter Property="Margin" Value="-350 0 0 0"></Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=chkSettingsBar,Path=IsChecked}" Value="True">
<DataTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<ThicknessAnimation Storyboard.TargetProperty="Margin" To="0 0 0 0" Duration="00:00:0.2" />
</Storyboard>
</BeginStoryboard>
</DataTrigger.EnterActions>
<DataTrigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<ThicknessAnimation Storyboard.TargetProperty="Margin" To="-350 0 0 0" Duration="00:00:0.2" />
</Storyboard>
</BeginStoryboard>
</DataTrigger.ExitActions>
</DataTrigger>
</Style.Triggers>
</Style>
</Border.Style>
<Grid Width="350" ClipToBounds="False">
<DockPanel>
<Menu DockPanel.Dock="Top" Margin="0 0 0 0" Background="{StaticResource FSE_PrimaryBackgroundMidBrush}" Visibility="Collapsed">
<MenuItem Header="_File"></MenuItem>
<MenuItem Header="_Tools">
<MenuItem Header="Display Annotations" IsCheckable="True" IsChecked="{Binding DisplayAnnotations}" />
<MenuItem Header="Display Anomalies" IsCheckable="True" IsChecked="{Binding DisplayAnomalies}" />
<Separator/>
<MenuItem Header="Detect Anomalies" Command="{Binding AnalyzeCommand}">
<MenuItem.Icon>
<material:PackIcon Kind="Spider" Foreground="{StaticResource FSE_ErrorBrush}" />
</MenuItem.Icon>
</MenuItem>
</MenuItem>
</Menu>
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal" HorizontalAlignment="Center" Margin="5 20 5 5">
<ToggleButton material:ToggleButtonAssist.SwitchTrackOnBackground="{StaticResource FSE_YellowBrush}" IsChecked="{Binding DisplayAnnotations}" Width="32" Height="32" Style="{StaticResource FSE_Toolbar_ToggleButton}" ToolTip="Display Annotations">
<material:PackIcon Kind="Lightbulb" />
</ToggleButton>
<ToggleButton material:ToggleButtonAssist.SwitchTrackOnBackground="{StaticResource FSE_RedBrush}" Margin="5 0 0 0" IsChecked="{Binding DisplayAnomalies}" Width="32" Height="32" Style="{StaticResource FSE_Toolbar_ToggleButton}" ToolTip="Display Anomalies">
<material:PackIcon Kind="Spider" />
</ToggleButton>
<Button Cursor="Hand" Command="{Binding AnalyzeCommand}" Margin="5 0 0 0" Background="{StaticResource FSE_PrimaryBackgroundDarkBrush}" material:ButtonAssist.CornerRadius="3" Style="{StaticResource FSE_RaisedButton_Dark_Hover}" BorderBrush="{StaticResource FSE_RedBrush}" BorderThickness="1">
<DockPanel>
<material:PackIcon VerticalAlignment="Center" Kind="Spider" Foreground="{StaticResource FSE_RedBrush}" />
<TextBlock Margin="10 0 0 0">Detect Anomalies</TextBlock>
</DockPanel>
</Button>
<Button ToolTip="Export Monitors Data To CSV" Margin="10 0 0 0" BorderBrush="{StaticResource FSE_GreenBrush}" Background="{StaticResource FSE_PrimaryBackgroundDarkBrush}" Width="32" Padding="0" FocusVisualStyle="{x:Null}" material:ButtonAssist.CornerRadius="3" Command="{Binding ExportToCsvCommand}">
<material:PackIcon Kind="FileExcelOutline" Foreground="{StaticResource FSE_GreenBrush}" Width="18" Height="18" />
</Button>
</StackPanel>
<StackPanel DockPanel.Dock="Top" Margin="31 0">
<controls:ToggleIconButton x:Name="chkFilters" HorizontalAlignment="Right" Width="16" Height="16" Padding="0" UncheckedIcon="ChevronDown" CheckedIcon="ChevronUp" Cursor="Hand" />
<StackPanel TextElement.FontSize="{StaticResource FSE_SmallFontSize}" TextElement.Foreground="{StaticResource FSE_GrayBrush}" Visibility="{Binding ElementName=chkFilters,Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter}}">
<DockPanel>
<ToggleButton IsChecked="{Binding AnnotationsConfiguration.DisplayConnectionMarkers,Delay=500}" />
<TextBlock Margin="10 0 0 0" VerticalAlignment="Center">Display Connection Markers</TextBlock>
</DockPanel>
<DockPanel Margin="0 5 0 0">
<ToggleButton IsChecked="{Binding AnnotationsConfiguration.DisplayStatuses,Delay=500}" />
<TextBlock Margin="10 0 0 0" VerticalAlignment="Center">Display Machine Statuses</TextBlock>
</DockPanel>
<DockPanel Margin="0 5 0 0">
<ToggleButton IsChecked="{Binding AnnotationsConfiguration.DisplayJobs,Delay=500}" />
<TextBlock Margin="10 0 0 0" VerticalAlignment="Center">Display Jobs</TextBlock>
</DockPanel>
<DockPanel Margin="0 5 0 0">
<ToggleButton IsChecked="{Binding AnnotationsConfiguration.DisplayUpdates,Delay=500}" />
<TextBlock Margin="10 0 0 0" VerticalAlignment="Center">Display Updates</TextBlock>
</DockPanel>
<DockPanel Margin="0 5 0 0" auth:AuthorizationHelper.Mode="Collapsed" auth:AuthorizationHelper.Permission="FSE_ModifyBugReport">
<ToggleButton IsChecked="{Binding AnnotationsConfiguration.DisplayBugReports,Delay=500}" />
<TextBlock Margin="10 0 0 0" VerticalAlignment="Center">Display Bug Reports</TextBlock>
</DockPanel>
<DockPanel Margin="0 5 0 0">
<ToggleButton IsChecked="{Binding AnnotationsConfiguration.DisplayApplicationExceptions,Delay=500}" />
<TextBlock Margin="10 0 0 0" VerticalAlignment="Center">Display Application Exceptions</TextBlock>
</DockPanel>
<DockPanel Margin="0 5 0 0">
<ToggleButton x:Name="chkEvents" IsChecked="{Binding AnnotationsConfiguration.DisplayEvents,Delay=500}" />
<TextBlock Margin="10 0 0 0" VerticalAlignment="Center">Display Events</TextBlock>
</DockPanel>
<StackPanel Margin="5 0" Visibility="{Binding ElementName=chkEvents,Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter}}">
<controls:ToggleIconButton x:Name="chkEventsFilters" HorizontalAlignment="Right" Width="16" Height="16" Padding="0" UncheckedIcon="ChevronDown" CheckedIcon="ChevronUp" Cursor="Hand" />
<StackPanel Visibility="{Binding ElementName=chkEventsFilters,Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter}}">
<TextBlock FontSize="{StaticResource FSE_SmallFontSize}">events categories</TextBlock>
<Border Margin="0 2 0 0" Height="100" Padding="5" Background="{StaticResource FSE_PrimaryBackgroundDarkBrush}" BorderThickness="1" BorderBrush="{StaticResource FSE_PrimaryBackgroundLightBrush}" CornerRadius="3">
<ItemsControl ItemsSource="{Binding SelectedEventsCategories}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<CheckBox Margin="0 2" IsChecked="{Binding IsSelected,Delay=500}" Content="{Binding Data,Converter={StaticResource EnumToDescriptionConverter}}"></CheckBox>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Border>
<TextBlock Margin="0 10 0 0" FontSize="{StaticResource FSE_SmallFontSize}">events groups</TextBlock>
<Border Margin="0 2 0 0" Height="100" Padding="5" Background="{StaticResource FSE_PrimaryBackgroundDarkBrush}" BorderThickness="1" BorderBrush="{StaticResource FSE_PrimaryBackgroundLightBrush}" CornerRadius="3">
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
<ItemsControl ItemsSource="{Binding SelectedEventsGroups}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<CheckBox Margin="0 2" IsChecked="{Binding IsSelected,Delay=500}" Content="{Binding Data,Converter={StaticResource EnumToDescriptionConverter}}"></CheckBox>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
</Border>
</StackPanel>
</StackPanel>
</StackPanel>
</StackPanel>
<Grid DockPanel.Dock="Top" Width="330" Margin="0 10 0 0" HorizontalAlignment="Center">
<Polygon Stroke="{StaticResource FSE_PrimaryAccentBrush}" StrokeThickness="1" Stretch="Fill" Height="50" Points="0,15 15,0 285,0 300,15 285,30 15,30"></Polygon>
<TextBox VerticalAlignment="Center" Margin="30 0" material:HintAssist.Hint="Find Monitor" Text="{Binding MonitorsFilter,UpdateSourceTrigger=PropertyChanged,Delay=200}"></TextBox>
</Grid>
<ScrollViewer Margin="0 20 0 0" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
<ItemsControl ItemsSource="{Binding Charts}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<ToggleButton Margin="5" IsChecked="{Binding IsVisible}">
<ToggleButton.Template>
<ControlTemplate TargetType="ToggleButton">
<Grid>
<Polygon x:Name="poly" Fill="{StaticResource FSE_PrimaryBackgroundDarkBrush}" StrokeThickness="1" Stroke="{StaticResource FSE_PrimaryBackgroundLightBrush}" Stretch="Fill" Height="40" Points="0,15 15,0 285,0 300,15 285,30 15,30"></Polygon>
<TextBlock Text="{Binding Description}" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="{StaticResource FSE_SmallFontSize}"></TextBlock>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="poly" Property="Fill" Value="{StaticResource FSE_PrimaryAccentBrush}"></Setter>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="poly" Property="Stroke" Value="{StaticResource FSE_PrimaryAccentBrush}"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</ToggleButton.Template>
</ToggleButton>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
</DockPanel>
<Grid HorizontalAlignment="Right" Margin="0 0 -30 0" VerticalAlignment="Center" Width="30" Height="350" ClipToBounds="False">
<Grid ClipToBounds="True">
<Polygon Fill="{StaticResource FSE_PrimaryBackgroundMidBrush}" Width="95" Margin="-65 0 0 0" Points="0,0 100,30 100,320 0,350" Stroke="{StaticResource FSE_BorderBrush}" Stretch="Fill"></Polygon>
</Grid>
<controls:ToggleIconButton x:Name="chkSettingsBar" ToolTip="Toggle settings" Cursor="Hand" CheckedIcon="ChevronLeftCircle" UncheckedIcon="ChevronRightCircle" Width="32" Height="32" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 -15 0" IsChecked="{Binding IsSettingsBarOpened}" />
</Grid>
</Grid>
</Border>
</Grid>
<!--Top Panel-->
<Grid VerticalAlignment="Top">
<Grid.Style>
<Style TargetType="Grid">
<Setter Property="Margin" Value="0 20 0 0"></Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=chkSearchBar,Path=IsChecked}" Value="True">
<DataTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<ThicknessAnimation Storyboard.TargetProperty="Margin" To="0 20 0 0" Duration="00:00:0.2" />
</Storyboard>
</BeginStoryboard>
</DataTrigger.EnterActions>
<DataTrigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<ThicknessAnimation Storyboard.TargetProperty="Margin" To="0 -160 0 0" Duration="00:00:0.2" />
</Storyboard>
</BeginStoryboard>
</DataTrigger.ExitActions>
</DataTrigger>
</Style.Triggers>
</Style>
</Grid.Style>
<Polygon Fill="{StaticResource FSE_PrimaryBackgroundMidBrush}" Stretch="None" Width="1400" Height="220" Points="0,0 200,200 1200,200 1400,0" HorizontalAlignment="Center" Margin="-10 -20 0 0" Opacity="0.9" StrokeThickness="1" Stroke="{StaticResource FSE_GrayBrush}" />
<Grid DockPanel.Dock="Top" Panel.ZIndex="100">
<StackPanel>
<DockPanel HorizontalAlignment="Center" VerticalAlignment="Top">
<StackPanel Orientation="Horizontal" DockPanel.Dock="Left" VerticalAlignment="Bottom" Margin="0 0 0 -20">
<Grid VerticalAlignment="Bottom" Margin="0 0 20 14">
<StackPanel>
<Grid Margin="-300 -70 0 0" Width="200">
<Polygon Stroke="{StaticResource FSE_PrimaryAccentBrush}" StrokeThickness="1" Stretch="Fill" Height="40" Points="0,15 15,0 285,0 300,15 285,30 15,30"></Polygon>
<material:TimePicker SelectedTime="{Binding StartTime}" Is24Hours="True" VerticalAlignment="Center" Width="150" material:HintAssist.Hint="Time (00:00:00)" />
</Grid>
<Grid Width="250">
<Polygon Stroke="{StaticResource FSE_PrimaryAccentBrush}" StrokeThickness="1" Stretch="Fill" Height="50" Points="0,15 15,0 285,0 300,15 285,30 15,30"></Polygon>
<DatePicker DisplayDateStart="{Binding MinDate}" DisplayDateEnd="{Binding MaxDate}" SelectedDate="{Binding StartDate}" VerticalAlignment="Center" Width="200" material:HintAssist.Hint="Start Date" />
</Grid>
</StackPanel>
</Grid>
<Image RenderOptions.BitmapScalingMode="Fant" RenderTransformOrigin="0.5,0.5" Source="../Images/arrow_right.png" DockPanel.Dock="Left" Stretch="Fill" Height="80" Width="100" VerticalAlignment="Bottom">
<Image.RenderTransform>
<RotateTransform Angle="180"/>
</Image.RenderTransform>
</Image>
</StackPanel>
<StackPanel DockPanel.Dock="Right" VerticalAlignment="Bottom" Orientation="Horizontal" Margin="0 0 0 -20">
<Image RenderOptions.BitmapScalingMode="Fant" Source="../Images/arrow_right.png" DockPanel.Dock="Right" Stretch="Fill" Height="80" Width="100" VerticalAlignment="Bottom" />
<Grid VerticalAlignment="Bottom" Margin="20 0 0 14">
<StackPanel>
<Grid Margin="0 -70 -300 0" Width="200">
<Polygon Stroke="{StaticResource FSE_PrimaryAccentBrush}" StrokeThickness="1" Stretch="Fill" Height="40" Points="0,15 15,0 285,0 300,15 285,30 15,30"></Polygon>
<material:TimePicker SelectedTime="{Binding EndTime}" Is24Hours="True" VerticalAlignment="Center" Width="150" material:HintAssist.Hint="End Time (All Day)" />
</Grid>
<Grid Width="250">
<Polygon Stroke="{StaticResource FSE_PrimaryAccentBrush}" StrokeThickness="1" Stretch="Fill" Height="50" Points="0,15 15,0 285,0 300,15 285,30 15,30"></Polygon>
<DatePicker DisplayDateStart="{Binding MinDate}" DisplayDateEnd="{Binding MaxDate}" SelectedDate="{Binding EndDate}" VerticalAlignment="Center" Width="200" material:HintAssist.Hint="End Date (Today)" />
</Grid>
</StackPanel>
</Grid>
</StackPanel>
<Image RenderOptions.BitmapScalingMode="Fant" Margin="40 0" Source="../Images/time.png" Stretch="Uniform" Width="100" />
</DockPanel>
<Button Command="{Binding GetInsightsCommand}" HorizontalAlignment="Center" Width="220" Style="{StaticResource FSE_Button_Polygon}" Height="40" FontSize="14" Margin="0 20 0 0" IsEnabled="{Binding MachineProvider.IsPPCAvailable}">Get Insights</Button>
</StackPanel>
</Grid>
<controls:ToggleIconButton x:Name="chkSearchBar" ToolTip="Toggle range selection" Cursor="Hand" CheckedIcon="ChevronUpCircle" UncheckedIcon="ChevronDownCircle" Width="32" Height="32" VerticalAlignment="Bottom" Margin="0 0 0 0" IsChecked="{Binding IsSearchBarOpened}" />
</Grid>
<!--Anomalies Detection Progress-->
<Grid Background="#D4000000" Visibility="{Binding IsDetecting,Converter={StaticResource BooleanToVisibilityConverter}}">
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<Image Source="../Images/detection.png" Stretch="Uniform" Width="80" RenderOptions.BitmapScalingMode="Fant" Opacity="0.8" />
<TextBlock Margin="0 20 0 0" Text="Detecting Anomalies" FontSize="30" HorizontalAlignment="Center"></TextBlock>
<ItemsControl ItemsSource="{Binding AnomaliesDetectionProgresses}" Margin="0 40 0 0" Width="700">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Rows="1" IsItemsHost="True"></UniformGrid>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<StackPanel>
<ProgressBar Height="5" Maximum="{Binding FramesCount}" Value="{Binding CurrentFrame}"></ProgressBar>
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<Button HorizontalAlignment="Center" Style="{StaticResource FSE_RaisedButton_Dark_Hover}" Margin="0 40 0 0" Width="200" Height="40">CANCEL</Button>
</StackPanel>
</Grid>
</Grid>
</UserControl>
|