From f774d0ec2024fec5ff39ac6f2707b20c021d0bad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eneko=20Fern=C3=A1ndez?= <12957664+enekofb@users.noreply.github.com> Date: Wed, 6 Sep 2023 11:54:56 +0100 Subject: [PATCH] updating extend explorer internal documentation out of the feedback from adding gitopssets (#3283) * updating extend explorer internal documentation out of the feedback from adding gitopssets * updated with integration test info * updated tests section --- docs/extending-explorer.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/extending-explorer.md b/docs/extending-explorer.md index 7a49d6c37..2b3a17df4 100644 --- a/docs/extending-explorer.md +++ b/docs/extending-explorer.md @@ -13,8 +13,19 @@ Things to know: ## Adding a new Object Kind 1. Add a new entry in the [`SupportedObjectKinds`](https://github.com/weaveworks/weave-gitops-enterprise/blob/253256c16c777b0d488ca0ba8068b8f80b1b4c07/pkg/query/configuration/objectkind.go#L119) slice -2. Add an [RBAC entry](https://github.com/weaveworks/weave-gitops-enterprise/blob/9101b60a487e1f999b4e988e9ca27bdde4ac7538/charts/mccp/templates/clusters-service/collector.yaml#L13) to WeGO ServiceAccount for your kind +2. Add a entry to [`ToFluxObject`](https://github.com/weaveworks/weave-gitops-enterprise/blob/f36d549b6010afbd3c086c4955637586629ec589/pkg/query/configuration/objectkind.go#L284) as will be required +for [Status and Message](https://github.com/weaveworks/weave-gitops-enterprise/blob/f36d549b6010afbd3c086c4955637586629ec589/pkg/query/internal/models/object.go#L113C1-L129) +3. Add an [RBAC entry](https://github.com/weaveworks/weave-gitops-enterprise/blob/9101b60a487e1f999b4e988e9ca27bdde4ac7538/charts/mccp/templates/clusters-service/collector.yaml#L13) to WeGO ServiceAccount for your kind +## Using the default Explorer UI component + +If you would like to use default Explorer view with your Kind: + +1. Add your Kind details Route to [`getKindRoute`](https://github.com/weaveworks/weave-gitops-enterprise/blob/f36d549b6010afbd3c086c4955637586629ec589/ui-cra/src/utils/nav.ts#L3) +2. Add a test case for your kind in the [integration test](https://github.com/weaveworks/weave-gitops-enterprise/blob/main/pkg/query/server/server_integration_test.go#L44) + - Add any CRDs to [testdata/crds](../pkg/query/server/testdata/crds) + - Add the GV to [`AddToScheme`](../pkg/query/server/suite_test.go) to register the GVK. + ## Using the Explorer UI component If you would like to view your object list in a dedicated table: