mirror of
https://github.com/openziti/desktop-edge-win.git
synced 2026-10-15 17:11:19 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user