aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/Events/EventsTileView.xaml
blob: 508ebb6b75c3824daf3306dcf3ddec572d50bd4d (plain)
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
<UserControl x:Class="Tango.FSE.UI.Tiles.Events.EventsTileView"
             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:local="clr-namespace:Tango.FSE.UI.Tiles.Events"
             xmlns:material="http://materialdesigninxaml.net/winfx/xaml/themes"
             xmlns:resolution="clr-namespace:Tango.FSE.Common.Resolution;assembly=Tango.FSE.Common"
             xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=local:EventsTile, IsDesignTimeCreatable=False}">
    <Grid Opacity="0.6">
        <StackPanel Margin="0 20 0 0">
            <DockPanel Margin="0 10 0 0">
                <Grid>
                    <Grid Visibility="{Binding EventsProvider.HasActiveEvents,Converter={StaticResource BooleanToVisibilityConverter}}">
                        <lvc:PieChart resolution:ResolutionHelper.Mode="High" DisableAnimations="True" LegendLocation="None" Hoverable="False" DataTooltip="{x:Null}"  Width="320" Height="300" InnerRadius="80">
                            <lvc:PieChart.Series>
                                <lvc:PieSeries Foreground="{StaticResource FSE_PrimaryForegroundBrush}" Stroke="{StaticResource FSE_PrimaryBackgroundBrush}" Fill="{StaticResource FSE_WarningBrush}" FontSize="16" Title="Warning" Values="{Binding WarningEvents,Converter={StaticResource DoubleToChartValuesConverter}}" DataLabels="False" 
                               />
                                <lvc:PieSeries Foreground="{StaticResource FSE_PrimaryForegroundBrush}" Stroke="{StaticResource FSE_PrimaryBackgroundBrush}" Fill="{StaticResource FSE_ErrorBrush}" FontSize="16" Title="Error" Values="{Binding ErrorEvents,Converter={StaticResource DoubleToChartValuesConverter}}" DataLabels="False" 
                               />
                                <lvc:PieSeries Foreground="{StaticResource FSE_PrimaryForegroundBrush}" Stroke="{StaticResource FSE_PrimaryBackgroundBrush}" Fill="{StaticResource FSE_CriticalBrush}" FontSize="16" Title="Critical" Values="{Binding CriticalEvents,Converter={StaticResource DoubleToChartValuesConverter}}" DataLabels="False" 
                               />
                            </lvc:PieChart.Series>
                        </lvc:PieChart>
                    </Grid>
                    <Grid Visibility="{Binding EventsProvider.HasActiveEvents,Converter={StaticResource BooleanToVisibilityInverseConverter}}">
                        <lvc:PieChart resolution:ResolutionHelper.Mode="High" DisableAnimations="True" LegendLocation="None" Hoverable="False" DataTooltip="{x:Null}"  Width="320" Height="300" InnerRadius="80">
                            <lvc:PieChart.Series>
                                <lvc:PieSeries Foreground="{StaticResource FSE_PrimaryForegroundBrush}" Stroke="{StaticResource FSE_PrimaryBackgroundBrush}" Fill="{StaticResource FSE_GrayBrush}" FontSize="16" Title="Warning" Values="1" DataLabels="False" 
                               />
                                <lvc:PieSeries Foreground="{StaticResource FSE_PrimaryForegroundBrush}" Stroke="{StaticResource FSE_PrimaryBackgroundBrush}" Fill="{StaticResource FSE_GrayBrush}" FontSize="16" Title="Error" Values="1" DataLabels="False" 
                               />
                                <lvc:PieSeries Foreground="{StaticResource FSE_PrimaryForegroundBrush}" Stroke="{StaticResource FSE_PrimaryBackgroundBrush}" Fill="{StaticResource FSE_GrayBrush}" FontSize="16" Title="Critical" Values="1" DataLabels="False" 
                               />
                            </lvc:PieChart.Series>
                        </lvc:PieChart>
                    </Grid>
                </Grid>
                <StackPanel Margin="10 0 0 0">
                    <TextBlock>active events summary:</TextBlock>

                    <StackPanel TextElement.FontSize="{StaticResource FSE_SmallFontSize}" Margin="0 20 0 0">
                        <DockPanel Margin="0 5">
                            <material:PackIcon Kind="BellAlert" Foreground="{StaticResource FSE_CriticalBrush}" />
                            <TextBlock Margin="5 0 0 0" VerticalAlignment="Center">
                                    <Run Text="{Binding CriticalEvents}"></Run>
                                    <Run>critical</Run>
                            </TextBlock>
                        </DockPanel>
                        <DockPanel Margin="0 5">
                            <material:PackIcon Kind="Alert" Foreground="{StaticResource FSE_ErrorBrush}" />
                            <TextBlock Margin="5 0 0 0" VerticalAlignment="Center">
                                    <Run Text="{Binding ErrorEvents}"></Run>
                                    <Run>errors</Run>
                            </TextBlock>
                        </DockPanel>
                        <DockPanel Margin="0 5">
                            <material:PackIcon Kind="Alert" Foreground="{StaticResource FSE_WarningBrush}" />
                            <TextBlock Margin="5 0 0 0" VerticalAlignment="Center">
                                    <Run Text="{Binding WarningEvents}"></Run>
                                    <Run>warnings</Run>
                            </TextBlock>
                        </DockPanel>
                    </StackPanel>

                    <TextBlock resolution:ResolutionHelper.HighResolutionMargin="0 40 0 0" resolution:ResolutionHelper.LowResolutionMargin="0 20 0 0">job execution status:</TextBlock>
                    <DockPanel Margin="0 20 0 0">
                        <material:PackIcon>
                            <material:PackIcon.Style>
                                <Style TargetType="material:PackIcon">
                                    <Setter Property="Foreground" Value="{StaticResource FSE_ErrorBrush}"></Setter>
                                    <Setter Property="Kind" Value="Alert"></Setter>
                                    <Style.Triggers>
                                        <DataTrigger Binding="{Binding CanExecuteJob}" Value="True">
                                            <Setter Property="Foreground" Value="{StaticResource FSE_SuccessBrush}"></Setter>
                                            <Setter Property="Kind" Value="Check"></Setter>
                                        </DataTrigger>
                                    </Style.Triggers>
                                </Style>
                            </material:PackIcon.Style>
                        </material:PackIcon>
                        <TextBlock Margin="5 -2 0 0" VerticalAlignment="Center" FontSize="{StaticResource FSE_SmallFontSize}">
                            <TextBlock.Style>
                                <Style TargetType="TextBlock">
                                    <Setter Property="Text" Value="cannot execute job"></Setter>
                                    <Style.Triggers>
                                        <DataTrigger Binding="{Binding CanExecuteJob}" Value="True">
                                            <Setter Property="Text" Value="job execution is enabled"></Setter>
                                        </DataTrigger>
                                    </Style.Triggers>
                                </Style>
                            </TextBlock.Style>
                        </TextBlock>
                    </DockPanel>
                </StackPanel>
            </DockPanel>
        </StackPanel>
    </Grid>
</UserControl>