This commit is contained in:
Rene Schwarz
2021-04-19 06:35:17 +02:00
parent e220c09ec3
commit 981ad26b1b
59 changed files with 1198 additions and 273 deletions

View File

@@ -3,8 +3,9 @@
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:Server_Dashboard.Controls.ServerModules"
xmlns:progressbar="clr-namespace:Server_Dashboard.Controls.ProgressBar"
xmlns:local="clr-namespace:Server_Dashboard.Controls.ServerModules"
xmlns:halfroundprogressbar="clr-namespace:Server_Dashboard.Controls.HalfRoundProgressBar"
xmlns:doubleroundprogressbar="clr-namespace:Server_Dashboard.Controls.DoubleRoundProgressBar"
mc:Ignorable="d">
<Border Background="{StaticResource BackgroundSurface_02dp}" MinHeight="100" MinWidth="300" Width="Auto" Height="Auto" Margin="10">
<Border.Effect>
@@ -27,14 +28,18 @@
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Image Grid.Column="0" Margin="7.5 0 7.5 0" Height="25" Width="25" Source="{Binding ModuleIcon}"/>
<TextBlock Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Left" Text="{Binding ModulName}"/>
<TextBlock Foreground="{StaticResource DeepPurple_A100}" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Left" Text="{Binding ModulName}"/>
<Border Background="{Binding StatusIndicator}" Grid.Column="3">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<TextBlock Margin="7 0 30 0" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Column="0" Foreground="{StaticResource White}" FontSize="20" Text="Status"/>
<TextBlock Margin="7 0 30 0" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Column="0" FontSize="24" Text="Status">
<TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.87"/>
</TextBlock.Foreground>
</TextBlock>
<Border Grid.Column="1" HorizontalAlignment="Right" Background="{Binding StatusIndicatorBG}" Padding="6">
<Ellipse Fill="{Binding StatusIndicator}" StrokeThickness="0" Width="25" Height="25"/>
</Border>
@@ -42,39 +47,214 @@
</Border>
</Grid>
</Border>
<Grid Grid.Row="2" Margin="10" Width="Auto">
<Grid Grid.Row="2" Margin="20" Width="Auto">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1.5*"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid>
<Grid Grid.Row="1" Margin="0 0 25 0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="1" Text="Hostname" FontSize="14" Margin="2 2 5 2"/>
<TextBlock Grid.Row="2" Text="User" FontSize="14" Margin="2 2 5 2"/>
<TextBlock Grid.Row="3" Text="Public IP" FontSize="14" Margin="2 2 5 2"/>
<TextBlock Grid.Row="4" Text="Private IP" FontSize="14" Margin="2 2 5 2"/>
<TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding ServerInfo.HostName}" FontSize="14" Margin="5 2 2 2"/>
<TextBlock Grid.Row="2" Grid.Column="1" Text="{Binding ServerInfo.OSHostName}" FontSize="14" Margin="5 2 2 2"/>
<TextBlock Grid.Row="3" Grid.Column="1" Text="{Binding ServerInfo.PublicIpAdress}" FontSize="14" Margin="5 2 2 2"/>
<TextBlock Grid.Row="4" Grid.Column="1" Text="{Binding ServerInfo.PrivateIpAdress}" FontSize="14" Margin="5 2 2 2"/>
<StackPanel Grid.Column="0">
<TextBlock Text="Servername" FontSize="16" Margin="2 2 5 10">
<TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.60"/>
</TextBlock.Foreground>
</TextBlock>
<TextBlock Text="User" FontSize="16" Margin="2 2 5 10">
<TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.60"/>
</TextBlock.Foreground>
</TextBlock>
<TextBlock Text="Public IP" FontSize="16" Margin="2 2 5 10">
<TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.60"/>
</TextBlock.Foreground>
</TextBlock>
<TextBlock Text="Private IP" FontSize="16" Margin="2 2 5 10">
<TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.60"/>
</TextBlock.Foreground>
</TextBlock>
<TextBlock Text="Uptime" FontSize="16" Margin="2 2 5 10">
<TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.60"/>
</TextBlock.Foreground>
</TextBlock>
<TextBlock Text="Creation Date" FontSize="16" Margin="2 2 5 10">
<TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.60"/>
</TextBlock.Foreground>
</TextBlock>
<TextBlock Text="Creator" FontSize="16" Margin="2 2 5 10">
<TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.60"/>
</TextBlock.Foreground>
</TextBlock>
</StackPanel>
<StackPanel Grid.Column="1">
<TextBlock Text="{Binding ServerInfo.ServerName}" FontSize="16" Margin="5 2 2 10">
<TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.60"/>
</TextBlock.Foreground>
</TextBlock>
<TextBlock Text="{Binding ServerInfo.OSUserName}" FontSize="16" Margin="5 2 2 10">
<TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.60"/>
</TextBlock.Foreground>
</TextBlock>
<TextBlock Text="{Binding ServerInfo.PublicIpAdress}" FontSize="16" Margin="5 2 2 10">
<TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.60"/>
</TextBlock.Foreground>
</TextBlock>
<TextBlock Text="{Binding ServerInfo.PrivateIpAdress}" FontSize="16" Margin="5 2 2 10">
<TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.60"/>
</TextBlock.Foreground>
</TextBlock>
<TextBlock Text="{Binding ServerInfo.Uptime}" FontSize="16" Margin="5 2 2 10">
<TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.60"/>
</TextBlock.Foreground>
</TextBlock>
<TextBlock Text="{Binding CreationDate}" FontSize="16" Margin="5 2 2 10">
<TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.60"/>
</TextBlock.Foreground>
</TextBlock>
<TextBlock Text="{Binding Creator}" FontSize="16" Margin="5 2 2 10">
<TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.60"/>
</TextBlock.Foreground>
</TextBlock>
</StackPanel>
</Grid>
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<progressbar:HalfRoundProgressbar Height="50" Width="50" x:Name="prgess" Value="180" IndicatorBrush="Blue" Foreground="Black"/>
<Grid Grid.Row="1" Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid Grid.Column="0">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<halfroundprogressbar:HalfRoundProgressBar
Margin="5"
Grid.Row="0"
ProgressBorderBrush="{StaticResource BackgroundSurface_02dp}"
BackgroundBrush="{StaticResource BackgroundSurface_08dp}"
Height="100"
Width="100"
Value="60"
IndicatorBrush="{StaticResource Teal_A100}"
/>
<TextBlock
Foreground="{StaticResource Teal_A100}"
Grid.Row="0"
Text="CPU"
VerticalAlignment="Center"
HorizontalAlignment="Center"
FontSize="18"
/>
<halfroundprogressbar:HalfRoundProgressBar
Margin="5"
Grid.Row="1"
ProgressBorderBrush="{StaticResource BackgroundSurface_02dp}"
BackgroundBrush="{StaticResource BackgroundSurface_08dp}"
Height="100"
Width="100"
Value="60"
IndicatorBrush="{StaticResource Teal_A100}"
/>
<TextBlock
Foreground="{StaticResource Teal_A100}"
Grid.Row="1"
Text="GPU"
VerticalAlignment="Center"
HorizontalAlignment="Center"
FontSize="18"
/>
</Grid>
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<doubleroundprogressbar:DoubleRoundProgressBar
ValueRead="70"
ValueWrite="60"
ReadIndicatorBrush="{StaticResource DeepPurple_A100}"
WriteIndicatorBrush="{StaticResource Teal_A100}"
Margin="5"
Grid.Row="0"
ProgressBorderBrush="{StaticResource BackgroundSurface_02dp}"
BackgroundBrush="{StaticResource BackgroundSurface_08dp}"
Height="100"
Width="100"
/>
<StackPanel
Grid.Row="0"
VerticalAlignment="Center"
HorizontalAlignment="Center">
<TextBlock
Grid.Row="0"
VerticalAlignment="Center"
HorizontalAlignment="Center"
FontSize="18"
TextAlignment="Center"
Text="Read"
Foreground="{StaticResource DeepPurple_A100}"
/>
<TextBlock
Grid.Row="0"
VerticalAlignment="Center"
HorizontalAlignment="Center"
FontSize="18"
TextAlignment="Center"
Text="Write"
Foreground="{StaticResource Teal_A100}"
/>
</StackPanel>
<doubleroundprogressbar:DoubleRoundProgressBar
ValueRead="70"
ValueWrite="60"
ReadIndicatorBrush="{StaticResource DeepPurple_A100}"
WriteIndicatorBrush="{StaticResource Teal_A100}"
Margin="5"
Grid.Row="1"
ProgressBorderBrush="{StaticResource BackgroundSurface_02dp}"
BackgroundBrush="{StaticResource BackgroundSurface_08dp}"
Height="100"
Width="100"
/>
<StackPanel
Grid.Row="1"
VerticalAlignment="Center"
HorizontalAlignment="Center">
<TextBlock
Grid.Row="0"
VerticalAlignment="Center"
HorizontalAlignment="Center"
FontSize="18"
TextAlignment="Center"
Text="UP"
Foreground="{StaticResource DeepPurple_A100}"
/>
<TextBlock
Grid.Row="0"
VerticalAlignment="Center"
HorizontalAlignment="Center"
FontSize="18"
TextAlignment="Center"
Text="DOWN"
Foreground="{StaticResource Teal_A100}"
/>
</StackPanel>
</Grid>
</Grid>
</Grid>
</Grid>