EccClientGa4ghServiceRegistryServiceTypes Component
2.0.0-alpha.52
<ecc-client-ga4gh-service-registry-service-types/>
ECCClientGa4ghServiceRegistryServiceTypes
Overview
The ecc-client-ga4gh-service-registry-service-types component lists the service types of a GA4GH Service Registry (GET /services/types), with their group, artifact and version.
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) |
Set one of them; without either, the component shows an error. Changing either loads the types again.
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 when the service types are loaded, with all of them. If loading fails, or the provider is removed, serviceTypes is empty.
<ECCClientGa4ghServiceRegistryServiceTypes
onEccServiceTypesChanged={(event) => {
console.log('Service types updated:', event.detail.serviceTypes);
}}
/>