From c6a27fd84c7bf9db40bbcc3459ba427800d7866b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=84=8F=E7=90=A6=E8=A1=8C?= <31980412+lixd@users.noreply.github.com> Date: Tue, 22 Aug 2023 13:53:18 +0800 Subject: [PATCH] fix: add custom uischema doc (#1274) --- docs/reference/ui-schema.md | 37 +++++++++++++++++- .../current/reference/ui-schema.md | 37 +++++++++++++++++- .../version-v1.7/reference/ui-schema.md | 37 +++++++++++++++++- .../version-v1.8/reference/ui-schema.md | 37 +++++++++++++++++- .../version-v1.9/reference/ui-schema.md | 38 ++++++++++++++++++- .../version-v1.7/reference/ui-schema.md | 37 +++++++++++++++++- .../version-v1.8/reference/ui-schema.md | 37 +++++++++++++++++- .../version-v1.9/reference/ui-schema.md | 37 +++++++++++++++++- 8 files changed, 281 insertions(+), 16 deletions(-) diff --git a/docs/reference/ui-schema.md b/docs/reference/ui-schema.md index 09194969..442c367c 100644 --- a/docs/reference/ui-schema.md +++ b/docs/reference/ui-schema.md @@ -109,8 +109,41 @@ The spec are as follows: ### Example -Ref:[https://github.com/kubevela/catalog/tree/master/addons/velaux/schemas](https://github.com/kubevela/catalog/tree/master/addons/velaux/schemas) +KubeVela store UISchema config in a ConfigMap in the same namespace with the definition object. +> The default KubeVela system namespace is vela-system, the built-in capabilities and uischemas are laid there. + +You can use the following command to get the ConfigMap list of Custom UISchema. +```bash +kubectl get configmap -n vela-system | grep uischema +``` +```bash +NAME DATA AGE +addon-uischema-velaux 1 25h +component-uischema-helm 1 25h +component-uischema-k8s-objects 1 25h +component-uischema-kustomize 1 25h +component-uischema-task 1 25h +config-uischema-helm-repository 1 25h +config-uischema-image-registry 1 25h +``` +The ConfigMap name is in the format of `-uischema-`, and the data key is `ui-schema`. + +For example, we can use the following command to get the UISchema of `k8s-objects` which tpe is `component`. +```bash +kubectl get configmap -n vela-system component-uischema-k8s-objects -oyaml +``` +```bash +apiVersion: v1 +kind: ConfigMap +metadata: + name: component-uischema-k8s-objects + namespace: vela-system +data: + ui-schema: '[{"jsonKey":"objects","uiType":"K8sObjectsCode"}]' +``` + +For more examples, please refer to the following links:[https://github.com/kubevela/catalog/tree/master/addons/velaux/schemas](https://github.com/kubevela/catalog/tree/master/addons/velaux/schemas) ### How to expand -UI-Schema mainly extends front-end react components, refer to [https://github.com/kubevela/velaux/tree/main/src/extends](https://github.com/kubevela/velaux/tree/main/src/extends) +UI-Schema mainly extends front-end react components, refer to [https://github.com/kubevela/velaux/tree/main/packages/velaux-ui/src/extends](https://github.com/kubevela/velaux/tree/main/packages/velaux-ui/src/extends) diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/reference/ui-schema.md b/i18n/zh/docusaurus-plugin-content-docs/current/reference/ui-schema.md index ca7e179d..2996adac 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/reference/ui-schema.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/reference/ui-schema.md @@ -112,8 +112,41 @@ UI Schema 包含的字段如下: ### 配置案例 -参考:[https://github.com/kubevela/catalog/tree/master/addons/velaux/schemas](https://github.com/kubevela/catalog/tree/master/addons/velaux/schemas) +KubeVela 会将自定义 UISchema 配置存储在与定义对象相同的 namespace 下的 ConfigMap 里。 +> 默认的 KubeVela 系统 namespace 是 vela-system,内置的 capability 和 schema 位于此处。 + +你可以使用以下命令找到自定义 UISchema 的 ConfigMap 列表: +```bash +kubectl get configmap -n vela-system | grep uischema +``` +```bash +NAME DATA AGE +addon-uischema-velaux 1 25h +component-uischema-helm 1 25h +component-uischema-k8s-objects 1 25h +component-uischema-kustomize 1 25h +component-uischema-task 1 25h +config-uischema-helm-repository 1 25h +config-uischema-image-registry 1 25h +``` +`ConfigMap` 命名的格式为 `-uischema-`, 数据键为 `ui-schema`。 + +举个例子, 我们可以使用下面的命令来获取名为 `k8s-objects` 的 `component` 类型组件的自定义 UI Schema 配置: +```bash +kubectl get configmap -n vela-system component-uischema-k8s-objects -oyaml +``` +```bash +apiVersion: v1 +kind: ConfigMap +metadata: + name: component-uischema-k8s-objects + namespace: vela-system +data: + ui-schema: '[{"jsonKey":"objects","uiType":"K8sObjectsCode"}]' +``` + +更多配置案例:[https://github.com/kubevela/catalog/tree/master/addons/velaux/schemas](https://github.com/kubevela/catalog/tree/master/addons/velaux/schemas) ### 如何扩展 -UI-Schema 主要扩展的是前端组件,参考 [https://github.com/kubevela/velaux/tree/main/src/extends](https://github.com/kubevela/velaux/tree/main/src/extends) +UI-Schema 主要扩展的是前端组件,参考 [https://github.com/kubevela/velaux/tree/main/packages/velaux-ui/src/extends](https://github.com/kubevela/velaux/tree/main/packages/velaux-ui/src/extends) diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7/reference/ui-schema.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7/reference/ui-schema.md index ca7e179d..2996adac 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7/reference/ui-schema.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7/reference/ui-schema.md @@ -112,8 +112,41 @@ UI Schema 包含的字段如下: ### 配置案例 -参考:[https://github.com/kubevela/catalog/tree/master/addons/velaux/schemas](https://github.com/kubevela/catalog/tree/master/addons/velaux/schemas) +KubeVela 会将自定义 UISchema 配置存储在与定义对象相同的 namespace 下的 ConfigMap 里。 +> 默认的 KubeVela 系统 namespace 是 vela-system,内置的 capability 和 schema 位于此处。 + +你可以使用以下命令找到自定义 UISchema 的 ConfigMap 列表: +```bash +kubectl get configmap -n vela-system | grep uischema +``` +```bash +NAME DATA AGE +addon-uischema-velaux 1 25h +component-uischema-helm 1 25h +component-uischema-k8s-objects 1 25h +component-uischema-kustomize 1 25h +component-uischema-task 1 25h +config-uischema-helm-repository 1 25h +config-uischema-image-registry 1 25h +``` +`ConfigMap` 命名的格式为 `-uischema-`, 数据键为 `ui-schema`。 + +举个例子, 我们可以使用下面的命令来获取名为 `k8s-objects` 的 `component` 类型组件的自定义 UI Schema 配置: +```bash +kubectl get configmap -n vela-system component-uischema-k8s-objects -oyaml +``` +```bash +apiVersion: v1 +kind: ConfigMap +metadata: + name: component-uischema-k8s-objects + namespace: vela-system +data: + ui-schema: '[{"jsonKey":"objects","uiType":"K8sObjectsCode"}]' +``` + +更多配置案例:[https://github.com/kubevela/catalog/tree/master/addons/velaux/schemas](https://github.com/kubevela/catalog/tree/master/addons/velaux/schemas) ### 如何扩展 -UI-Schema 主要扩展的是前端组件,参考 [https://github.com/kubevela/velaux/tree/main/src/extends](https://github.com/kubevela/velaux/tree/main/src/extends) +UI-Schema 主要扩展的是前端组件,参考 [https://github.com/kubevela/velaux/tree/main/packages/velaux-ui/src/extends](https://github.com/kubevela/velaux/tree/main/packages/velaux-ui/src/extends) diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.8/reference/ui-schema.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.8/reference/ui-schema.md index ca7e179d..2996adac 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.8/reference/ui-schema.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.8/reference/ui-schema.md @@ -112,8 +112,41 @@ UI Schema 包含的字段如下: ### 配置案例 -参考:[https://github.com/kubevela/catalog/tree/master/addons/velaux/schemas](https://github.com/kubevela/catalog/tree/master/addons/velaux/schemas) +KubeVela 会将自定义 UISchema 配置存储在与定义对象相同的 namespace 下的 ConfigMap 里。 +> 默认的 KubeVela 系统 namespace 是 vela-system,内置的 capability 和 schema 位于此处。 + +你可以使用以下命令找到自定义 UISchema 的 ConfigMap 列表: +```bash +kubectl get configmap -n vela-system | grep uischema +``` +```bash +NAME DATA AGE +addon-uischema-velaux 1 25h +component-uischema-helm 1 25h +component-uischema-k8s-objects 1 25h +component-uischema-kustomize 1 25h +component-uischema-task 1 25h +config-uischema-helm-repository 1 25h +config-uischema-image-registry 1 25h +``` +`ConfigMap` 命名的格式为 `-uischema-`, 数据键为 `ui-schema`。 + +举个例子, 我们可以使用下面的命令来获取名为 `k8s-objects` 的 `component` 类型组件的自定义 UI Schema 配置: +```bash +kubectl get configmap -n vela-system component-uischema-k8s-objects -oyaml +``` +```bash +apiVersion: v1 +kind: ConfigMap +metadata: + name: component-uischema-k8s-objects + namespace: vela-system +data: + ui-schema: '[{"jsonKey":"objects","uiType":"K8sObjectsCode"}]' +``` + +更多配置案例:[https://github.com/kubevela/catalog/tree/master/addons/velaux/schemas](https://github.com/kubevela/catalog/tree/master/addons/velaux/schemas) ### 如何扩展 -UI-Schema 主要扩展的是前端组件,参考 [https://github.com/kubevela/velaux/tree/main/src/extends](https://github.com/kubevela/velaux/tree/main/src/extends) +UI-Schema 主要扩展的是前端组件,参考 [https://github.com/kubevela/velaux/tree/main/packages/velaux-ui/src/extends](https://github.com/kubevela/velaux/tree/main/packages/velaux-ui/src/extends) diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.9/reference/ui-schema.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.9/reference/ui-schema.md index ca7e179d..4687cb5b 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.9/reference/ui-schema.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.9/reference/ui-schema.md @@ -112,8 +112,42 @@ UI Schema 包含的字段如下: ### 配置案例 -参考:[https://github.com/kubevela/catalog/tree/master/addons/velaux/schemas](https://github.com/kubevela/catalog/tree/master/addons/velaux/schemas) +KubeVela 会将自定义 UISchema 配置存储在与定义对象相同的 namespace 下的 ConfigMap 里。 +> 默认的 KubeVela 系统 namespace 是 vela-system,内置的 capability 和 schema 位于此处。 + +你可以使用以下命令找到自定义 UISchema 的 ConfigMap 列表: +```bash +kubectl get configmap -n vela-system | grep uischema +``` +```bash +NAME DATA AGE +addon-uischema-velaux 1 25h +component-uischema-helm 1 25h +component-uischema-k8s-objects 1 25h +component-uischema-kustomize 1 25h +component-uischema-task 1 25h +config-uischema-helm-repository 1 25h +config-uischema-image-registry 1 25h +``` + +`ConfigMap` 命名的格式为 `-uischema-`, 数据键为 `ui-schema`。 + +举个例子, 我们可以使用下面的命令来获取名为 `k8s-objects` 的 `component` 类型组件的自定义 UISchema 配置: +```bash +kubectl get configmap -n vela-system component-uischema-k8s-objects -oyaml +``` +```bash +apiVersion: v1 +kind: ConfigMap +metadata: + name: component-uischema-k8s-objects + namespace: vela-system +data: + ui-schema: '[{"jsonKey":"objects","uiType":"K8sObjectsCode"}]' +``` + +更多配置案例:[https://github.com/kubevela/catalog/tree/master/addons/velaux/schemas](https://github.com/kubevela/catalog/tree/master/addons/velaux/schemas) ### 如何扩展 -UI-Schema 主要扩展的是前端组件,参考 [https://github.com/kubevela/velaux/tree/main/src/extends](https://github.com/kubevela/velaux/tree/main/src/extends) +UI-Schema 主要扩展的是前端组件,参考 [https://github.com/kubevela/velaux/tree/main/packages/velaux-ui/src/extends](https://github.com/kubevela/velaux/tree/main/packages/velaux-ui/src/extends) diff --git a/versioned_docs/version-v1.7/reference/ui-schema.md b/versioned_docs/version-v1.7/reference/ui-schema.md index 09194969..442c367c 100644 --- a/versioned_docs/version-v1.7/reference/ui-schema.md +++ b/versioned_docs/version-v1.7/reference/ui-schema.md @@ -109,8 +109,41 @@ The spec are as follows: ### Example -Ref:[https://github.com/kubevela/catalog/tree/master/addons/velaux/schemas](https://github.com/kubevela/catalog/tree/master/addons/velaux/schemas) +KubeVela store UISchema config in a ConfigMap in the same namespace with the definition object. +> The default KubeVela system namespace is vela-system, the built-in capabilities and uischemas are laid there. + +You can use the following command to get the ConfigMap list of Custom UISchema. +```bash +kubectl get configmap -n vela-system | grep uischema +``` +```bash +NAME DATA AGE +addon-uischema-velaux 1 25h +component-uischema-helm 1 25h +component-uischema-k8s-objects 1 25h +component-uischema-kustomize 1 25h +component-uischema-task 1 25h +config-uischema-helm-repository 1 25h +config-uischema-image-registry 1 25h +``` +The ConfigMap name is in the format of `-uischema-`, and the data key is `ui-schema`. + +For example, we can use the following command to get the UISchema of `k8s-objects` which tpe is `component`. +```bash +kubectl get configmap -n vela-system component-uischema-k8s-objects -oyaml +``` +```bash +apiVersion: v1 +kind: ConfigMap +metadata: + name: component-uischema-k8s-objects + namespace: vela-system +data: + ui-schema: '[{"jsonKey":"objects","uiType":"K8sObjectsCode"}]' +``` + +For more examples, please refer to the following links:[https://github.com/kubevela/catalog/tree/master/addons/velaux/schemas](https://github.com/kubevela/catalog/tree/master/addons/velaux/schemas) ### How to expand -UI-Schema mainly extends front-end react components, refer to [https://github.com/kubevela/velaux/tree/main/src/extends](https://github.com/kubevela/velaux/tree/main/src/extends) +UI-Schema mainly extends front-end react components, refer to [https://github.com/kubevela/velaux/tree/main/packages/velaux-ui/src/extends](https://github.com/kubevela/velaux/tree/main/packages/velaux-ui/src/extends) diff --git a/versioned_docs/version-v1.8/reference/ui-schema.md b/versioned_docs/version-v1.8/reference/ui-schema.md index 09194969..442c367c 100644 --- a/versioned_docs/version-v1.8/reference/ui-schema.md +++ b/versioned_docs/version-v1.8/reference/ui-schema.md @@ -109,8 +109,41 @@ The spec are as follows: ### Example -Ref:[https://github.com/kubevela/catalog/tree/master/addons/velaux/schemas](https://github.com/kubevela/catalog/tree/master/addons/velaux/schemas) +KubeVela store UISchema config in a ConfigMap in the same namespace with the definition object. +> The default KubeVela system namespace is vela-system, the built-in capabilities and uischemas are laid there. + +You can use the following command to get the ConfigMap list of Custom UISchema. +```bash +kubectl get configmap -n vela-system | grep uischema +``` +```bash +NAME DATA AGE +addon-uischema-velaux 1 25h +component-uischema-helm 1 25h +component-uischema-k8s-objects 1 25h +component-uischema-kustomize 1 25h +component-uischema-task 1 25h +config-uischema-helm-repository 1 25h +config-uischema-image-registry 1 25h +``` +The ConfigMap name is in the format of `-uischema-`, and the data key is `ui-schema`. + +For example, we can use the following command to get the UISchema of `k8s-objects` which tpe is `component`. +```bash +kubectl get configmap -n vela-system component-uischema-k8s-objects -oyaml +``` +```bash +apiVersion: v1 +kind: ConfigMap +metadata: + name: component-uischema-k8s-objects + namespace: vela-system +data: + ui-schema: '[{"jsonKey":"objects","uiType":"K8sObjectsCode"}]' +``` + +For more examples, please refer to the following links:[https://github.com/kubevela/catalog/tree/master/addons/velaux/schemas](https://github.com/kubevela/catalog/tree/master/addons/velaux/schemas) ### How to expand -UI-Schema mainly extends front-end react components, refer to [https://github.com/kubevela/velaux/tree/main/src/extends](https://github.com/kubevela/velaux/tree/main/src/extends) +UI-Schema mainly extends front-end react components, refer to [https://github.com/kubevela/velaux/tree/main/packages/velaux-ui/src/extends](https://github.com/kubevela/velaux/tree/main/packages/velaux-ui/src/extends) diff --git a/versioned_docs/version-v1.9/reference/ui-schema.md b/versioned_docs/version-v1.9/reference/ui-schema.md index 09194969..442c367c 100644 --- a/versioned_docs/version-v1.9/reference/ui-schema.md +++ b/versioned_docs/version-v1.9/reference/ui-schema.md @@ -109,8 +109,41 @@ The spec are as follows: ### Example -Ref:[https://github.com/kubevela/catalog/tree/master/addons/velaux/schemas](https://github.com/kubevela/catalog/tree/master/addons/velaux/schemas) +KubeVela store UISchema config in a ConfigMap in the same namespace with the definition object. +> The default KubeVela system namespace is vela-system, the built-in capabilities and uischemas are laid there. + +You can use the following command to get the ConfigMap list of Custom UISchema. +```bash +kubectl get configmap -n vela-system | grep uischema +``` +```bash +NAME DATA AGE +addon-uischema-velaux 1 25h +component-uischema-helm 1 25h +component-uischema-k8s-objects 1 25h +component-uischema-kustomize 1 25h +component-uischema-task 1 25h +config-uischema-helm-repository 1 25h +config-uischema-image-registry 1 25h +``` +The ConfigMap name is in the format of `-uischema-`, and the data key is `ui-schema`. + +For example, we can use the following command to get the UISchema of `k8s-objects` which tpe is `component`. +```bash +kubectl get configmap -n vela-system component-uischema-k8s-objects -oyaml +``` +```bash +apiVersion: v1 +kind: ConfigMap +metadata: + name: component-uischema-k8s-objects + namespace: vela-system +data: + ui-schema: '[{"jsonKey":"objects","uiType":"K8sObjectsCode"}]' +``` + +For more examples, please refer to the following links:[https://github.com/kubevela/catalog/tree/master/addons/velaux/schemas](https://github.com/kubevela/catalog/tree/master/addons/velaux/schemas) ### How to expand -UI-Schema mainly extends front-end react components, refer to [https://github.com/kubevela/velaux/tree/main/src/extends](https://github.com/kubevela/velaux/tree/main/src/extends) +UI-Schema mainly extends front-end react components, refer to [https://github.com/kubevela/velaux/tree/main/packages/velaux-ui/src/extends](https://github.com/kubevela/velaux/tree/main/packages/velaux-ui/src/extends)