mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-07 16:03:21 +00:00
fix test connection
This commit is contained in:
@@ -68,7 +68,7 @@
|
||||
right: 'As JSON'
|
||||
}}
|
||||
/>
|
||||
<TestConnection {resource_type} />
|
||||
<TestConnection {resource_type} {args} />
|
||||
</div>
|
||||
{:else}
|
||||
<p class="italic text-gray-500 text-xs mb-4"
|
||||
|
||||
@@ -12,11 +12,7 @@
|
||||
let loading = false
|
||||
async function testConnection() {
|
||||
loading = true
|
||||
const job = await JobService.runScriptPreview({
|
||||
workspace: $workspaceStore!,
|
||||
requestBody: {
|
||||
language: 'deno' as Preview.language,
|
||||
content: `
|
||||
const content = `
|
||||
import { Client } from 'https://deno.land/x/postgres/mod.ts'
|
||||
export async function main(args: any) {
|
||||
const u = new URL("postgres://")
|
||||
@@ -30,7 +26,12 @@ export async function main(args: any) {
|
||||
await client.connect()
|
||||
return 'Connection successful'
|
||||
}
|
||||
`,
|
||||
`
|
||||
const job = await JobService.runScriptPreview({
|
||||
workspace: $workspaceStore!,
|
||||
requestBody: {
|
||||
language: 'deno' as Preview.language,
|
||||
content,
|
||||
args: {
|
||||
args
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user