UI/HDTFailure.xaml
|
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Hephaestus Deployment Toolkit" WindowStyle="None" ResizeMode="NoResize" SizeToContent="WidthAndHeight" WindowStartupLocation="CenterScreen" Topmost="True" Background="#FF1E1E1E"> <!-- WHAT A TECHNICIAN SEES WHEN A DEPLOYMENT FAILS, and until now that was nothing: the reason went into the JSONL, a FATAL line went into a console the payload had hidden, and five seconds later wpeutil powered the machine off. Everything needed to fix it was on a share, under a folder named after a computer that never finished being built. MDT SHOWS A SUMMARY DIALOG NAMING THE STEP, and an admin has read it a hundred times. This is that, in HDT's ground. THE MACHINE DOES NOT POWER OFF WHILE THIS IS UP. The three buttons are the three things a technician actually does next, and the payload obeys whichever was pressed: go and look (Open CMD), try again from the top (Restart), or leave (Shut down). SAME GROUND AS THE WIZARD AND THE PROGRESS SCREEN. A technician meets all three on one machine minutes apart, and they must look like one product: #FF1E1E1E behind, #FF252526 on the card. NO x:Class AND NO MERGED DICTIONARY: there is no compiler in WinPE, and a second file that must reach the RAM disk intact is a XamlParseException on the one machine nobody can debug. --> <Grid Background="#FF1E1E1E"> <Border Width="900" VerticalAlignment="Center" HorizontalAlignment="Center" Background="#FF252526" BorderBrush="#FF3A3A3C" BorderThickness="1"> <StackPanel Margin="36,30,36,30"> <!-- RED, ONCE, AT THE TOP. The status line on the progress screen paints failures #FFF48771 and so does this: the same colour means the same thing across the product. --> <TextBlock x:Name="HDTFailureTitleText" Foreground="#FFF48771" FontSize="28" FontWeight="SemiBold" /> <!-- AND THE SAME WINDOW REPORTS A RUN THAT WORKED, because MDT ends a deployment on ONE Deployment Summary rather than two windows to keep in step with each other. TWO HEADLINES, ONE VISIBLE. The colour is the whole reason this is a second TextBlock instead of one line of text that changes: #FFF48771 is what failure looks like everywhere in this product, and a success painted in it reads as a failure that somebody mislabelled. Red only ever means wrong. Which one shows is a Pane flag, the mechanism the host already has - Get-HDTDeploymentFailure decides, and this file only says what the two look like. --> <TextBlock x:Name="HDTFailureSuccessText" Foreground="#FF6FCF97" FontSize="28" FontWeight="SemiBold" Visibility="Collapsed" /> <TextBlock x:Name="HDTFailureSequenceText" Text="" Foreground="#FFCCCCCC" FontSize="15" Margin="0,6,0,0" TextTrimming="CharacterEllipsis" /> <Border Height="1" Background="#FF3A3A3C" Margin="0,20,0,20" /> <!-- ============ which step ============ --> <TextBlock x:Name="HDTFailureStepLabel" Foreground="#FF8A8A8A" FontSize="13" /> <TextBlock x:Name="HDTFailureStepText" Text="" Foreground="White" FontSize="18" Margin="0,4,0,0" TextWrapping="Wrap" /> <!-- ============ and why ============ --> <!-- THE REASON IS NOT SUMMARISED AND IT SCROLLS. The pre-flight writes several lines - one per failed check - and the most useful sentence a technician can read is the one the step wrote: "disk 0 carries existing data on volume C (NTFS), D (NTFS), and the step did not declare that it may be replaced" contains the fix. A box that cut it off at one line would send them to the log for the rest. --> <TextBlock x:Name="HDTFailureReasonLabel" Foreground="#FF8A8A8A" FontSize="13" Margin="0,18,0,0" /> <Border x:Name="HDTFailureReasonBox" Background="#FF1E1E1E" BorderBrush="#FF3A3A3C" BorderThickness="1" Margin="0,4,0,0" MaxHeight="220"> <ScrollViewer VerticalScrollBarVisibility="Auto" Padding="12,10,12,10"> <TextBlock x:Name="HDTFailureMessageText" Text="" Foreground="#FFF48771" FontSize="14" TextWrapping="Wrap" FontFamily="Consolas, Courier New" /> </ScrollViewer> </Border> <!-- ============ where the evidence is ============ --> <!-- THE LOG PATH IS ON THE SCREEN BECAUSE X: DIES WITH THE POWER. A technician who writes nothing down and shuts the machine off must still be able to find the run afterwards, and the run id is what names the folder. --> <TextBlock x:Name="HDTFailureLogLabel" Foreground="#FF8A8A8A" FontSize="13" Margin="0,18,0,0" /> <TextBlock x:Name="HDTFailureLogText" Text="" Foreground="#FFCCCCCC" FontSize="13" Margin="0,4,0,0" TextWrapping="Wrap" FontFamily="Consolas, Courier New" /> <TextBlock x:Name="HDTFailureRunText" Text="" Foreground="#FF8A8A8A" FontSize="12" Margin="0,4,0,0" FontFamily="Consolas, Courier New" /> <!-- ============ what happens next ============ --> <!-- THE SAME THREE NAMES THE WIZARD USES, so the host that already knows how to read a window can read this one: HDTOpenCmdButton, HDTNextButton, HDTCancelButton. Open CMD is first because it is the reason this screen exists - the technician is standing in front of a machine they can still look inside. --> <Grid Margin="0,28,0,0"> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" /> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" /> </Grid.ColumnDefinitions> <Button Grid.Column="0" x:Name="HDTOpenCmdButton" MinWidth="130" Height="36" Background="#FF3A3A3C" Foreground="White" BorderBrush="#FF3A3A3C" FontSize="14" /> <Button Grid.Column="2" x:Name="HDTCancelButton" MinWidth="130" Height="36" Margin="0,0,10,0" Background="#FF3A3A3C" Foreground="White" BorderBrush="#FF3A3A3C" FontSize="14" /> <Button Grid.Column="3" x:Name="HDTNextButton" MinWidth="130" Height="36" Background="#FF0E639C" Foreground="White" BorderBrush="#FF0E639C" FontSize="14" /> <!-- MDT'S DEPLOYMENT SUMMARY HAS ONE BUTTON AND IT IS Finish. This window reports both outcomes, so it carries both sets and Get-HDTDeploymentFailure collapses the pair that does not apply: Restart and Shut down on a failure, this on a finished machine. IT SHARES A COLUMN WITH Restart, which is why only one of them is ever visible. Two primary buttons in one corner is a screen asking a technician which of two identical-looking things they meant. WHAT HAPPENS AFTERWARDS IS NOT THIS BUTTON'S ANSWER. HDTFinishAction owns that - MDT's property, MDT's meaning - and this only says the technician has read the screen. Restart and Shut down override it, because a button naming a power state and not producing it is worse than no button. --> <Button Grid.Column="3" x:Name="HDTFinishButton" MinWidth="130" Height="36" Background="#FF0E639C" Foreground="White" BorderBrush="#FF0E639C" FontSize="14" Visibility="Collapsed" /> </Grid> </StackPanel> </Border> </Grid> </Window> |