Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Dashboard/Controls/AlertsHistoryContent.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
<MenuItem Header="Mute Similar Alerts..." Click="MuteSimilarAlerts_Click">
<MenuItem.Icon><TextBlock Text="&#x1F507;"/></MenuItem.Icon>
</MenuItem>
<Separator/>
<MenuItem Header="Dismiss Selected" Click="DismissSelected_Click">
<MenuItem.Icon><TextBlock Text="&#x2717;"/></MenuItem.Icon>
</MenuItem>
</ContextMenu>

<Style x:Key="DefaultRowStyle" TargetType="DataGridRow">
Expand Down
9 changes: 9 additions & 0 deletions Dashboard/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,15 @@
Height="28"
Margin="0,0,0,12"/>
<Separator/>
<Button Click="ViewLogButton_Click"
Height="28"
Margin="0,8,0,6"
ToolTip="Open the current application log file">
<StackPanel Orientation="Horizontal">
<TextBlock Text="&#xE7BA;" FontFamily="Segoe MDL2 Assets" FontSize="12" VerticalAlignment="Center" Margin="0,0,6,0"/>
<TextBlock Text="View Log" VerticalAlignment="Center"/>
</StackPanel>
</Button>
<Button x:Name="SettingsButton"
Click="Settings_Click"
Height="28"
Expand Down
29 changes: 29 additions & 0 deletions Dashboard/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1092,6 +1092,35 @@ private void Help_Click(object sender, RoutedEventArgs e)
dialog.ShowDialog();
}

private void ViewLogButton_Click(object sender, RoutedEventArgs e)
{
var logFile = Logger.GetCurrentLogFile();
try
{
if (System.IO.File.Exists(logFile))
{
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo
{
FileName = logFile,
UseShellExecute = true
});
}
else
{
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo
{
FileName = Logger.GetLogDirectory(),
UseShellExecute = true
});
}
}
catch (Exception ex)
{
MessageBox.Show($"Could not open log file: {ex.Message}", "Error",
MessageBoxButton.OK, MessageBoxImage.Error);
}
}

/// <summary>
/// Exposes the AlertStateService for coordination with LandingPage.
/// </summary>
Expand Down
4 changes: 4 additions & 0 deletions Lite/Controls/AlertsHistoryTab.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
<MenuItem Header="Mute Similar Alerts..." Click="MuteSimilarAlerts_Click">
<MenuItem.Icon><TextBlock Text="&#x1F507;"/></MenuItem.Icon>
</MenuItem>
<Separator/>
<MenuItem Header="Dismiss Selected" Click="DismissSelected_Click">
<MenuItem.Icon><TextBlock Text="&#x2717;"/></MenuItem.Icon>
</MenuItem>
</ContextMenu>

<Style x:Key="DefaultRowStyle" TargetType="DataGridRow">
Expand Down
7 changes: 7 additions & 0 deletions Lite/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,13 @@
<TextBlock Text="Import Settings" VerticalAlignment="Center"/>
</StackPanel>
</Button>
<Button Click="ViewLogButton_Click" Margin="0,8,0,0"
ToolTip="Open the current application log file">
<StackPanel Orientation="Horizontal">
<TextBlock Text="&#xE7BA;" FontFamily="Segoe MDL2 Assets" FontSize="12" VerticalAlignment="Center" Margin="0,0,6,0"/>
<TextBlock Text="View Log" VerticalAlignment="Center"/>
</StackPanel>
</Button>
<Button x:Name="SettingsButton" Click="SettingsButton_Click" Margin="0,8,0,0">
<StackPanel Orientation="Horizontal">
<TextBlock Text="&#xE713;" FontFamily="Segoe MDL2 Assets" FontSize="12" VerticalAlignment="Center" Margin="0,0,6,0"/>
Expand Down
29 changes: 29 additions & 0 deletions Lite/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -865,6 +865,35 @@ private void AboutButton_Click(object sender, RoutedEventArgs e)
window.ShowDialog();
}

private void ViewLogButton_Click(object sender, RoutedEventArgs e)
{
var logFile = AppLogger.GetCurrentLogFile();
try
{
if (System.IO.File.Exists(logFile))
{
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo
{
FileName = logFile,
UseShellExecute = true
});
}
else
{
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo
{
FileName = AppLogger.GetLogDirectory(),
UseShellExecute = true
});
}
}
catch (Exception ex)
{
MessageBox.Show($"Could not open log file: {ex.Message}", "Error",
MessageBoxButton.OK, MessageBoxImage.Error);
}
}

private void ImportSettingsButton_Click(object sender, RoutedEventArgs e)
{
var dialog = new Microsoft.Win32.OpenFolderDialog
Expand Down
Loading
Loading