fix: resolve SLA metrics text overlapping in PDF layout
This commit is contained in:
+11
-7
@@ -90,10 +90,11 @@ def generate_mitigation_pdf(jobs_list, filter_name="Consolidated"):
|
||||
pdf.set_xy(12, 54)
|
||||
pdf.set_font('Helvetica', 'B', 8)
|
||||
pdf.set_text_color(148, 163, 184)
|
||||
pdf.cell(56, 4, 'GLOBAL SUCCESS RATE', ln=True)
|
||||
pdf.cell(56, 4, 'GLOBAL SUCCESS RATE', ln=0)
|
||||
pdf.set_xy(12, 60)
|
||||
pdf.set_font('Helvetica', 'B', 14)
|
||||
pdf.set_text_color(0, 200, 83) # Success Green
|
||||
pdf.cell(56, 8, f'{success_rate:.2f}%', ln=True)
|
||||
pdf.cell(56, 8, f'{success_rate:.2f}%', ln=0)
|
||||
|
||||
# Card 2: Dedup Ratio
|
||||
pdf.set_fill_color(30, 38, 64)
|
||||
@@ -101,10 +102,11 @@ def generate_mitigation_pdf(jobs_list, filter_name="Consolidated"):
|
||||
pdf.set_xy(77, 54)
|
||||
pdf.set_font('Helvetica', 'B', 8)
|
||||
pdf.set_text_color(148, 163, 184)
|
||||
pdf.cell(56, 4, 'DEDUPLICATION RATIO', ln=True)
|
||||
pdf.cell(56, 4, 'DEDUPLICATION RATIO', ln=0)
|
||||
pdf.set_xy(77, 60)
|
||||
pdf.set_font('Helvetica', 'B', 14)
|
||||
pdf.set_text_color(0, 210, 255) # Cyan Accent
|
||||
pdf.cell(56, 8, f'{dedup_ratio:.2f}:1', ln=True)
|
||||
pdf.cell(56, 8, f'{dedup_ratio:.2f}:1', ln=0)
|
||||
|
||||
# Card 3: Active Failures
|
||||
pdf.set_fill_color(30, 38, 64)
|
||||
@@ -112,12 +114,14 @@ def generate_mitigation_pdf(jobs_list, filter_name="Consolidated"):
|
||||
pdf.set_xy(142, 54)
|
||||
pdf.set_font('Helvetica', 'B', 8)
|
||||
pdf.set_text_color(148, 163, 184)
|
||||
pdf.cell(56, 4, 'ACTIVE INCIDENTS', ln=True)
|
||||
pdf.cell(56, 4, 'ACTIVE INCIDENTS', ln=0)
|
||||
pdf.set_xy(142, 60)
|
||||
pdf.set_font('Helvetica', 'B', 14)
|
||||
pdf.set_text_color(255, 75, 75) # Error Red
|
||||
pdf.cell(56, 8, f'{active_failures}', ln=True)
|
||||
pdf.cell(56, 8, f'{active_failures}', ln=0)
|
||||
|
||||
pdf.ln(18)
|
||||
# Restore position below cards
|
||||
pdf.set_xy(10, 78)
|
||||
|
||||
# Storage details section
|
||||
pdf.set_xy(10, 80)
|
||||
|
||||
Reference in New Issue
Block a user