Skip to main content

<ResourceGroupTable />

The <ResourceGroupTable/> component renders a table of resources for your page in EventCtalog.

The component renders a paginated table of (messages, services, domains, flows, channels), with the ability to filter by resource type, and text search.

Why use ResourceGroupTable?

Sometimes in your catalog you may want to link related resources together or group them in particular ways that EventCatalog does not naturally support.

Examples:

  • List a custom list of messages in a domain page
  • Create a "Related Resources" section on your docs for your documentation readers
  • Create a custom list of resources in your page and let people search them easily.

Support

The <ResourceGroupTable/> component is supported on all EventCatalog pages.

Usage

The <ResourceGroupTable/> component requires frontmatter property called resourceGroups defined in your resource, and then the component itself.

  1. Adding resourceGroup property to your resource
example /domains/Orders/index.mdx
---
id: Orders
name: Orders
version: 0.0.3
owners:
- dboyne
- full-stack
# Here we define the resourceGroups, in this example we create a group called core resources
# We create a list called `related-resources` and we group these services.
# Remember you can define any group of information you want, and link to any catalog resource
resourceGroups:
- id: related-resources
title: Core resources
items:
- id: InventoryService
type: service
- id: OrdersService
type: service
- id: NotificationService
type: service
- id: ShippingService
type: service
---
  1. Include the <ResourceGroupTable/> component inside the markdown
    • e.g /domains/MyDomain/index.mdx

Basic Example

---
#domain frontmatter
---

<ResourceGroupTable id="related-resources" limit={4} showOwners={true} title="Core resources for the Orders domain" description="Resources that are related to the Orders domain, you may find them useful" />

Output example in EventCatalog

Example output

You can see the demo of this in the Orders domain page.

Props

NameTypeDefaultDescription
idstringnoneId of the resource group to render.
titlestring'Related Resources'The title shown above the table.
subtitlestring'Resources'The title shown inside the table.
descriptionstring'Resources that are related to the current resource.'The description of the table.
limitnumber10The number of resources to render in the table. Results are paginated.
showOwnersbooleanfalseWhether to show the owners of the resources in the table.