mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-29 00:03:09 +00:00
nit exportable whitelabel
This commit is contained in:
@@ -256,9 +256,9 @@
|
||||
"default": "./package/components/FlowBuilder.svelte"
|
||||
},
|
||||
"./components/AppEditor.svelte": {
|
||||
"types": "./package/components/app/editor/AppEditor.svelte.d.ts",
|
||||
"svelte": "./package/components/app/editor/AppEditor.svelte",
|
||||
"default": "./package/components/app/editor/AppEditor.svelte"
|
||||
"types": "./package/components/apps/editor/AppEditor.svelte.d.ts",
|
||||
"svelte": "./package/components/apps/editor/AppEditor.svelte",
|
||||
"default": "./package/components/apps/editor/AppEditor.svelte"
|
||||
},
|
||||
"./components/ScriptBuilder.svelte": {
|
||||
"types": "./package/components/ScriptBuilder.svelte.d.ts",
|
||||
@@ -438,7 +438,7 @@
|
||||
"./package/components/FlowBuilder.svelte.d.ts"
|
||||
],
|
||||
"components/AppEditor.svelte": [
|
||||
"./package/components/app/editor/AppEditor.svelte.d.ts"
|
||||
"./package/components/apps/editor/AppEditor.svelte.d.ts"
|
||||
],
|
||||
"components/ScriptBuilder.svelte": [
|
||||
"./package/components/ScriptBuilder.svelte.d.ts"
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
import { Button } from '$lib/components/common'
|
||||
import Drawer from '$lib/components/common/drawer/Drawer.svelte'
|
||||
import DrawerContent from '$lib/components/common/drawer/DrawerContent.svelte'
|
||||
import { page } from '$app/stores'
|
||||
import { goto as gotoUrl } from '$app/navigation'
|
||||
import { sendUserToast } from '$lib/toast'
|
||||
import Tooltip from './Tooltip.svelte'
|
||||
import Version from './Version.svelte'
|
||||
@@ -50,11 +48,9 @@
|
||||
}
|
||||
|
||||
function removeHash() {
|
||||
const index = $page.url.href.lastIndexOf('#')
|
||||
if (index === -1) return
|
||||
const hashRemoved = $page.url.href.slice(0, index)
|
||||
gotoUrl(hashRemoved)
|
||||
window.location.hash = ''
|
||||
}
|
||||
|
||||
async function setPassword(): Promise<void> {
|
||||
if (newPassword) {
|
||||
await UserService.setPassword({
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
import Label from '$lib/components/Label.svelte'
|
||||
import ToggleButton from '../common/toggleButton-v2/ToggleButton.svelte'
|
||||
import ToggleButtonGroup from '../common/toggleButton-v2/ToggleButtonGroup.svelte'
|
||||
import { page } from '$app/stores'
|
||||
import { isCloudHosted } from '$lib/cloud'
|
||||
import { base } from '$lib/base'
|
||||
import S3FilePicker from '../S3FilePicker.svelte'
|
||||
@@ -163,7 +162,7 @@
|
||||
|
||||
let dirtyPath = false
|
||||
|
||||
$: fullRoute = `${$page.url.origin}${base}/api/r/${
|
||||
$: fullRoute = `${window.location.origin}${base}/api/r/${
|
||||
isCloudHosted() ? $workspaceStore + '/' : ''
|
||||
}${route_path}`
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<script lang="ts">
|
||||
import { page } from '$app/stores'
|
||||
import Tooltip from '$lib/components/Tooltip.svelte'
|
||||
import { userStore, workspaceStore } from '$lib/stores'
|
||||
import bash from 'svelte-highlight/languages/bash'
|
||||
@@ -48,7 +47,7 @@
|
||||
$: webhooks = isFlow ? computeFlowWebhooks(path) : computeScriptWebhooks(hash, path)
|
||||
|
||||
function computeScriptWebhooks(hash: string | undefined, path: string) {
|
||||
let webhookBase = `${$page.url.origin}${base}/api/w/${$workspaceStore}/jobs`
|
||||
let webhookBase = `${window.location.origin}${base}/api/w/${$workspaceStore}/jobs`
|
||||
return {
|
||||
async: {
|
||||
hash: `${webhookBase}/run/h/${hash}`,
|
||||
@@ -63,7 +62,7 @@
|
||||
}
|
||||
|
||||
function computeFlowWebhooks(path: string) {
|
||||
let webhooksBase = `${$page.url.origin}${base}/api/w/${$workspaceStore}/jobs`
|
||||
let webhooksBase = `${window.location.origin}${base}/api/w/${$workspaceStore}/jobs`
|
||||
|
||||
let urlAsync = `${webhooksBase}/run/f/${path}`
|
||||
let urlSync = `${webhooksBase}/run_wait_result/f/${path}`
|
||||
@@ -167,7 +166,7 @@ function waitForJobCompletion(UUID) {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
try {
|
||||
const endpoint = \`${
|
||||
$page.url.origin
|
||||
window.location.origin
|
||||
}/api/w/${$workspaceStore}/jobs_u/completed/get_result_maybe/\${UUID}\`;
|
||||
const checkResponse = await fetch(endpoint, {
|
||||
method: 'GET',
|
||||
@@ -209,7 +208,7 @@ ${
|
||||
webhookType === 'sync'
|
||||
? 'echo -E $RESULT | jq'
|
||||
: `
|
||||
URL="${$page.url.origin}/api/w/${$workspaceStore}/jobs_u/completed/get_result_maybe/$UUID"
|
||||
URL="${window.location.origin}/api/w/${$workspaceStore}/jobs_u/completed/get_result_maybe/$UUID"
|
||||
while true; do
|
||||
curl -s -H "Authorization: Bearer $TOKEN" $URL -o res.json
|
||||
COMPLETED=$(cat res.json | jq .completed)
|
||||
|
||||
Reference in New Issue
Block a user