我正在使用Spotify的后台软件目录UX来创建产品。当使用后台模板引擎创建创建此产品的步骤时,我的问题就出现了。
当前,模板将每个参数呈现为模板窗体上的单个页面范围的文本字段。不过,我正在尝试自定义模板,以允许一组类似网格的文本字段。
是否有一种方法可以自定义"template.yaml“文件以允许每行多个文本字段(以简单的网格格式)?
发布于 2022-10-07 02:45:34
我希望我能正确地理解你的问题,但在这里我举了一个有“步骤”的例子:
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
name: example-repository
title: Example Repository
description: An Example
tags:
- recommended
- template
spec:
owner: group:team
type: component
parameters:
- title: Provide some simple information
required:
- component_id
- owner
properties:
component_id:
title: Name
type: string
description: Unique name of the component
ui:field: EntityNamePicker
description:
title: Description
type: string
description: Help others understand what this website is for.
owner:
title: Owner
type: string
description: Owner of the component
ui:field: OwnerPicker
ui:options:
allowedKinds:
- Group
- title: Choose a location
required:
- repoUrl
properties:
repoUrl:
title: Repository Location
type: string
ui:field: RepoUrlPicker
ui:options:
requestUserCredentials:
secretsKey: USER_OAUTH_TOKEN
additionalScopes:
github:
- workflow
allowedHosts:
- github.com
steps:
- id: template
name: Fetch Skeleton + Template
action: fetch:template
input:
url: ./content
copyWithoutRender:
- .github/workflows/*
values:
component_id: ${{ parameters.component_id }}
description: ${{ parameters.description }}
destination: ${{ parameters.repoUrl | parseRepoUrl }}
owner: ${{ parameters.owner }}
- id: publish
name: Publish
action: publish:github
input:
allowedHosts: ["github.com"]
description: This is ${{ parameters.component_id }}
repoUrl: ${{ parameters.repoUrl }}
repoVisibility: private
token: ${{ secrets.USER_OAUTH_TOKEN }}
- id: register
name: Register
action: catalog:register
input:
repoContentsUrl: ${{ steps.publish.output.repoContentsUrl }}
catalogInfoPath: "/catalog-info.yaml"
output:
links:
- title: Repository
url: ${{ steps.publish.output.remoteUrl }}
- title: Open in catalog
icon: catalog
entityRef: ${{ steps.register.output.entityRef }}
https://stackoverflow.com/questions/73365364
复制相似问题