Show Blurb until we can use ShowToast and make a real windows notification.

Service Timeout in details page of service
This commit is contained in:
Jeremy Tellier - ROG
2021-07-22 19:12:21 +01:00
parent 98ee215fc3
commit 2bf0dcda1e
3 changed files with 16 additions and 0 deletions
+3
View File
@@ -576,6 +576,8 @@ namespace ZitiDesktopEdge {
continue;
}
found.TimeoutMessage = notification.Message;
ShowBlurbAsync(found.TimeoutMessage, ""); // Replace with ShowToast(found.TimeoutMessage) when it gets merged
// Send Notification
if (notification.MfaMaximumTimeout == 0) {
found.MFAInfo.IsAuthenticated = false;
// display mfa token icon
@@ -588,6 +590,7 @@ namespace ZitiDesktopEdge {
found.IsTimingOut = true;
}
}
// we may need to display mfa icon, based on the timer in UI, remove found.MFAInfo.IsAuthenticated setting in this function.
// the below function can show mfa icon even after user authenticates successfully, in race conditions
if (displayMFARequired) {
@@ -132,6 +132,8 @@
<Label Content="Protocols" Padding="10,0,0,0" FontWeight="Bold" FontSize="12" FontFamily="pack://application:,,,/Assets/Fonts/#Open Sans" Foreground="Black"></Label>
<TextBox x:Name="DetailProtocols" MaxWidth="300" Background="Transparent" IsReadOnly="True" HorizontalAlignment="Stretch" Height="20" BorderThickness="0" TextAlignment="Left" Padding="0,0,0,0" FontSize="12" FontFamily="pack://application:,,,/Assets/Fonts/#Open Sans" ></TextBox>
<Label Content="Timeout" Padding="10,0,0,0" FontWeight="Bold" FontSize="12" FontFamily="pack://application:,,,/Assets/Fonts/#Open Sans" Foreground="Black"></Label>
<TextBox x:Name="TimeoutDetails" MaxWidth="300" Background="Transparent" IsReadOnly="True" HorizontalAlignment="Stretch" Height="20" BorderThickness="0" TextAlignment="Left" Padding="0,0,0,0" FontSize="12" FontFamily="pack://application:,,,/Assets/Fonts/#Open Sans" ></TextBox>
</StackPanel>
<Image Source="/Assets/Images/closeBlack.png" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,40,40,0" Width="10" Height="10" Cursor="Hand" MouseUp="CloseDetails"></Image>
</Grid>
@@ -218,6 +218,17 @@ namespace ZitiDesktopEdge {
DetailPorts.Text = info.PortString;
DetailUrl.Text = info.ToString();
if (info.Timeout>-1) {
double timeSince = (DateTime.Now - info.TimeUpdated).TotalMinutes;
if (timeSince>0) {
TimeoutDetails.Text = timeSince+ " minutes";
} else {
TimeoutDetails.Text = "Timed out";
}
} else {
TimeoutDetails.Text = "Never";
}
DetailsArea.Visibility = Visibility.Visible;
DetailsArea.Opacity = 0;
DetailsArea.Margin = new Thickness(0, 0, 0, 0);