Skip to content

Commit d29bb6a

Browse files
[release-1.5] RHIDP-6500: Modularize customizing the Tech Radar page (#1113)
Co-authored-by: Fabrice Flore-Thébault <[email protected]>
1 parent 21c1718 commit d29bb6a

File tree

5 files changed

+84
-75
lines changed

5 files changed

+84
-75
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[id='proc-customizing-the-tech-radar-page_{context}']
2+
= Customizing the Tech Radar page in {product}
3+
4+
In {product}, the Tech Radar page is provided by the `tech-radar` dynamic plugin, which is disabled by default. For information about enabling dynamic plugins in {product} see link:{configuring-dynamic-plugins-book-url}[{configuring-dynamic-plugins-book-title}].
5+
6+
In {product}, you can configure Learning Paths by passing the data into the `{my-app-config-file}` file as a proxy. The base Tech Radar URL must include the `/developer-hub/tech-radar` proxy.
7+
8+
[NOTE]
9+
====
10+
Due to the use of overlapping `pathRewrites` for both the `tech-radar` and `homepage` quick access proxies, you must create the `tech-radar` configuration (`^api/proxy/developer-hub/tech-radar`) before you create the `homepage` configuration (`^/api/proxy/developer-hub`).
11+
12+
For more information about customizing the Home page in {product}, see xref:customizing-the-home-page[Customizing the Home page in {product}].
13+
====
14+
15+
You can provide data to the Tech Radar page from the following sources:
16+
17+
* JSON files hosted on GitHub or GitLab.
18+
* A dedicated service that provides the Tech Radar data in JSON format using an API.
19+
20+
include::modules/customizing-the-tech-radar-page/proc-customizing-the-tech-radar-page-by-using-a-json-file.adoc[leveloffset=+1]
21+
22+
include::modules/customizing-the-tech-radar-page/proc-customizing-the-tech-radar-page-by-using-a-customization-service.adoc[leveloffset=+1]

modules/customizing-the-tech-radar-page/proc-customize-rhdh-tech-radar-page.adoc

Lines changed: 0 additions & 74 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
[id='proc-customizing-rhdh-tech-radar-page-by-using-a-customization-service_{context}']
2+
= Customizing the Tech Radar page by using a customization service
3+
4+
For advanced scenarios, you can host your {product} customization service to provide data to all configurable {product-short} pages, such as the Tech Radar page.
5+
You can even use a different service for each page.
6+
7+
.Prerequisites
8+
* You have specified the data sources for the Tech Radar plugin in the `integrations` section of the `{my-app-config-file}` file.
9+
For example, to configure GitHub as an integration, see link:{authentication-book-url}#authenticating-with-github[Authenticating with GitHub].
10+
11+
* You have enabled the `./dynamic-plugins/dist/backstage-community-plugin-tech-radar` and `/dynamic-plugins/dist/backstage-community-plugin-tech-radar-backend-dynamic` plugins.
12+
13+
.Procedure
14+
. Deploy your {product-short} customization service on the same {ocp-short} cluster as your {product-short} instance.
15+
You can find an example at link:https://github.com/redhat-developer/red-hat-developer-hub-customization-provider[`red-hat-developer-hub-customization-provider`], that provides the same data as default {product-short} data.
16+
The customization service provides a Tech Radar data URL such as: `pass:c,a,q[http://_<rhdh-customization-provider>_/tech-radar]`.
17+
18+
. Add the dedicated service as an allowed host by adding the following code to the `{my-app-config-file}` file:
19+
+
20+
[source,yaml,subs='+quotes']
21+
----
22+
backend:
23+
reading:
24+
allow:
25+
- host: '_<rhdh_customization_provider_base_url>_'
26+
----
27+
`_<rhdh_customization_provider_base_url>_`:: Enter the base URL of your Tech Radar data URL, such as: `pass:c,a,q[_<rhdh-customization-provider>_]`.
28+
29+
. Add the following to the `{my-app-config-file}` file:
30+
+
31+
[source,yaml,subs='+quotes']
32+
----
33+
techRadar:
34+
url: _<tech_radar_data_url>_
35+
----
36+
37+
`_<tech_radar_data_url>_`:: Enter your Tech Radar data URL, such as: `pass:c,a,q[http://_<rhdh-customization-provider>_/tech-radar]`.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[id='proc-customizing-the-tech-radar-page-by-using-a-json-file_{context}']
2+
= Customizing the Tech Radar page by using a JSON file
3+
4+
For ease of use and simplicity, you can configure the Tech Radar page by using a hosted JSON file.
5+
6+
.Prerequisites
7+
8+
* You have specified the data sources for the Tech Radar plugin in the `integrations` section of the `{my-app-config-file}` file. For example, to configure GitHub as an integration, see link:{authentication-book-url}#authenticating-with-github[Authenticating with GitHub].
9+
10+
* You have enabled the `./dynamic-plugins/dist/backstage-community-plugin-tech-radar` and `/dynamic-plugins/dist/backstage-community-plugin-tech-radar-backend-dynamic` plugins.
11+
12+
.Procedure
13+
14+
. Publish the JSON file containing your Tech Radar data to a web server, such as GitHub or Gitlab. You can find an example at link:https://raw.githubusercontent.com/redhat-developer/rhdh/release-{product-version}/packages/app/public/tech-radar/data-default.json[].
15+
16+
. Configure {product-short} to access the Tech Radar data from the hosted JSON files, by adding the following to the `{my-app-config-file}` file:
17+
+
18+
[source,yaml,subs='+quotes']
19+
----
20+
techRadar:
21+
url: _<tech_radar_data_url>_
22+
----
23+
24+
`_<tech_radar_data_url>_`:: Enter the Tech Radar data hosted JSON URL.

titles/customizing/master.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ include::assemblies/assembly-configuring-the-global-header.adoc[leveloffset=+1]
2727

2828
include::assemblies/assembly-configuring-a-floating-action-button.adoc[leveloffset=+1]
2929

30-
include::modules/customizing-the-tech-radar-page/proc-customize-rhdh-tech-radar-page.adoc[leveloffset=+1]
30+
include::assemblies/assembly-customizing-the-tech-radar-page.adoc[leveloffset=+1]
3131

3232

3333
include::assemblies/assembly-customizing-the-appearance.adoc[leveloffset=+1]

0 commit comments

Comments
 (0)