Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 7. Configuring the global header in Red Hat Developer Hub
As an administrator, you can configure the Red Hat Developer Hub global header to create a consistent and flexible navigation bar across your Developer Hub instance. By default, the Developer Hub global header includes the following components:
- Self-service button provides quick access to a variety of templates, enabling users to efficiently set up services, backend and front-end plugins within Developer Hub
- Support button that can link an internal or external support page
- Notifications button displays alerts and updates from plugins and external services
- Search input field allows users to find services, components, documentation, and other resources within Developer Hub
- Plugin extension capabilities provide a preinstalled and enabled catalog of available plugins in Developer Hub
- User profile drop-down menu provides access to profile settings, appearance customization, Developer Hub metadata, and a logout button
7.1. Customizing your Red Hat Developer Hub global header Link kopierenLink in die Zwischenablage kopiert!
You can use the red-hat-developer-hub.backstage-plugin-global-header dynamic plugin to extend the global header with additional buttons and customize the order and position of icons and features. Additionally, you can create and integrate your custom dynamic header plugins using the mount points provided by this new header feature, allowing you to further tailor to suit your needs. For more information about enabling dynamic plugins, see Installing and viewing plugins in Red Hat Developer Hub.
where:
- search
-
Hides the Search modal in the sidebar menu. Change it to
trueto display the Search modal in the sidebar. - settings
-
Hides the Settings button in the sidebar menu. Change it to
trueto display the Settings button in the sidebar. default.main-menu-items- Hides the Self-service button from the sidebar menu. Remove this field to display the Self-service button in the sidebar.
- position
-
Defines the position of the header. Options:
above-main-contentorabove-sidebar.
To extend the functionality of the default global header, include any the following attributes in your global header entry:
mountPoint-
Specifies the location of the header. Use
application/headerto specify it as a global header. You can configure several global headers at different positions by adding entries to themountPointsfield. importNameSpecifies the component exported by the global header plugin.
The
red-hat-developer-hub.backstage-plugin-global-headerpackage (enabled by default) offers the following header components as possible mount point values:-
SearchComponent: Adds a search bar (enabled by default). -
Spacer: Adds spacing in the header to position buttons at the end. Useful when you disableSearchComponent. -
HeaderIconButton: Adds an icon button. By default, the Self-service icon button remains enabled. -
SupportButton: Adds a Support icon button, allowing users to configure a link to an internal or external page. Enabled by default but requires additional configuration to display. -
NotificationButton: Adds a Notifications icon button to display unread notifications in real time and navigate to the Notifications page. Enabled by default (requires the notifications plugin). -
Divider: Adds a vertical divider. By default, a divider appears between the profile dropdown and other header components. -
ProfileDropdown: Adds a profile dropdown showing the logged-in user’s name. By default, it contains two menu items. -
MenuItemLink: Adds a link item in a dropdown menu. By default, the profile dropdown includes a link to the Settings page. -
LogoutButton: Adds a logout button in the profile dropdown (enabled by default). -
CreateDropdown: Adds a Self-service dropdown button (disabled by default). The menu items are configurable. -
SoftwareTemplatesSection: Adds a list of software template links to the Self-service dropdown menu (disabled by default). You must enableCreateDropdown. -
RegisterAComponentSection: Adds a link to the Register a Component page in the Self-service dropdown menu (disabled by default). You must enableCreateDropdown.
-
config.position-
Specifies the position of the header. Supported values are
above-main-contentandabove-sidebar.
Prerequisites
-
You must configure the support URL in the
app-config.yamlfile to display the Support button in the header. - You must install the notifications plugin to display the Notifications button in the header.
Procedure
Copy the default configuration and modify the field values to suit your needs. You can adjust the
priorityvalue of each header component to control its position. Additionally, you can enable or disable components by adding or removing them from the configuration. To ensure that the remaining header buttons align with the end of the header before the profile dropdown button, setconfig.props.growFactorto1in theSpacermount point to enable theSpacercomponent. For example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow To use your custom header, you must install it as a dynamic plugin by adding your plugin configuration to your
app-config-dynamic.yamlfile. For example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow where:
- <npm_or_oci_package-reference>
- Specifies the package name.
- <application_header_name>
-
Specifies the name of the application header. For example:
MyHeader - <header_component_name>
Specifies the name of the header component. For example:
MyHeaderComponentNoteimportNameis an optional name referencing the value returned by the scaffolder field extension API.
Optional: To disable the global header, set the value of the
disabledfield totruein yourdynamic-plugins.yamlfile. For example:- package: ./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-global-header disabled: true
- package: ./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-global-header disabled: trueCopy to Clipboard Copied! Toggle word wrap Toggle overflow
7.2. Mount points for dynamic plugin integration Link kopierenLink in die Zwischenablage kopiert!
You can customize the application header in Developer Hub using mount points for dynamic plugins. These mount points give flexibility in configuring the position of the header, its components and dropdown menus. You can create a customized experience with the following enhancements:
- application/header
-
Controls the header position. Use
config.positionto set placement as eitherabove-main-contentorabove-sidebar. - global.header/component
Configures header components. Use
config.priorityto set the order of components, and pass properties (including CSS styles) viaconfig.props.Self-service button
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Spacer element
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Divider element
mountPoints: - mountPoint: global.header/component importName: Divider config: priority: 150mountPoints: - mountPoint: global.header/component importName: Divider config: priority: 150Copy to Clipboard Copied! Toggle word wrap Toggle overflow
- global.header/profile
Configures the profile dropdown list when the
ProfileDropdowncomponent is enabled.Adding a settings link to the profile dropdown
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
- global.header/create
Configures the create dropdown list when the
CreateDropdowncomponent is enabled.Adding a section for registering a component
- mountPoint: global.header/create importName: RegisterAComponentSection config: props: growFactor: 0- mountPoint: global.header/create importName: RegisterAComponentSection config: props: growFactor: 0Copy to Clipboard Copied! Toggle word wrap Toggle overflow
7.3. Configuring the logo in the global header Link kopierenLink in die Zwischenablage kopiert!
You can configure a company logo in the global header of the Red Hat Developer Hub (RHDH) to reflect your company’s branding. CompanyLogo is part of the global header by default and offers full control over the theming, navigation behavior, sizing, and fallback options.
This component supports the following props, which are provided through configuration:
-
logo: The base64 encoded logo image. -
to: The redirect path for when users click the logo is '/catalog'. -
width: The logo width is optional and defaults to 150 px. -
height: The logo height is optional and defaults to 40px.
Procedure
To display a custom company logo in the global header, update the configuration with a mount point for
CompanyLogo:+
(Optional) If you do not provide
logoprops to theCompanyLogocomponent, the component instead uses values defined underapp.brandingin yourapp-config.yamlfile. You can configure theCompanyLogoas shown in the following configuration:+
+ CompanyLogo uses the following configuration elements to control fallback and sizing behavior:
Logo source priority
The component selects the logo source in the following order:
First,
CompanyLogoprops (logo, logo.light, logo.dark), then,app.branding.fullLogo. If you do not provide a logo through either, the component displays the default Developer Hub theme-specific logo.
Logo width priority
-
The component applies the first available value from
props.width, thenapp.branding.fullLogoWidthfromapp-config.yaml. If you do not specify thewidthusing either, the component applies a default width (150 px).
-
The component applies the first available value from
CompanyLogo preserves the images aspect ratio and never crops or distorts it. If the configured width results in a height greater than the maximum allowed (default: 40px), the image is automatically scaled down. As a result, adjusting only the width may not visibly change the logo unless the height is also configured.
Increasing the logo height increases the height of the global header. The component first applies the value from props.height. If you do not specify the height, the component applies a default height (40px).
Verification
- The logo appears correctly in the global header.
-
Click the logo to confirm it redirects to the path you defined in
props.to. -
Toggle between
lightanddarkthemes to ensure the correct logo loads in each. -
(Optional) Temporarily remove the
CompanyLogoprops to test the fallback toapp.branding.fullLogo.
7.4. Enabling logo in the sidebar Link kopierenLink in die Zwischenablage kopiert!
You can configure a logo in the sidebar of the Red Hat Developer Hub (RHDH).
Procedure
To display the logo in the sidebar, set the value of the
app.sidebar.logoparameter totrueas shown in the following example:app: sidebar: logo: trueapp: sidebar: logo: trueCopy to Clipboard Copied! Toggle word wrap Toggle overflow NoteTo display the logo in only the sidebar, remove the
CompanyLogocomponent from the configuration.To display the same logo in the sidebar for all themes, update the configuration as shown in the following configuration:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For theme-specific logos, you can configure the sidebar logo as shown in the following configuration:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
- The logo appears correctly in the sidebar.
-
Toggle between
lightanddarkthemes to ensure the correct logo loads in each.
7.5. Displaying the preferred username in the profile dropdown Link kopierenLink in die Zwischenablage kopiert!
You can display the preferred username in the global header profile drop-down list by configuring spec.profile.displayName in the user entity. When not configured, the application falls back to a metadata.title. If neither is configured, it defaults to a user-friendly name generated by the useProfileInfo hook.
Procedure
When you configure
spec.profile.displayName, use the following code:Copy to Clipboard Copied! Toggle word wrap Toggle overflow When you do not configure
spec.profile.displaynamebut configuremetadata.title, use the following code:Copy to Clipboard Copied! Toggle word wrap Toggle overflow When you do not configure the
spec.profile.displaynameand themetadata.title, use the following code:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
The application falls back to metadata.name when you do not register the user entity.
7.6. Quicklinks and Starred Items in the global header Link kopierenLink in die Zwischenablage kopiert!
The Quicklinks matrix and Starred Items drop-down list are enabled by default and appear in the global header without requiring additional configuration.
The Quicklinks matrix, organized by sections (for example, Documentation or Developer Tools), allows users to quickly access internal or external resources. The Starred Items drop-down list contains entities and pages that the user has starred.
The default configuration includes the following components:
StarredDropdown: Displays the Starred Items menu in the global header by default, as shown in the following configuration:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow ApplicationLauncherDropdown: Provides the Quicklinks matrix (application launcher) by default, as shown in the following configuration:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow MenuItemLink entries: Define sections, titles, icons, and links within the Quicklinks matrix. The default configuration includes links to the Developer Hub documentation and an RHDH Local, as shown in the following configurations:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
When upgrading from previous versions, the installer does not overwrite your existing dynamic-plugins.yaml configuration. If you had not configured Starred Items or Quicklinks previously, they remain disabled after the upgrade and must be manually enabled.
7.7. Enabling Quicklinks and Starred Items after an upgrade Link kopierenLink in die Zwischenablage kopiert!
If you upgrade from Red Hat Developer Hub 1.6 or earlier, Red Hat Developer Hub does not automatically enable the Quicklinks and Starred Items features. You must manually configure these features to display them in the global header.
Prerequisites
- You have access to your Red Hat Developer Hub configuration files.
- You have administrative permissions to modify ConfigMaps (if using the Operator).
Procedure
Locate your
dynamic-pluginconfiguration.- Operator deployment: The configuration is stored in a ConfigMap referenced by your Backstage custom resource (CR).
-
Helm deployment: The configuration is in your
values.yamlfile or separate configuration files.
-
Enable the global header plugin. Ensure that the
red-hat-developer-hub-backstage-plugin-global-headerentry exists under theplugins: listand thatdisabledis set tofalse. Verify that you enabled the global header plugin. Confirm that you listed the
red-hat-developer-hub-backstage-plugin-global-headerplugin underplugins:withdisabled: false(or without adisabledproperty):- package: ./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-global-header disabled: false- package: ./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-global-header disabled: falseCopy to Clipboard Copied! Toggle word wrap Toggle overflow Add the required components. Under the
mountPointssection of the plugin, add the components as shown in the following example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Apply the configuration.
- Operator deployment: Update the ConfigMap and allow the Operator to reconcile the changes.
-
Helm deployment: Apply your updated configuration using
helm upgrade.
- Verify the features are enabled. After the Red Hat Developer Hub instance restarts, confirm that the star icon and Quicklinks matrix appear in the global header.