Skip to content

SPI: custom tabs #329

Description

@hpehl

Parent: #320

Summary

Allow resources to contribute additional tabs to ResourceTabs, or replace/remove default tabs. Currently, ResourceTabs hardcodes four tabs (Data, Attributes, Operations, Capabilities) with no way for consumers to customize them.

Motivation

The /subsystem=elytron/credential-store=* resource would benefit from an "Aliases" tab alongside the default tabs. Similar use cases exist for other resources that have domain-specific data that doesn't fit into the generic attribute view (e.g., deployments content, messaging queues, datasource connection pools).

Capabilities

  • Add tabs — inject extra tabs after the "Data" tab (or at a specified position)
  • Remove tabs — suppress default tabs that aren't useful for a resource (e.g., hide "Capabilities" when empty)
  • Replace tab content — swap the content of an existing tab with a custom implementation

Registration

A registry keyed by Environment + AddressTemplate. When ResourceTabs is constructed for a matching template, the registry provides the tab customizations. Providers are CDI beans implementing ResourceTabsProvider in org.jboss.hal.ui.resource.spi.

Open Questions

  • Should custom tabs receive the same Metadata and loaded ModelNode that the Data tab uses, or should they load their own data?
  • How should tab ordering work when multiple providers match (e.g., a wildcard and an exact template)?
  • Should there be a standard interface/abstract class for custom tab content?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions