Skip to content

Commit

Permalink
Update UI with improved notifications (#286)
Browse files Browse the repository at this point in the history
* Nats backend notification

* First try: human-readable info

* Add callout warning when NATS unavailable

* Add alert for empty backend

* Add empty backend sample
Improve visibility of alerts
  • Loading branch information
grischperl authored Dec 8, 2023
1 parent 5ca4bf3 commit def15e8
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 1 deletion.
22 changes: 22 additions & 0 deletions config/samples/empty_backend.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: operator.kyma-project.io/v1alpha1
kind: Eventing
metadata:
labels:
app.kubernetes.io/name: eventing
app.kubernetes.io/instance: eventing
app.kubernetes.io/part-of: eventing-manager
app.kubernetes.io/created-by: eventing-manager
name: eventing
namespace: kyma-system
spec:
publisher:
replicas:
min: 2
max: 2
resources:
limits:
cpu: 500m
memory: 512Mi
requests:
cpu: 40m
memory: 64Mi
8 changes: 8 additions & 0 deletions config/ui-extensions/eventing/details
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ body:
- source: '$readableTimestamp(lastTransitionTime)'
name: Last transition
sort: true
- source: "'NATS unavailable: If you chose the NATS backend, you must enable the NATS module.'"
widget: Alert
severity: warning
visibility: "$exists(status.conditions[reason = 'NATSUnavailable'])"
- source: "'No backend: If you enable the Eventing module, you must configure a backend.'"
widget: Alert
severity: warning
visibility: "$exists(status.conditions[reason = 'BackendNotSpecified'])"
- name: Events
widget: EventList
filter: '$matchEvents($$, $root.kind, $root.metadata.name)'
Expand Down
6 changes: 6 additions & 0 deletions config/ui-extensions/eventing/form
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
- EventMesh
description: Choose a backend type from the dropdown.

- simple: true
widget: Alert
severity: info
alert: "'If you choose the NATS backend, you must enable the NATS module.'"
visibility: "spec.backend.type = 'NATS'"

- path: spec.backend.config.eventMeshSecret
visibility: "spec.backend.type = 'EventMesh'"
widget: ResourceRef
Expand Down
2 changes: 1 addition & 1 deletion config/ui-extensions/eventing/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
configMapGenerator:
- name: eventings.operator.kyma-project.io
namespace: kube-public
namespace: kyma-system
files:
- general
- form
Expand Down

0 comments on commit def15e8

Please sign in to comment.