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"
    WindowState="Maximized"
    ResizeMode="NoResize"
    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" />
 
                <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 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" />
                </Grid>
            </StackPanel>
        </Border>
    </Grid>
</Window>