EccClientGa4ghServiceRegistryServiceTypes Component
Overview
The ecc-client-ga4gh-service-registry-service-types component lists the types of the services in a GA4GH Service Registry (GET /services/types): one row per type, with its group, artifact and version, in the order that the registry returns them. Groups of GA4GH and ELIXIR types are highlighted, as in the Services and Service components.
While the types load, the table shows placeholder rows; a registry without types shows "No service types found", and a failed request shows its error instead of the table.
Usage
Basic Service Type List
The preview above lists the service types of a public service registry. See Live previews to use another registry.
Properties
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
baseUrl | baseurl | string | "" | Base URL of the Service Registry API, used if no provider is set |
provider | - | ServiceRegistryProvider | undefined | Data provider for fetching service types (see Providers) |
Without either, the component shows an error that asks for one. A provider (or baseUrl) that is set or replaced after the first update loads the types again, and only the latest load applies (see Providers); removing it clears the types and shows the error.
provider
The data provider whose getServiceTypes() lists the types. See the Providers documentation for the available providers and how to create custom ones.
import { RestServiceRegistryProvider } from '@elixir-cloud/service-registry/providers';
const provider = new RestServiceRegistryProvider('https://registry.example.com/ga4gh/registry/v1');
<ECCClientGa4ghServiceRegistryServiceTypes provider={provider} />Events
| Event Name | React Event Name | Detail Type | Description |
|---|---|---|---|
ecc-service-types-changed | onEccServiceTypesChanged | { serviceTypes: ServiceType[] } | Fired when the service types data changes |
ecc-service-types-changed
Emitted whenever the service types are loaded, providing all of them. When a load fails or the provider is removed, it is emitted with an empty list, so that an app drops the types of the previous registry too.
<ECCClientGa4ghServiceRegistryServiceTypes
onEccServiceTypesChanged={(event) => {
console.log('Service types updated:', event.detail.serviceTypes);
}}
/>