From ab402b342129881c27aedc10a9a1716411031201 Mon Sep 17 00:00:00 2001 From: Viktor Barzin Date: Sun, 19 Apr 2026 16:37:12 +0000 Subject: [PATCH] =?UTF-8?q?[monitoring]=20UK=20Payslip=20Panel=207=20?= =?UTF-8?q?=E2=80=94=20trim=20to=205=20semantic=20layers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Drop ytd_student_loan (~£200-300/mo noise) and ytd_rsu_offset (always £0 on post-2024 Meta variant-B payslips) from the YTD uses stack. Now mirrors Panel 1's 4-way source breakdown clarity: take-home, cash PAYE, RSU PAYE, NI, pension. Student loan + RSU offset still surface on Panel 8 Sankey. Title: "YTD uses — where gross went" (mirrors Panel 1 label pattern). --- .../monitoring/dashboards/uk-payslip.json | 44 ++----------------- 1 file changed, 3 insertions(+), 41 deletions(-) diff --git a/stacks/monitoring/modules/monitoring/dashboards/uk-payslip.json b/stacks/monitoring/modules/monitoring/dashboards/uk-payslip.json index 031475df..8bcffa86 100644 --- a/stacks/monitoring/modules/monitoring/dashboards/uk-payslip.json +++ b/stacks/monitoring/modules/monitoring/dashboards/uk-payslip.json @@ -178,8 +178,8 @@ }, { "id": 7, - "title": "YTD uses \u2014 deductions + take-home", - "description": "Year-to-date cumulative breakdown of where the gross went. Stacked \u2014 top equals gross_pay. Green = take-home; red/orange = taxes; purple = pension; teal = RSU offset.", + "title": "YTD uses \u2014 where gross went", + "description": "Year-to-date cumulative breakdown of where the gross went. Stacked \u2014 top equals gross_pay minus student loan and RSU offset (both small; shown on Panel 8 Sankey). Green = take-home; red = cash income tax; orange = RSU-attributed income tax + NI; purple = pension.", "type": "timeseries", "datasource": { "type": "grafana-postgresql-datasource", @@ -318,44 +318,6 @@ "value": "Pension (employee)" } ] - }, - { - "matcher": { - "id": "byName", - "options": "ytd_student_loan" - }, - "properties": [ - { - "id": "color", - "value": { - "mode": "fixed", - "fixedColor": "#8B4513" - } - }, - { - "id": "displayName", - "value": "Student Loan" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "ytd_rsu_offset" - }, - "properties": [ - { - "id": "color", - "value": { - "mode": "fixed", - "fixedColor": "#2AA198" - } - }, - { - "id": "displayName", - "value": "RSU Offset" - } - ] } ] }, @@ -379,7 +341,7 @@ "type": "grafana-postgresql-datasource", "uid": "payslips-pg" }, - "rawSql": "SELECT pay_date AS \"time\", SUM(net_pay) OVER w AS ytd_net, SUM(COALESCE(cash_income_tax, income_tax)) OVER w AS ytd_cash_income_tax, SUM(income_tax - COALESCE(cash_income_tax, income_tax)) OVER w AS ytd_rsu_income_tax, SUM(national_insurance) OVER w AS ytd_ni, SUM(pension_employee) OVER w AS ytd_pension_employee, SUM(student_loan) OVER w AS ytd_student_loan, SUM(rsu_offset) OVER w AS ytd_rsu_offset FROM payslip_ingest.payslip WHERE $__timeFilter(pay_date) WINDOW w AS (PARTITION BY tax_year ORDER BY pay_date) ORDER BY pay_date", + "rawSql": "SELECT pay_date AS \"time\", SUM(net_pay) OVER w AS ytd_net, SUM(COALESCE(cash_income_tax, income_tax)) OVER w AS ytd_cash_income_tax, SUM(income_tax - COALESCE(cash_income_tax, income_tax)) OVER w AS ytd_rsu_income_tax, SUM(national_insurance) OVER w AS ytd_ni, SUM(pension_employee) OVER w AS ytd_pension_employee FROM payslip_ingest.payslip WHERE $__timeFilter(pay_date) WINDOW w AS (PARTITION BY tax_year ORDER BY pay_date) ORDER BY pay_date", "format": "time_series", "refId": "A", "rawQuery": true,