diff --git a/chart/templates/topology.yaml b/chart/templates/topology.yaml index 2f618526..671a5d09 100644 --- a/chart/templates/topology.yaml +++ b/chart/templates/topology.yaml @@ -436,6 +436,28 @@ spec: 'properties': [{'name': 'pass rate', 'value': int(r.value)}] }).toJSON() + + - name: Notifications + icon: bell + components: + - name: NotificationGroup + lookup: + postgres: + - query: SELECT id, name, namespace, sent, failed FROM notifications_summary + connection: connection://{{.Release.Namespace}}/mission-control + display: + expr: | + results.rows.map(r, { + 'name': r.namespace + '/' + r.name, + 'icon': 'bell', + 'type': 'Notification', + 'health': r.failed == 0 ? 'healthy' : (r.sent > 0 ? 'warning' : 'unhealthy'), + 'properties':[ + {'name': 'Sent', value: r.sent, 'headline': true}, + {'name': 'Failed', value: r.failed, 'headline': true}, + ], + }).toJSON() + # Event Queue - name: Event Queue icon: switch