Skip to content

Commit bf0f26c

Browse files
authored
RHIDP-5608: Update content for Template Editor (#1187)
* Updated content for Template Editor * Fixed broken link * Replaced templates as Software Template
1 parent d00d8cd commit bf0f26c

File tree

4 files changed

+45
-48
lines changed

4 files changed

+45
-48
lines changed

images/rhdh/template-editor.png

-55.3 KB
Loading

modules/customizing-templates/proc-adding-templates.adoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44

55
:_mod-docs-content-type: PROCEDURE
66
[id="proc-adding-templates_{context}"]
7-
= Importing an existing template to {product}
7+
= Importing an existing Software Template to {product}
88

9-
You can add an existing template to your {product} instance by using the Catalog Processor.
9+
You can add an existing Software Template to your {product} instance by using the Catalog Processor.
1010

1111
.Prerequisites
1212

13-
* You have created a directory or repository that contains at least one template YAML file.
14-
* If you want to use a template that is stored in a repository such as GitHub or GitLab, you must configure a {product} integration for your provider.
13+
* You have created a directory or repository that contains at least one Software Template YAML file.
14+
* If you want to use a Software Template that is stored in a repository such as GitHub or GitLab, you must configure a {product} integration for your provider.
1515
1616
.Procedure
1717

18-
* In the `{my-app-config-file}` configuration file, modify the `catalog.rules` section to include a rule for templates, and configure the `catalog.locations` section to point to the template that you want to add, as shown in the following example:
18+
* In the `{my-app-config-file}` configuration file, modify the `catalog.rules` section to include a rule for templates, and configure the `catalog.locations` section to point to the Software Template that you want to add, as shown in the following example:
1919
+
2020
[source,yaml]
2121
----
@@ -28,12 +28,12 @@ catalog:
2828
target: https://<repository_url>/example-template.yaml # <3>
2929
# ...
3030
----
31-
<1> To allow new templates to be added to the catalog, you must add a `Template` rule.
31+
<1> To allow new Software Templates to be added to the catalog, you must add a `Template` rule.
3232
<2> If you are importing templates from a repository, such as GitHub or GitLab, use the `url` type.
33-
<3> Specify the URL for the template.
33+
<3> Specify the URL for the Software Template.
3434
3535
.Verification
3636

3737
. Click the *Catalog* tab in the navigation panel.
3838
. In the *Kind* drop-down menu, select *Template*.
39-
. Confirm that your template is shown in the list of existing templates.
39+
. Confirm that your Software Template is shown in the list of existing Software Templates.

modules/customizing-templates/proc-creating-templates.adoc

Lines changed: 29 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,51 +4,48 @@
44

55
:_mod-docs-content-type: PROCEDURE
66
[id="proc-creating-templates_{context}"]
7-
= Creating a template by using the Template Editor
7+
= Creating a Software Template by using the Template Editor templates
88

9-
You can create a template by using the Template Editor.
9+
You can create a Software Template by using the Template Editor templates.
10+
11+
Alternately, you can use the Template Editor to do any of the following actions:
12+
13+
* *File > Open template directory*
14+
* *File > Create template directory*
15+
* *File > Close template editor*
16+
* Use the *Custom Fields Explorer* button to test custom fields in your `templates.yaml` file
17+
* View *Installed Actions Documentation*
1018
1119
.Procedure
1220

13-
. Access the Template Editor by using one of the following options:
21+
To create a Software Template by using the Template Editor templates, complete the following steps:
22+
23+
. In your {product} navigation menu, click *Create...*.
24+
. Click the overview menu and select *Manage Templates*.
1425
+
1526
image::rhdh/template-editor.png[Template Editor]
16-
** Open the URL `\https://<rhdh_url>/create/edit` for your {product} instance.
17-
** Click *Create...* in the navigation menu of the {product} console, then click the overflow menu button and select *Template editor*.
18-
. Click *Edit Template Form*.
19-
. Optional: Modify the YAML definition for the parameters of your template. For more information about these parameters, see <<Creating a template as a YAML file>>.
20-
. In the *Name ** field, enter a unique name for your template.
21-
. From the *Owner* drop-down menu, choose an owner for the template.
22-
. Click *Next*.
23-
. In the *Repository Location* view, enter the following information about the hosted repository that you want to publish the template to:
24-
.. Select an available *Host* from the drop-down menu.
2527
+
26-
--
28+
2729
[NOTE]
2830
====
29-
Available hosts are defined in the YAML parameters by the `allowedHosts` field:
30-
31-
.Example YAML
32-
[source,yaml]
33-
----
34-
# ...
35-
ui:options:
36-
allowedHosts:
37-
- github.com
38-
# ...
39-
----
40-
31+
* The following options on the *Managed Templates* page do not create a software component in your {product} instance:
32+
** *Template Form Playground*: Use to create and test the `templates.yaml` file
33+
** *Custom Field Explorer*: Use to test custom fields
4134
====
42-
--
43-
44-
.. In the *Owner ** field, enter an organization, user or project that the hosted repository belongs to.
45-
.. In the *Repository ** field, enter the name of the hosted repository.
46-
.. Click *Review*.
4735

48-
. Review the information for accuracy, then click *Create*.
36+
. On the *Managed Templates* page, select any of the following options:
37+
* *Load Template Directory*: Use to load an existing `templates.yaml` file
38+
** In your local file manager, navigate to the folder where your `templates.yaml` file is stored and click *Select*.
39+
* *Create New Template*: Use to create a `templates.yaml` file
40+
** In your local file manager, navigate to the folder where you want the Template Editor to create a `templates.yaml` file and click *Select*.
41+
.. On the *Template Editor* page, select the `templates.yaml` file.
42+
.. On the *Fill in some steps* tab, enter text into the required fields and click *Next*.
43+
.. On the *Repository Location* tab, enter text into the required fields and click *Review*.
44+
.. Optional: Modify the YAML definition for the parameters of your template. For more information about these parameters, see <<Creating a Software Template as a YAML file>>.
45+
.. Review the information for accuracy, then click *Create*.
4946

5047
.Verification
5148

5249
. Click the *Catalog* tab in the navigation panel.
5350
. In the *Kind* drop-down menu, select *Template*.
54-
. Confirm that your template is shown in the list of existing templates.
51+
. Confirm that your Software Template is shown in the list of existing templates.

modules/customizing-templates/ref-creating-templates.adoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
:_mod-docs-content-type: REFERENCE
66
[id="ref-creating-templates_{context}"]
7-
= Creating a template as a YAML file
7+
= Creating a Software Template as a YAML file
88

9-
You can create a template by defining a `Template` object as a YAML file.
9+
You can create a Software Template by defining a `Template` object as a YAML file.
1010

1111
The `Template` object describes the template and its metadata. It also contains required input variables and a list of actions that are executed by the scaffolding service.
1212

@@ -56,10 +56,10 @@ spec:
5656
entityRef: ${{ steps['register'].output.entityRef }}
5757
# ...
5858
----
59-
<1> Specify a name for the template.
60-
<2> Specify a title for the template. This is the title that is visible on the template tile in the *Create...* view.
61-
<3> Specify a description for the template. This is the description that is visible on the template tile in the *Create...* view.
62-
<4> Specify the ownership of the template. The `owner` field provides information about who is responsible for maintaining or overseeing the template within the system or organization. In the provided example, the `owner` field is set to `backstage/techdocs-core`. This means that this template belongs to the `techdocs-core` project in the `backstage` namespace.
59+
<1> Specify a name for the Software Template.
60+
<2> Specify a title for the Software Template. This is the title that is visible on the Software Template tile in the *Create...* view.
61+
<3> Specify a description for the Software Template. This is the description that is visible on the Software Template tile in the *Create...* view.
62+
<4> Specify the ownership of the Software Template. The `owner` field provides information about who is responsible for maintaining or overseeing the Software Template within the system or organization. In the provided example, the `owner` field is set to `backstage/techdocs-core`. This means that this Software Template belongs to the `techdocs-core` project in the `backstage` namespace.
6363
<5> Specify the component type. Any string value is accepted for this required field, but your organization should establish a proper taxonomy for these. {product} instances may read this field and behave differently depending on its value. For example, a `website` type component may present tooling in the {product} interface that is specific to just websites.
6464
+
6565
The following values are common for this field:
@@ -69,8 +69,8 @@ The following values are common for this field:
6969
`website`:: A website.
7070
`library`:: A software library, such as an npm module or a Java library.
7171
--
72-
<6> Use the `parameters` section to specify parameters for user input that are shown in a form view when a user creates a component by using the template in the {product} console. Each `parameters` subsection, defined by a title and properties, creates a new form page with that definition.
72+
<6> Use the `parameters` section to specify parameters for user input that are shown in a form view when a user creates a component by using the Software Template in the {product} console. Each `parameters` subsection, defined by a title and properties, creates a new form page with that definition.
7373
<7> Use the `steps` section to specify steps that are executed in the backend. These steps must be defined by using a unique step ID, a name, and an action. You can view actions that are available on your {product} instance by visiting the URL `\https://<rhdh_url>/create/actions`.
74-
<8> Use the `output` section to specify the structure of output data that is created when the template is used. The `output` section, particularly the `links` subsection, provides valuable references and URLs that users can utilize to access and interact with components that are created from the template.
74+
<8> Use the `output` section to specify the structure of output data that is created when the Software Template is used. The `output` section, particularly the `links` subsection, provides valuable references and URLs that users can utilize to access and interact with components that are created from the Software Template.
7575
<9> Provides a reference or URL to the repository associated with the generated component.
7676
<10> Provides a reference or URL that allows users to open the generated component in a catalog or directory where various components are listed.

0 commit comments

Comments
 (0)