From 2fdcc634eabc38f71ac027ea3f0bf730b89f8b16 Mon Sep 17 00:00:00 2001 From: Betelgeuse <116261216+betelgeuse-code@users.noreply.github.com> Date: Mon, 1 Apr 2024 13:51:07 +0000 Subject: [PATCH 1/9] feat: added credential schema for grafana Signed-off-by: Betelgeuse <116261216+betelgeuse-code@users.noreply.github.com> Signed-off-by: Betelgeuse --- src/schemas/grafanaCredential/schema.tsx | 35 ++++++++++++++++++++++ src/schemas/grafanaCredential/uiSchema.tsx | 5 ++++ 2 files changed, 40 insertions(+) create mode 100644 src/schemas/grafanaCredential/schema.tsx create mode 100644 src/schemas/grafanaCredential/uiSchema.tsx diff --git a/src/schemas/grafanaCredential/schema.tsx b/src/schemas/grafanaCredential/schema.tsx new file mode 100644 index 00000000..8607fbcf --- /dev/null +++ b/src/schemas/grafanaCredential/schema.tsx @@ -0,0 +1,35 @@ +/** + * Schema for creating grafana credential; + */ +const grafanaCredentialSchema = { + type: 'object', + title: 'Grafana', + properties: { + credentialName: { + title: 'Credential Name', + type: 'string', + description: 'Name of your credential' + }, + secret: { + type: 'object', + title: 'Credential Secret', + description: 'Credential secret for the Grafana instance', + properties: { + grafanaURL: { + type: 'string', + title: 'URL', + description: 'URL of the Grafana instance' + }, + grafanaAPIKey: { + type: 'string', + title: 'API Key', + description: 'API Key for the Grafana instance' + } + }, + required: ['grafanaURL', 'grafanaAPIKey'] + } + }, + required: ['credentialName'] +}; + +export default grafanaCredentialSchema; diff --git a/src/schemas/grafanaCredential/uiSchema.tsx b/src/schemas/grafanaCredential/uiSchema.tsx new file mode 100644 index 00000000..646098bd --- /dev/null +++ b/src/schemas/grafanaCredential/uiSchema.tsx @@ -0,0 +1,5 @@ +const publishCatalogItemUiSchema = { + 'ui:order': ['type', 'compatibility', 'pattern_caveats', 'pattern_info'] +}; + +export default publishCatalogItemUiSchema; From 722e8ddd51abd05e8257fb59e09a71ab962902a6 Mon Sep 17 00:00:00 2001 From: Betelgeuse <116261216+betelgeuse-code@users.noreply.github.com> Date: Sun, 7 Apr 2024 13:52:46 +0000 Subject: [PATCH 2/9] fix: Fixed wrong name of grafana (typo) Signed-off-by: Betelgeuse <116261216+betelgeuse-code@users.noreply.github.com> Signed-off-by: Betelgeuse --- src/schemas/grafanaCredential/uiSchema.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/schemas/grafanaCredential/uiSchema.tsx b/src/schemas/grafanaCredential/uiSchema.tsx index 646098bd..85f8c332 100644 --- a/src/schemas/grafanaCredential/uiSchema.tsx +++ b/src/schemas/grafanaCredential/uiSchema.tsx @@ -1,5 +1,3 @@ -const publishCatalogItemUiSchema = { - 'ui:order': ['type', 'compatibility', 'pattern_caveats', 'pattern_info'] -}; +const grafanaCredentialUiSchema = {}; -export default publishCatalogItemUiSchema; +export default grafanaCredentialUiSchema; From d8ac8c78a58c4906cf4e0e0caa0e34c84fc85d1e Mon Sep 17 00:00:00 2001 From: Betelgeuse <116261216+betelgeuse-code@users.noreply.github.com> Date: Wed, 17 Apr 2024 13:55:48 +0000 Subject: [PATCH 3/9] feat: Added k8s ui schema Signed-off-by: Betelgeuse <116261216+betelgeuse-code@users.noreply.github.com> Signed-off-by: Betelgeuse --- src/schemas/kubernetesCredential/uiSchema.tsx | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 src/schemas/kubernetesCredential/uiSchema.tsx diff --git a/src/schemas/kubernetesCredential/uiSchema.tsx b/src/schemas/kubernetesCredential/uiSchema.tsx new file mode 100644 index 00000000..64ad52f6 --- /dev/null +++ b/src/schemas/kubernetesCredential/uiSchema.tsx @@ -0,0 +1,3 @@ +const kubernetesCredentialUiSchema = {}; + +export default kubernetesCredentialUiSchema; From 72e636e8afdc8bcb09b3d64389ff1b05daf2adaf Mon Sep 17 00:00:00 2001 From: Betelgeuse <116261216+betelgeuse-code@users.noreply.github.com> Date: Sat, 20 Apr 2024 13:56:38 +0000 Subject: [PATCH 4/9] fix: fix and add correct enum Signed-off-by: Betelgeuse <116261216+betelgeuse-code@users.noreply.github.com> Signed-off-by: Betelgeuse --- src/schemas/kubernetesCredential/schema.tsx | 74 +++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 src/schemas/kubernetesCredential/schema.tsx diff --git a/src/schemas/kubernetesCredential/schema.tsx b/src/schemas/kubernetesCredential/schema.tsx new file mode 100644 index 00000000..b11f10ee --- /dev/null +++ b/src/schemas/kubernetesCredential/schema.tsx @@ -0,0 +1,74 @@ +/** + * Schema for creating grafana credential; + */ +const kubernetesCredentialSchema = { + type: 'object', + title: 'Kubernetes', + properties: { + credentialName: { + title: 'Credential Name', + type: 'string', + description: 'Name of your credential' + }, + secret: { + type: 'object', + title: 'Credential Secret', + description: 'Credential secret for the Kubernetes cluster', + properties: { + clusterName: { + type: 'string', + title: 'Cluster Name', + description: 'Name of the Kubernetes cluster' + }, + clusterServerURL: { + type: 'string', + title: 'Server URL', + description: 'URL of the Kubernetes cluster' + }, + auth: { + type: 'object', + title: 'Auth', + description: 'Kubernetes cluster authentication', + properties: { + clusterUserName: { + type: 'string', + title: 'User Name', + description: 'Name of the Kubernetes cluster user' + }, + clusterToken: { + type: 'string', + title: 'Token', + description: 'Token of the Kubernetes cluster user' + }, + clusterClientCertificateData: { + type: 'string', + title: 'Client Certificate Data', + description: 'Certificate data of the Kubernetes cluster' + }, + clusterClientKeyData: { + type: 'string', + title: 'Client Key Data', + description: 'Client Key data of the Kubernetes cluster' + }, + clusterCertificateAuthorityData: { + type: 'string', + title: 'Certificate Authority Data', + description: 'Certificate Authority data of the Kubernetes cluster' + } + }, + required: [ + 'clusterUserName', + 'clusterToken', + 'clusterClientCertificateData', + 'clusterClientKeyData', + 'clusterCertificateAuthorityData' + ] + } + }, + required: ['clusterName', 'clusterServerURL'] + } + }, + required: ['credentialName'] +}; + +export default kubernetesCredentialSchema; From 725651a213bec243c7bc259d79d46c619acae5b7 Mon Sep 17 00:00:00 2001 From: Betelgeuse <116261216+betelgeuse-code@users.noreply.github.com> Date: Thu, 25 Apr 2024 13:57:57 +0000 Subject: [PATCH 5/9] fix: fix issue of not exporting schemas Signed-off-by: Betelgeuse --- src/schemas/index.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/schemas/index.tsx b/src/schemas/index.tsx index 7e446a79..2da10fd2 100644 --- a/src/schemas/index.tsx +++ b/src/schemas/index.tsx @@ -19,6 +19,9 @@ import importFilterUiSchema from './importFilter/uiSchema'; import publishCatalogItemSchema from './publishCatalogItem/schema'; import publishCatalogItemUiSchema from './publishCatalogItem/uiSchema'; +import kubernetesCredentialSchema from './kubernetesCredential/schema'; +import kubernetesCredentialUiSchema from './kubernetesCredential/uiSchema'; + export { createAndEditEnvironmentSchema, createAndEditEnvironmentUiSchema, @@ -32,6 +35,8 @@ export { importDesignUiSchema, importFilterSchema, importFilterUiSchema, + kubernetesCredentialSchema, + kubernetesCredentialUiSchema, publishCatalogItemSchema, publishCatalogItemUiSchema }; From 7244c8a6f7d0c535e21fa15d4ec96afafe927a99 Mon Sep 17 00:00:00 2001 From: Mukesh Sharma Date: Thu, 11 Apr 2024 14:43:22 +0000 Subject: [PATCH 6/9] fix: fix react json exports Signed-off-by: Betelgeuse --- src/schemas/prometheusCredential/uiSchema.tsx | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 src/schemas/prometheusCredential/uiSchema.tsx diff --git a/src/schemas/prometheusCredential/uiSchema.tsx b/src/schemas/prometheusCredential/uiSchema.tsx new file mode 100644 index 00000000..0c5266b8 --- /dev/null +++ b/src/schemas/prometheusCredential/uiSchema.tsx @@ -0,0 +1,3 @@ +const prometheusCredentialUiSchema = {}; + +export default prometheusCredentialUiSchema; From c07398d60eb67427fdcad663b0a18b5bbcefe98e Mon Sep 17 00:00:00 2001 From: Mukesh Sharma Date: Sun, 14 Apr 2024 14:55:41 +0000 Subject: [PATCH 7/9] feat: add schema for prometheus credential Signed-off-by: Betelgeuse --- src/schemas/prometheusCredential/schema.tsx | 30 +++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/schemas/prometheusCredential/schema.tsx diff --git a/src/schemas/prometheusCredential/schema.tsx b/src/schemas/prometheusCredential/schema.tsx new file mode 100644 index 00000000..f1ecf146 --- /dev/null +++ b/src/schemas/prometheusCredential/schema.tsx @@ -0,0 +1,30 @@ +/** + * Schema for creating prometheus credential; + */ +const prometheusCredentialSchema = { + type: 'object', + title: 'Prometheus', + properties: { + credentialName: { + title: 'Credential Name', + type: 'string', + description: 'Name of your credential' + }, + secret: { + type: 'object', + title: 'Credential Secret', + description: 'Credential secret for the Prometheus instance', + properties: { + prometheusURL: { + type: 'string', + title: 'URL', + description: 'URL of the Prometheus instance' + } + }, + required: ['prometheusURL'] + } + }, + required: ['credentialName'] +}; + +export default prometheusCredentialSchema; From c57fe4555160144f0dd063bdde11d471794c0a17 Mon Sep 17 00:00:00 2001 From: Betelgeuse Date: Mon, 15 Apr 2024 15:42:01 +0000 Subject: [PATCH 8/9] feat: export prometheus for other library to import Signed-off-by: Betelgeuse --- src/schemas/index.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/schemas/index.tsx b/src/schemas/index.tsx index 2da10fd2..cb60b33b 100644 --- a/src/schemas/index.tsx +++ b/src/schemas/index.tsx @@ -22,6 +22,9 @@ import publishCatalogItemUiSchema from './publishCatalogItem/uiSchema'; import kubernetesCredentialSchema from './kubernetesCredential/schema'; import kubernetesCredentialUiSchema from './kubernetesCredential/uiSchema'; +import prometheusCredentialSchema from './prometheusCredential/schema'; +import prometheusCredentialUiSchema from './prometheusCredential/uiSchema'; + export { createAndEditEnvironmentSchema, createAndEditEnvironmentUiSchema, @@ -37,6 +40,8 @@ export { importFilterUiSchema, kubernetesCredentialSchema, kubernetesCredentialUiSchema, + prometheusCredentialSchema, + prometheusCredentialUiSchema, publishCatalogItemSchema, publishCatalogItemUiSchema }; From 3626f48fe2201083fffcaff91f0207ede5b20552 Mon Sep 17 00:00:00 2001 From: Betelgeuse Date: Sat, 30 Mar 2024 15:43:46 +0000 Subject: [PATCH 9/9] feat: Export grafana Signed-off-by: Betelgeuse --- src/schemas/index.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/schemas/index.tsx b/src/schemas/index.tsx index cb60b33b..10ba0bb9 100644 --- a/src/schemas/index.tsx +++ b/src/schemas/index.tsx @@ -25,11 +25,16 @@ import kubernetesCredentialUiSchema from './kubernetesCredential/uiSchema'; import prometheusCredentialSchema from './prometheusCredential/schema'; import prometheusCredentialUiSchema from './prometheusCredential/uiSchema'; +import grafanaCredentialSchema from './grafanaCredential/schema'; +import grafanaCredentialSUiSchema from './grafanaCredential/uiSchema'; + export { createAndEditEnvironmentSchema, createAndEditEnvironmentUiSchema, createAndEditWorkspaceSchema, createAndEditWorkspaceUiSchema, + grafanaCredentialSUiSchema, + grafanaCredentialSchema, helmConnectionSchema, helmConnectionUiSchema, helpAndSupportModalSchema,