Skip to content

Commit

Permalink
Create UI for Eventing Module (#166)
Browse files Browse the repository at this point in the history
* Add files for eventing UI

* Add eventing form UI

* Fix UI to select eventmesh secret

* Change default expanded to false

* change visibility of the eventMeshSecret

* Fix name
Consolidate UI to one folder

* Update kustomization.yaml according to folder cleanup

* Improve file structure

* Clean up file

---------

Co-authored-by: Korbinian Stoemmer <[email protected]>
  • Loading branch information
grischperl and k15r authored Oct 24, 2023
1 parent 575acd4 commit a5e840c
Show file tree
Hide file tree
Showing 9 changed files with 100 additions and 3 deletions.
2 changes: 0 additions & 2 deletions config/busola/kustomization.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion config/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ resources:
- ../rbac
- ../manager
- ../webhook
- ../busola
- ../ui-extensions

# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
# crd/kustomization.yaml
Expand Down
31 changes: 31 additions & 0 deletions config/ui-extensions/eventing/details
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
header:
- name: State
source: status.state
widget: Badge

body:
- name: Conditions
source: status.conditions
widget: Table
children:
- source: type
name: Type
- source: status
name: Status
widget: Badge
highlights:
positive:
- 'True'
negative:
- 'False'
- source: reason
name: Reason
- source: message
name: Message
- source: '$readableTimestamp(lastTransitionTime)'
name: Last transition
sort: true
- name: Events
widget: EventList
filter: '$matchEvents($$, $root.kind, $root.metadata.name)'
defaultType: information
30 changes: 30 additions & 0 deletions config/ui-extensions/eventing/form
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
- path: spec.backend.type
name: Backend Type
widget: FormGroup
defaultExpanded: true
enum:
- NATS
- EventMesh
description: Choose a backend type from the dropdown.

- path: spec.backend.config.eventMeshSecret
visibility: "spec.backend.type = 'EventMesh'"
widget: ResourceRef
defaultExpanded: false
resource:
kind: Secret
version: v1
toInternal: |
(
$values := $split($, '/');
{ 'namespace': $values[0], 'name': $values[1] }
)
toExternal: namespace & '/' & name

- path: spec.publisher.replicas
name: Publisher Replicas
widget: FormGroup
defaultExpanded: false
children:
- path: max
- path: min
15 changes: 15 additions & 0 deletions config/ui-extensions/eventing/general
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
resource:
kind: Eventing
group: operator.kyma-project.io
version: v1alpha1
urlPath: eventings
category: Kyma
name: Eventing
scope: namespace
features:
actions:
disableCreate: false
disableDelete: false
description: >-
{{[Eventing CR](https://github.com/kyma-project/eventing-manager/blob/main/config/samples/default.yaml)}}
specifies eventing module.
14 changes: 14 additions & 0 deletions config/ui-extensions/eventing/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
configMapGenerator:
- name: eventings.operator.kyma-project.io
namespace: kube-public
files:
- general
- form
- list
- details
options:
disableNameSuffixHash: true
labels:
app.kubernetes.io/name: eventings.operator.kyma-project.io
busola.io/extension: resource
busola.io/extension-version: "0.5"
6 changes: 6 additions & 0 deletions config/ui-extensions/eventing/list
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- name: State
source: status.state
widget: Badge
highlights:
positive:
- 'Ready'
3 changes: 3 additions & 0 deletions config/ui-extensions/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resources:
- eventing
- subscriptions/subscriptions.yaml
File renamed without changes.

0 comments on commit a5e840c

Please sign in to comment.