#import "core/design-system.typ": lixus-report, report-table #let data = json(sys.inputs.dataPath) #let metadata = json(bytes(sys.inputs.metadata)) #let pass-icon = text(fill: green.darken(20%), weight: "bold")[✔] #let fail-icon = text(fill: red.darken(20%), weight: "bold")[✘] #let na-icon = text(fill: gray)[-] #show: lixus-report.with( title: metadata.title, subtitle: "Monthly Manager Summary - " + metadata.month, date: metadata.date, ) = Fleet Overview This report summarizes the workstation compliance status for *#metadata.employeeCount* employees during the month of *#metadata.month*. #grid( columns: (1fr, 1fr), gutter: 1cm, [ #set align(center) #rect(stroke: 1pt + gray.lighten(50%), inset: 10pt, radius: 5pt)[ #text(12pt, weight: "bold")[Total Employees] \ #text(24pt, weight: "bold", fill: rgb("#1a237e"))[#metadata.employeeCount] ] ], [ #set align(left) *Snapshot Metadata:* \ - Generated: #metadata.timestamp \ - Compliance Standard: Lixus Workstation v1.0 \ - Audit Type: Automated Periodic Review ] ) #v(1cm) = Compliance Matrix The following table shows the pass/fail status for each security assertion across the fleet. #set text(size: 8pt) #let headers = ("Employee", ..data.assertions.map(a => a.split("_").map(w => w.slice(0,1)).join(""))) // Legend for abbreviations #v(0.5cm) *Header Legend:* #grid( columns: (1fr, 1fr, 1fr, 1fr), gutter: 5pt, ..data.assertions.map(a => [ #text(weight: "bold")[#a.split("_").map(w => w.slice(0,1)).join("")]: #lower(a.replace("_", " ")) ]) ) #v(0.5cm) #let table-rows = () #for emp in data.employees { table-rows.push(strong(emp.name)) for res in emp.results { if res.passed == true { table-rows.push(pass-icon) } else if res.passed == false { table-rows.push(fail-icon) } else { table-rows.push(na-icon) } } } #report-table( (1.5fr, ..data.assertions.map(a => 1fr)), headers, ..table-rows ) #v(1cm) = Detailed Statistics #let total-tests = data.employees.len() * data.assertions.len() #let total-passed = 0 #for emp in data.employees { total-passed += emp.passed } #let total-failed = 0 #for emp in data.employees { total-failed += emp.failed } #let health-pct = calc.round((total-passed / (total-passed + total-failed)) * 100) #grid( columns: (1fr, 2fr), gutter: 1cm, [ #text(14pt, weight: "bold")[Overall Fleet Health] \ #text(32pt, weight: "bold", fill: if health-pct > 90 { green } else if health-pct > 75 { orange } else { red })[#health-pct%] ], [ *Audit Summary:* \ - Total Assertions Verified: #(total-passed + total-failed) \ - Total Passes: #total-passed \ - Total Failures: #total-failed \ \ #if total-failed > 0 [ #text(fill: red)[*Action Required:*] Several workstations have failed critical security assertions. Please refer to the matrix above and the individual report logs for remediation steps. ] else [ #text(fill: green.darken(20%))[*Fleet Secure:*] All workstations have passed the current security baseline. ] ] )