From 8a2de1001f81c3b18aba9c1af0de5301e1caf8fd Mon Sep 17 00:00:00 2001 From: Ikechukwu Eze <92305839+ikezedev@users.noreply.github.com> Date: Sun, 31 Jul 2022 19:50:03 +0200 Subject: [PATCH 1/4] first steps with ui --- .../components/svg/databases/EdgeDB.svelte | 22 ++++++++ .../databases/[id]/_DatabaseLinks.svelte | 3 ++ .../[id]/_Databases/_Databases.svelte | 9 +++- .../databases/[id]/_Databases/_EdgeDB.svelte | 53 +++++++++++++++++++ .../databases/[id]/configuration/type.svelte | 3 ++ apps/ui/src/routes/databases/index.svelte | 5 ++ 6 files changed, 93 insertions(+), 2 deletions(-) create mode 100644 apps/ui/src/lib/components/svg/databases/EdgeDB.svelte create mode 100644 apps/ui/src/routes/databases/[id]/_Databases/_EdgeDB.svelte diff --git a/apps/ui/src/lib/components/svg/databases/EdgeDB.svelte b/apps/ui/src/lib/components/svg/databases/EdgeDB.svelte new file mode 100644 index 000000000..25b705c2c --- /dev/null +++ b/apps/ui/src/lib/components/svg/databases/EdgeDB.svelte @@ -0,0 +1,22 @@ + + + diff --git a/apps/ui/src/routes/databases/[id]/_DatabaseLinks.svelte b/apps/ui/src/routes/databases/[id]/_DatabaseLinks.svelte index 50eed98b2..ec88e8edf 100644 --- a/apps/ui/src/routes/databases/[id]/_DatabaseLinks.svelte +++ b/apps/ui/src/routes/databases/[id]/_DatabaseLinks.svelte @@ -3,6 +3,7 @@ import Clickhouse from '$lib/components/svg/databases/Clickhouse.svelte'; import CouchDb from '$lib/components/svg/databases/CouchDB.svelte'; + import EdgeDb from '$lib/components/svg/databases/EdgeDB.svelte'; import MariaDb from '$lib/components/svg/databases/MariaDB.svelte'; import MongoDb from '$lib/components/svg/databases/MongoDB.svelte'; import MySql from '$lib/components/svg/databases/MySQL.svelte'; @@ -25,5 +26,7 @@ {:else if database.type === 'redis'} + {:else if database.type === 'redis'} + {/if} diff --git a/apps/ui/src/routes/databases/[id]/_Databases/_Databases.svelte b/apps/ui/src/routes/databases/[id]/_Databases/_Databases.svelte index bc259cbd6..c57520ee6 100644 --- a/apps/ui/src/routes/databases/[id]/_Databases/_Databases.svelte +++ b/apps/ui/src/routes/databases/[id]/_Databases/_Databases.svelte @@ -13,6 +13,7 @@ import PostgreSql from './_PostgreSQL.svelte'; import Redis from './_Redis.svelte'; import CouchDb from './_CouchDb.svelte'; + import EdgeDB from './_EdgeDB.svelte'; import { post } from '$lib/api'; import { toast } from '@zerodevx/svelte-toast'; import { t } from '$lib/translations'; @@ -37,8 +38,10 @@ databaseDefault = database.defaultDatabase; databaseDbUser = database.dbUser; databaseDbUserPassword = database.dbUserPassword; - if (database.type === 'mongodb') { - databaseDefault = '?readPreference=primary&ssl=false'; + if (database.type === 'mongodb' || database.type === 'edgedb') { + if (database.type === 'mongodb') { + databaseDefault = '?readPreference=primary&ssl=false'; + } databaseDbUser = database.rootUser; databaseDbUserPassword = database.rootUserPassword; } else if (database.type === 'redis') { @@ -196,6 +199,8 @@ {:else if database.type === 'couchdb'} + {:else if database.type === 'edgedb'} + {/if}