From 01ed3164a6cd7318dbf38546dbec857ac8548209 Mon Sep 17 00:00:00 2001 From: cw2007 Date: Sat, 11 Jul 2026 17:01:28 +0900 Subject: [PATCH] =?UTF-8?q?fix(report):=20SMS=20=EC=8B=A0=EB=A2=B0?= =?UTF-8?q?=EC=84=B1=20=EA=B2=8C=EC=9D=B4=EC=A7=80=20=EC=83=89=EC=9D=84=20?= =?UTF-8?q?=EC=A7=80=ED=91=9C=20=EC=9E=90=EC=B2=B4=20=EA=B8=B0=EC=A4=80?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C(=EC=A2=85=ED=95=A9=20=ED=8C=90=EC=A0=95?= =?UTF-8?q?=EA=B3=BC=20=EB=B6=84=EB=A6=AC)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 경영 요약의 SMS 신뢰성 게이지가 종합 판정 색($verdict_color)을 그대로 써서, 누수 등으로 판정이 '경보'면 SMS 전달 100%여도 적색 링으로 표시되던 문제 수정. rc_reliability_color(pct, fail) 도입 — 실패 0=네이비(완전) / 경미=황(주의) / 저하=적(경보). 게이지·카드 액센트를 이 색으로. 판정 씰은 종합 판정 색 유지. --- php/monthly_report_print.php | 12 ++++++++++-- php/report_charts.php | 9 +++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/php/monthly_report_print.php b/php/monthly_report_print.php index c251c7c..b214007 100644 --- a/php/monthly_report_print.php +++ b/php/monthly_report_print.php @@ -151,9 +151,17 @@ $rh_low_txt = (METRIC_RH_LOW >= 0) ? (rc_fmt((float)METRIC_RH_LOW) . '%') : '비
01 경영 요약 EXECUTIVE SUMMARY
-
+ +
- +
diff --git a/php/report_charts.php b/php/report_charts.php index 4b60b67..dfe88e7 100644 --- a/php/report_charts.php +++ b/php/report_charts.php @@ -37,6 +37,15 @@ function rc_verdict_color(string $verdict): string { }; } +// '높을수록 좋은' 지표(SMS 신뢰성 등) 자체 기준 색 — 종합 판정과 독립. +// 실패 0 = 완전(네이비) / 경미한 실패 = 주의(황) / 저하 = 경보(적). +// 종합 판정이 경보여도 SMS 전달이 100%면 이 게이지는 네이비로 정확히 표현한다. +function rc_reliability_color(int $pct, int $fail_count): string { + if ($fail_count <= 0) { return RC_NAVY; } // 실패 0 → 완전 신뢰 + if ($pct >= 95) { return RC_WARN; } // 경미 + return RC_ALERT; // 저하 +} + // 짧은 수치 포맷(소수 1자리, 불필요한 0 제거) function rc_fmt(float $v): string { return rtrim(rtrim(number_format($v, 1, '.', ''), '0'), '.');