From 10dc7a6d8a6b92cb336378565cfb344381e6fbb8 Mon Sep 17 00:00:00 2001 From: Senali Date: Wed, 11 Oct 2023 19:24:33 +0530 Subject: [PATCH] Add new workspace schema Signed-off-by: Senali --- schemas/configuration/uiSchemaWorkspace.json | 11 +++++++ schemas/configuration/workspace.json | 31 ++++++++++++++++++++ schemas/schemaProvider.go | 2 ++ 3 files changed, 44 insertions(+) create mode 100644 schemas/configuration/uiSchemaWorkspace.json create mode 100644 schemas/configuration/workspace.json diff --git a/schemas/configuration/uiSchemaWorkspace.json b/schemas/configuration/uiSchemaWorkspace.json new file mode 100644 index 00000000..e48114cc --- /dev/null +++ b/schemas/configuration/uiSchemaWorkspace.json @@ -0,0 +1,11 @@ +{ + "organization": { + "ui:disabled": false, + "ui:widget": "select" + }, + "ui:order": [ + "organization", + "name", + "description" + ] +} \ No newline at end of file diff --git a/schemas/configuration/workspace.json b/schemas/configuration/workspace.json new file mode 100644 index 00000000..45dda20a --- /dev/null +++ b/schemas/configuration/workspace.json @@ -0,0 +1,31 @@ +{ + "//playground": "https://rjsf-team.github.io/react-jsonschema-form/#eyJmb3JtRGF0YSI6e30sInNjaGVtYSI6eyJ0aXRsZSI6IkVudmlyb25tZW50IiwicHJvcGVydGllcyI6eyJkZXNjcmlwdGlvbiI6eyJkZXNjcmlwdGlvbiI6IkRlc2NyaXB0aW9uIG9mIHRoZSBFbnZpcm9ubWVudCIsImZvcm1hdCI6InRleHRhcmVhIiwidGl0bGUiOiJEZXNjcmlwdGlvbiIsInR5cGUiOiJzdHJpbmciLCJ4LXJqc2YtZ3JpZC1hcmVhIjoiMTIifSwibmFtZSI6eyJkZXNjcmlwdGlvbiI6IlRoZSBuYW1lIG9mIEVudmlyb25tZW50IiwidGl0bGUiOiJOYW1lIiwidHlwZSI6InN0cmluZyIsIngtcmpzZi1ncmlkLWFyZWEiOiIxMiJ9LCJvcmdhbml6YXRpb24iOnsidHlwZSI6InN0cmluZyIsInRpdGxlIjoiT3JnYW5pemF0aW9uIiwiZW51bSI6WyIxMTExMjIiXSwiZW51bU5hbWVzIjpbXSwieC1yanNmLWdyaWQtYXJlYSI6IjEyIn19LCJ0eXBlIjoib2JqZWN0IiwicmVxdWlyZWQiOlsibmFtZSIsIm9yZ2FuaXphdGlvbiJdfSwidWlTY2hlbWEiOnsib3JnYW5pemF0aW9uIjp7InVpOmRpc2FibGVkIjpmYWxzZSwidWk6d2lkZ2V0Ijoic2VsZWN0In0sInVpOm9yZGVyIjpbIm9yZ2FuaXphdGlvbiIsIm5hbWUiLCJkZXNjcmlwdGlvbiJdfSwidGhlbWUiOiJkZWZhdWx0IiwibGl2ZVNldHRpbmdzIjp7InNob3dFcnJvckxpc3QiOiJ0b3AiLCJ2YWxpZGF0ZSI6ZmFsc2UsImRpc2FibGVkIjpmYWxzZSwibm9IdG1sNVZhbGlkYXRlIjpmYWxzZSwicmVhZG9ubHkiOmZhbHNlLCJvbWl0RXh0cmFEYXRhIjpmYWxzZSwibGl2ZU9taXQiOmZhbHNlLCJleHBlcmltZW50YWxfZGVmYXVsdEZvcm1TdGF0ZUJlaGF2aW9yIjp7ImFycmF5TWluSXRlbXMiOiJwb3B1bGF0ZSIsImVtcHR5T2JqZWN0RmllbGRzIjoicG9wdWxhdGVBbGxEZWZhdWx0cyJ9fX0=", + "title": "Workspace", + "properties": { + "description": { + "description": "Description of the Workspace", + "format": "textarea", + "title": "Description", + "type": "string", + "x-rjsf-grid-area": "12" + }, + "name": { + "description": "The name of Workspace", + "title": "Name", + "type": "string", + "x-rjsf-grid-area": "12" + }, + "organization": { + "type": "string", + "title": "Organization", + "enum": [], + "enumNames": [], + "x-rjsf-grid-area": "12" + } + }, + "type": "object", + "required": [ + "name", + "organization" + ] +} diff --git a/schemas/schemaProvider.go b/schemas/schemaProvider.go index d99b53f8..9cafddef 100644 --- a/schemas/schemaProvider.go +++ b/schemas/schemaProvider.go @@ -12,6 +12,7 @@ func getSchemaMap() map[string]string { "publish": "configuration/publishCatalogItem.json", "helmRepo": "connections/helmConnection/helmRepoConnection.json", "environment": "configuration/environment.json", + "workspace": "configuration/workspace.json", } } @@ -23,6 +24,7 @@ func getUiSchemaMap() map[string]string { "publish": "configuration/uiSchemaPublishCatalogItem.json", "helmRepo": "connections/helmConnection/uiHelmRepoConnection.json", "environment": "configuration/uiSchemaEnvironment.json", + "workspace": "configuration/uiSchemaWorkspace.json", } }