Skip to content

Commit

Permalink
feat: notifications component card
Browse files Browse the repository at this point in the history
  • Loading branch information
yashmehrotra authored and moshloop committed Sep 17, 2024
1 parent 0481a7a commit 3acd4ef
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions chart/templates/topology.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3acd4ef

Please sign in to comment.