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
2 changes: 1 addition & 1 deletion Dashboard/Controls/FinOpsContent.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
</StackPanel>
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn Binding="{Binding Severity}" MinWidth="80" Width="Auto">
<DataGridTextColumn Binding="{Binding Severity}" SortMemberPath="SeveritySort" MinWidth="80" Width="Auto">
<DataGridTextColumn.Header>
<StackPanel Orientation="Horizontal">
<Button Style="{DynamicResource ColumnFilterButtonStyle}" Tag="Severity" Click="FinOpsFilter_Click" Margin="0,0,4,0"/>
Expand Down
10 changes: 9 additions & 1 deletion Dashboard/Services/DatabaseService.FinOps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2470,7 +2470,7 @@ HAVING COUNT(*) >= 24
Logger.Error($"[{ServerLabel}] Recommendation check failed (Reserved capacity): {ex.Message}", ex);
}

return recommendations;
return recommendations.OrderBy(r => r.SeveritySort).ToList();
}

private static string FormatDuration(long seconds)
Expand Down Expand Up @@ -2873,6 +2873,14 @@ public class FinOpsRecommendation
public string Detail { get; set; } = "";
public decimal? EstMonthlySavings { get; set; }
public string EstMonthlySavingsDisplay => EstMonthlySavings.HasValue ? $"${EstMonthlySavings.Value:N0}" : "";

public int SeveritySort => Severity switch
{
"High" => 1,
"Medium" => 2,
"Low" => 3,
_ => 4
};
}

public class FinOpsHighImpactQuery
Expand Down
Loading