Skip to content

Commit

Permalink
Add intermediate Explorer object statuses (#3696).
Browse files Browse the repository at this point in the history
* Add `GetConditionsFunc` and `GetSuspendedFunc` to `ObjectKind` to simplify adding new object kinds (with updates required in a single place).

* Add showing icons for intermediate Explorer object statuses in the Explorer UI.

* Expand status and message tests for Explorer objects.

* Add unit and snapshot tests for rendering UI indicators of Explorer object statuses.

* Remove the `FluxObject` interface, `ToFluxObject` function, and adapters.

* Add returning errors from `StatusFunc` and `MessageFunc`.

* Update the comment for the `defaultStatusFunc` function to reflect changes in status computation logic logic.

* Rename `AutomatedClusterDiscoveryKind` to `AutomatedClusterDiscoveryObjectKind` for consistency.

* Add a test for computing `AutomatedClusterDiscoveryObjectKind` status message.

* Remove empty lines for consistency.
  • Loading branch information
opudrovs committed Dec 19, 2023
1 parent bfe1cc1 commit 72fbbff
Show file tree
Hide file tree
Showing 11 changed files with 2,370 additions and 216 deletions.
8 changes: 4 additions & 4 deletions pkg/query/collector/reconciler/reconciler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,11 @@ func TestReconciler_Reconcile(t *testing.T) {
FilterFunc: func(object client.Object) bool {
return false
},
StatusFunc: func(obj client.Object) configuration.ObjectStatus {
return configuration.NoStatus
StatusFunc: func(_ client.Object, _ configuration.ObjectKind) (configuration.ObjectStatus, error) {
return configuration.NoStatus, nil
},
MessageFunc: func(obj client.Object) string {
return ""
MessageFunc: func(_ client.Object, _ configuration.ObjectKind) (string, error) {
return "", nil
},
Category: "test",
},
Expand Down
84 changes: 0 additions & 84 deletions pkg/query/configuration/fluxobject_test.go

This file was deleted.

Loading

0 comments on commit 72fbbff

Please sign in to comment.