diff --git a/frontend/src/components/DashboardGrid.svelte b/frontend/src/components/DashboardGrid.svelte index 99cc441..9bf8356 100644 --- a/frontend/src/components/DashboardGrid.svelte +++ b/frontend/src/components/DashboardGrid.svelte @@ -11,19 +11,18 @@
- +
@@ -212,21 +221,52 @@ type="checkbox" checked={allSelected} indeterminate={someSelected && !allSelected} - on:change={(e) => handleSelectAll((e.target as HTMLInputElement).checked)} + on:change={(e) => + handleSelectAll((e.target as HTMLInputElement).checked)} class="h-4 w-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500" /> - handleSort('title')}> - {$t.dashboard.title} {sortColumn === 'title' ? (sortDirection === 'asc' ? '↑' : '↓') : ''} + handleSort("title")} + > + {$t.dashboard.title} + {sortColumn === "title" + ? sortDirection === "asc" + ? "↑" + : "↓" + : ""} - handleSort('last_modified')}> - {$t.dashboard.last_modified} {sortColumn === 'last_modified' ? (sortDirection === 'asc' ? '↑' : '↓') : ''} + handleSort("last_modified")} + > + {$t.dashboard.last_modified} + {sortColumn === "last_modified" + ? sortDirection === "asc" + ? "↑" + : "↓" + : ""} - handleSort('status')}> - {$t.dashboard.status} {sortColumn === 'status' ? (sortDirection === 'asc' ? '↑' : '↓') : ''} + handleSort("status")} + > + {$t.dashboard.status} + {sortColumn === "status" + ? sortDirection === "asc" + ? "↑" + : "↓" + : ""} - {$t.dashboard.validation} - {$t.dashboard.git} + {$t.dashboard.validation} + {$t.dashboard.git} @@ -236,14 +276,28 @@ handleSelectionChange(dashboard.id, (e.target as HTMLInputElement).checked)} + on:change={(e) => + handleSelectionChange( + dashboard.id, + (e.target as HTMLInputElement).checked, + )} class="h-4 w-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500" /> - {dashboard.title} - {new Date(dashboard.last_modified).toLocaleDateString()} + {dashboard.title} + {new Date(dashboard.last_modified).toLocaleDateString()} - + {dashboard.status} @@ -255,7 +309,7 @@ disabled={validatingIds.has(dashboard.id)} class="text-purple-600 hover:text-purple-900" > - {validatingIds.has(dashboard.id) ? 'Validating...' : 'Validate'} + {validatingIds.has(dashboard.id) ? "Validating..." : "Validate"} @@ -278,9 +332,15 @@
{($t.dashboard?.showing || "") - .replace('{start}', (currentPage * pageSize + 1).toString()) - .replace('{end}', Math.min((currentPage + 1) * pageSize, sortedDashboards.length).toString()) - .replace('{total}', sortedDashboards.length.toString())} + .replace("{start}", (currentPage * pageSize + 1).toString()) + .replace( + "{end}", + Math.min( + (currentPage + 1) * pageSize, + sortedDashboards.length, + ).toString(), + ) + .replace("{total}", sortedDashboards.length.toString())}
- {/if} - - - - + + + + + +
+ {#if schema && schema.properties} + {#each Object.entries(schema.properties) as [key, prop]} +
+ + {#if prop.type === 'string'} + + {:else if prop.type === 'number' || prop.type === 'integer'} + + {:else if prop.type === 'boolean'} + + {/if} +
+ {/each} + + {/if} +
+ + + diff --git a/frontend/src/components/EnvSelector.svelte b/frontend/src/components/EnvSelector.svelte index 78eda60..9fb7c0d 100644 --- a/frontend/src/components/EnvSelector.svelte +++ b/frontend/src/components/EnvSelector.svelte @@ -14,9 +14,12 @@ // [/SECTION] // [SECTION: PROPS] - export let label: string = "Select Environment"; - export let selectedId: string = ""; - export let environments: Array<{id: string, name: string, url: string}> = []; + let { + label = "", + selectedId = "", + environments = [], + } = $props(); + // [/SECTION] const dispatch = createEventDispatcher(); @@ -53,8 +56,5 @@
- \ No newline at end of file diff --git a/frontend/src/components/MappingTable.svelte b/frontend/src/components/MappingTable.svelte index c0d00c0..436fc5c 100644 --- a/frontend/src/components/MappingTable.svelte +++ b/frontend/src/components/MappingTable.svelte @@ -14,10 +14,13 @@ // [/SECTION] // [SECTION: PROPS] - export let sourceDatabases: Array<{uuid: string, database_name: string, engine?: string}> = []; - export let targetDatabases: Array<{uuid: string, database_name: string}> = []; - export let mappings: Array<{source_db_uuid: string, target_db_uuid: string}> = []; - export let suggestions: Array<{source_db_uuid: string, target_db_uuid: string, confidence: number}> = []; + let { + sourceDatabases = [], + targetDatabases = [], + mappings = [], + suggestions = [], + } = $props(); + // [/SECTION] const dispatch = createEventDispatcher(); @@ -100,8 +103,5 @@
- diff --git a/frontend/src/components/MissingMappingModal.svelte b/frontend/src/components/MissingMappingModal.svelte index f493847..5cffe09 100644 --- a/frontend/src/components/MissingMappingModal.svelte +++ b/frontend/src/components/MissingMappingModal.svelte @@ -14,10 +14,13 @@ // [/SECTION] // [SECTION: PROPS] - export let show: boolean = false; - export let sourceDbName: string = ""; - export let sourceDbUuid: string = ""; - export let targetDatabases: Array<{uuid: string, database_name: string}> = []; + let { + show = false, + sourceDbName = "", + sourceDbUuid = "", + targetDatabases = [], + } = $props(); + // [/SECTION] let selectedTargetUuid = ""; @@ -111,8 +114,5 @@ {/if} - diff --git a/frontend/src/components/PasswordPrompt.svelte b/frontend/src/components/PasswordPrompt.svelte index a09a655..4bbb0cd 100644 --- a/frontend/src/components/PasswordPrompt.svelte +++ b/frontend/src/components/PasswordPrompt.svelte @@ -7,90 +7,134 @@ @RELATION: EMITS -> resume, cancel --> {#if show} -