small nit BASE_URL

This commit is contained in:
Ruben Fiszel
2024-07-22 19:34:33 +02:00
parent e21a814712
commit d7b5796fd8
65 changed files with 134 additions and 134 deletions
+1 -1
View File
@@ -1 +1 @@
export const base: string = import.meta.env.VITE_PATHS_BASE ?? ''
export const base: string = import.meta.env.BASE_URL
@@ -21,7 +21,7 @@
class="text-xs"
rel="noreferrer"
target="_blank"
href="{base}/run/{job}?workspace={$workspaceStore}"
href="{base}run/{job}?workspace={$workspaceStore}"
>
{job}
</a><JobLogs jobId={job} /></div
@@ -163,7 +163,7 @@
{#if resourceType == 'postgresql' && supabaseWizard}
<a
target="_blank"
href="{base}/api/oauth/connect/supabase_wizard"
href="{base}api/oauth/connect/supabase_wizard"
class="border rounded-lg flex flex-row gap-2 items-center text-xs px-3 py-1.5 h-8 bg-[#F1F3F5] hover:bg-[#E6E8EB] dark:bg-[#1C1C1C] dark:hover:bg-black"
>
<SupabaseIcon height="16px" width="16px" />
@@ -370,11 +370,11 @@
add a schedule to do daily):
<p class="mt-4"
>1. Go to the "admins" workspaces:
<img src="{base}/sync_resource_types.png" alt="sync resource types" class="mt-2" />
<img src="{base}sync_resource_types.png" alt="sync resource types" class="mt-2" />
</p>
<p class="mt-4">
2: Run the synchronization script:
<img src="{base}/sync_resource_types2.png" alt="sync resource types" class="mt-2" />
<img src="{base}sync_resource_types2.png" alt="sync resource types" class="mt-2" />
</p>
</div>
{/if}
@@ -73,7 +73,7 @@
Add {#if !$superadmin} <span class="text-2xs text-tertiary">superadmin only</span> {/if}
</Button>
<span class="text-sm text-primary"
>Configure <a href="{base}/workers" target="_blank" class="inline-flex gap-1 items-baseline"
>Configure <a href="{base}workers" target="_blank" class="inline-flex gap-1 items-baseline"
>worker groups <ExternalLink size={12} /></a
> to listen to tags</span
>
@@ -537,7 +537,7 @@
>
{:else}
<Alert type="info" title="Shareable page"
>Share this <a href="{base}/deploy/{kind}/{initialPath}">link</a> to have another properly permissioned
>Share this <a href="{base}deploy/{kind}/{initialPath}">link</a> to have another properly permissioned
user do the deployment</Alert
>
@@ -681,7 +681,7 @@
><a
download="{filename ?? 'result'}.json"
href={workspaceId && jobId
? `${base}/api/w/${workspaceId}/jobs_u/completed/get_result/${jobId}`
? `${base}api/w/${workspaceId}/jobs_u/completed/get_result/${jobId}`
: `data:text/json;charset=utf-8,${encodeURIComponent(toJsonStr(result))}`}
>
Download {filename ? '' : 'as JSON'}
@@ -745,7 +745,7 @@
<Button
download="{filename ?? 'result'}.json"
href={workspaceId && jobId
? `${base}/api/w/${workspaceId}/jobs_u/completed/get_result/${jobId}`
? `${base}api/w/${workspaceId}/jobs_u/completed/get_result/${jobId}`
: `data:text/json;charset=utf-8,${encodeURIComponent(toJsonStr(result))}`}
startIcon={{ icon: Download }}
color="light"
+1 -1
View File
@@ -478,7 +478,7 @@ $res = json_decode(curl_exec($ch));`)
variant="border"
color="blue"
size="sm"
href="{base}/resources?connect_app=undefined"
href="{base}resources?connect_app=undefined"
>
Add Resource
</Button>
@@ -280,7 +280,7 @@
<p class="text-clip grow min-w-0">
The workspace needs to be connected to Slack to use this feature. You can <a
target="_blank"
href="{base}/workspace_settings?tab=slack">configure it here</a
href="{base}workspace_settings?tab=slack">configure it here</a
>.
</p>
<Button
@@ -311,7 +311,7 @@
Message sent via Windmill job
<a
target="_blank"
href={`${base}/run/${slackConnectionTestJob.uuid}?workspace=${$workspaceStore}`}
href={`${base}run/${slackConnectionTestJob.uuid}?workspace=${$workspaceStore}`}
>
{slackConnectionTestJob.uuid}
</a>
@@ -53,7 +53,7 @@
<BarsStaggered size={SMALL_ICON_SIZE} class="text-secondary min-w-3.5" />
<span class="whitespace-nowrap">
Step of flow
<a href={`${base}/run/${job.parent_job}?workspace=${$workspaceStore}`}>
<a href={`${base}run/${job.parent_job}?workspace=${$workspaceStore}`}>
{job.parent_job}
</a>
</span>
@@ -63,7 +63,7 @@
<Bot size={SMALL_ICON_SIZE} class="text-secondary min-w-3.5" />
<span class="whitespace-nowrap">
Triggered by parent
<a href={`${base}/run/${job.parent_job}?workspace=${$workspaceStore}`}>
<a href={`${base}run/${job.parent_job}?workspace=${$workspaceStore}`}>
{job.parent_job}</a
>
</span>
@@ -120,6 +120,6 @@
</div>
<div class="text-secondary text-2xs pt-2 whitespace-nowrap">
run id:
<a href={`${base}/run/${job.id}?workspace=${job.workspace_id}`}> {job.id} </a>
<a href={`${base}run/${job.id}?workspace=${job.workspace_id}`}> {job.id} </a>
</div>
</div>
@@ -1029,7 +1029,7 @@
class="text-right text-xs"
rel="noreferrer"
target="_blank"
href="{base}/run/{node.job_id ?? ''}?workspace={job?.workspace_id}"
href="{base}run/{node.job_id ?? ''}?workspace={job?.workspace_id}"
>
{truncateRev(node.job_id ?? '', 10)}
</a>
@@ -81,7 +81,7 @@
<iframe
title="App connection"
class="w-full h-full"
src="{base}/embed_connect?resource_type={resourceType}&workspace={appViewerContext?.workspace ??
src="{base}embed_connect?resource_type={resourceType}&workspace={appViewerContext?.workspace ??
$workspaceStore}"
/>
</DrawerContent>
+2 -2
View File
@@ -149,7 +149,7 @@
<DrawerContent title="Expanded Logs" on:close={logViewer.closeDrawer}>
<svelte:fragment slot="actions">
<Button
href="{base}/api/w/{$workspaceStore}/jobs_u/get_logs/{jobId}"
href="{base}api/w/{$workspaceStore}/jobs_u/get_logs/{jobId}"
download="windmill_logs_{jobId}.txt"
color="light"
size="xs"
@@ -198,7 +198,7 @@
<a
class="text-primary pb-0.5"
target="_blank"
href="{base}/api/w/{$workspaceStore}/jobs_u/get_logs/{jobId}"
href="{base}api/w/{$workspaceStore}/jobs_u/get_logs/{jobId}"
download="windmill_logs_{jobId}.txt"
><Download size="14" />
</a>
@@ -177,7 +177,7 @@
{#if !disable_download && !s3resource.endsWith('.csv')}
<a
target="_blank"
href="{base}/api/w/{workspaceId}/job_helpers/download_s3_parquet_file_as_csv?file_key={s3resource}{storage
href="{base}api/w/{workspaceId}/job_helpers/download_s3_parquet_file_as_csv?file_key={s3resource}{storage
? `&storage=${storage}`
: ''}"
class="text-secondary w-full text-right underline text-2xs whitespace-nowrap"
@@ -139,14 +139,14 @@
<td class="text-xs">
<a
class="pr-3"
href="{base}/scripts/get/{scriptHash}?workspace={$workspaceStore}"
href="{base}scripts/get/{scriptHash}?workspace={$workspaceStore}"
target="_blank"
>
{scriptHash}
</a>
</td>
<td class="text-xs">
<a class="pr-3" href="{base}/run/{jobId}?workspace={$workspaceStore}" target="_blank"
<a class="pr-3" href="{base}run/{jobId}?workspace={$workspaceStore}" target="_blank"
>{jobId.substring(24)}</a
>
</td>
@@ -130,7 +130,7 @@
}}
size="xs"
/>
<Button size="xs" variant="border" color="light" href={`${base}/runs/${path}`}>
<Button size="xs" variant="border" color="light" href={`${base}runs/${path}`}>
<div class="flex flex-row gap-2">
<ListOrdered size={14} />
Runs
@@ -428,7 +428,7 @@
<p class="text-clip grow min-w-0">
The workspace needs to be connected to an S3 storage to use this feature. You can <a
target="_blank"
href="{base}/workspace_settings?tab=windmill_lfs">configure it here</a
href="{base}workspace_settings?tab=windmill_lfs">configure it here</a
>.
</p>
<Button
@@ -568,7 +568,7 @@
title="Download file from S3"
variant="border"
color="light"
href={`${base}/api/w/${$workspaceStore}/job_helpers/download_s3_file?file_key=${
href={`${base}api/w/${$workspaceStore}/job_helpers/download_s3_file?file_key=${
fileMetadata?.fileKey
}${storage ? `&storage=${storage}` : ''}`}
download={fileMetadata?.fileKey.split('/').pop() ?? 'unnamed_download.file'}
@@ -368,7 +368,7 @@
<div class="col-span-2">
<a
target="_blank"
href="{base}/run/{i.id}?workspace={$workspaceStore}"
href="{base}run/{i.id}?workspace={$workspaceStore}"
class="text-right float-right text-secondary"
title="See run detail in a new tab"
>
@@ -429,7 +429,7 @@
<div class="col-span-1">
<a
target="_blank"
href="{base}/run/{i.id}?workspace={$workspaceStore}"
href="{base}run/{i.id}?workspace={$workspaceStore}"
class="text-right float-right text-secondary"
title="See run detail in a new tab"
>
@@ -418,7 +418,7 @@
variant="border"
startIcon={{ icon: List }}
disabled={!allowSchedule || pathError != '' || emptyString(script_path)}
href={`${base}/runs/${script_path}?show_schedules=true&show_future_jobs=true`}
href={`${base}runs/${script_path}?show_schedules=true&show_future_jobs=true`}
>
View runs
</Button>
@@ -133,7 +133,7 @@
color="light"
size="xs"
variant="border"
href="{base}/flows/edit/{scriptPath}">Edit</Button
href="{base}flows/edit/{scriptPath}">Edit</Button
>
<Button
color="light"
@@ -153,7 +153,7 @@
target="_blank"
color="light"
size="xs"
href="{base}/apps/edit/{scriptPath}"
href="{base}apps/edit/{scriptPath}"
variant="border"
>
Edit
@@ -164,7 +164,7 @@
variant="border"
target="_blank"
startIcon={{ icon: Code }}
href="{base}/apps/get/{scriptPath}"
href="{base}apps/get/{scriptPath}"
>
View
</Button>
@@ -176,7 +176,7 @@
target="_blank"
color="light"
size="xs"
href="{base}/scripts/edit/{scriptPath}"
href="{base}scripts/edit/{scriptPath}"
variant="border"
>
Edit
@@ -97,7 +97,7 @@
variant="border"
color="dark"
target="_blank"
href="{base}/?workspace=admins"
href="{base}?workspace=admins"
endIcon={{ icon: ExternalLink }}
>
Admins workspace
@@ -32,7 +32,7 @@
: 'rounded-sm'} center-center text-white text-2xs whitespace-nowrap hover:outline outline-1 outline-black"
>
<svelte:fragment slot="text"
><a href="{base}/run/{id}" class="inline-flex items-center gap-1" target="_blank"
><a href="{base}run/{id}" class="inline-flex items-center gap-1" target="_blank"
>{id} <ExternalLink size={14} /></a
></svelte:fragment
>
@@ -70,7 +70,7 @@
{#each Object.entries(flow_status) as [k, v] (k)}
<div class="overflow-auto max-h-60 shadow-inner dark:shadow-gray-700 relative">
<div class="px-2 py-2 text-xs grid grid-cols-6 w-full gap-1">
<a target="_blank" class="inline-flex gap-2 items-baseline" href="{base}/run/{k}"
<a target="_blank" class="inline-flex gap-2 items-baseline" href="{base}run/{k}"
>{v.name ?? k} <ExternalLink size={12} /></a
>
<div class="col-span-5 flex min-h-6 w-full">
@@ -616,7 +616,7 @@ export async function main(app_path: string, startup_duration = 5, kind: 'pdf' |
<p class="text-clip grow min-w-0">
The workspace needs to be connected to Slack to use this feature. You can <a
target="_blank"
href="{base}/workspace_settings?tab=slack">configure it here</a
href="{base}workspace_settings?tab=slack">configure it here</a
>.
</p>
<Button
@@ -155,7 +155,7 @@
startIcon={{ icon: Pen }}
endIcon={{ icon: ExternalLink }}
target="_blank"
href="{base}/flows/edit/{runnable.path}?nodraft=true">Edit</Button
href="{base}flows/edit/{runnable.path}?nodraft=true">Edit</Button
>
<Button
variant="border"
@@ -164,7 +164,7 @@
startIcon={{ icon: Eye }}
endIcon={{ icon: ExternalLink }}
target="_blank"
href="{base}/flows/get/{runnable.path}?workspace={$workspaceStore}"
href="{base}flows/get/{runnable.path}?workspace={$workspaceStore}"
>
Details
</Button>
@@ -11,7 +11,7 @@
border border-dashed border-gray-400 hover:border-blue-500
focus-within:border-blue-500 hover:bg-blue-50 dark:hover:bg-frost-900 focus-within:bg-blue-50
duration-200 rounded-lg p-1 gap-2"
href={`${base}/api/w/${$workspaceStore}/job_helpers/download_s3_file?file_key=${s3object?.s3}${
href={`${base}api/w/${$workspaceStore}/job_helpers/download_s3_file?file_key=${s3object?.s3}${
s3object?.storage ? `&storage=${s3object.storage}` : ''
}`}
download={s3object?.s3.split('/').pop() ?? 'unnamed_download.file'}
@@ -58,7 +58,7 @@
{/if}
<Row
href={`${base}/apps/get/${app.path}`}
href={`${base}apps/get/${app.path}`}
kind="app"
{marked}
path={app.path}
@@ -92,7 +92,7 @@
size="xs"
variant="border"
startIcon={{ icon: Pen }}
href="{base}/apps/edit/{app.path}?nodraft=true"
href="{base}apps/edit/{app.path}?nodraft=true"
>
Edit
</Button>
@@ -104,7 +104,7 @@
size="xs"
variant="border"
startIcon={{ icon: GitFork }}
href="{base}/apps/add?template={app.path}"
href="{base}apps/add?template={app.path}"
>
Fork
</Button>
@@ -151,7 +151,7 @@
{
displayName: 'Duplicate/Fork',
icon: GitFork,
href: `${base}/apps/add?template=${path}`,
href: `${base}apps/add?template=${path}`,
hide: $userStore?.operator
},
{
@@ -79,8 +79,8 @@
<Row
href={flow.draft_only
? `${base}/flows/edit/${flow.path}?nodraft=true`
: `${base}/flows/get/${flow.path}?workspace=${$workspaceStore}`}
? `${base}flows/edit/${flow.path}?nodraft=true`
: `${base}flows/get/${flow.path}?workspace=${$workspaceStore}`}
kind="flow"
workspaceId={flow.workspace_id ?? $workspaceStore ?? ''}
{marked}
@@ -110,7 +110,7 @@
size="xs"
variant="border"
startIcon={{ icon: Pen }}
href="{base}/flows/edit/{flow.path}?nodraft=true"
href="{base}flows/edit/{flow.path}?nodraft=true"
>
Edit
</Button>
@@ -122,7 +122,7 @@
size="xs"
variant="border"
startIcon={{ icon: GitFork }}
href="{base}/flows/add?template={flow.path}"
href="{base}flows/add?template={flow.path}"
>
Fork
</Button>
@@ -160,18 +160,18 @@
{
displayName: 'Duplicate/Fork',
icon: GitFork,
href: `${base}/flows/add?template=${path}`,
href: `${base}flows/add?template=${path}`,
hide: $userStore?.operator
},
{
displayName: 'View runs',
icon: List,
href: `${base}/runs/${path}`
href: `${base}runs/${path}`
},
{
displayName: 'Audit logs',
icon: Eye,
href: `${base}/audit_logs?resource=${path}`,
href: `${base}audit_logs?resource=${path}`,
hide: $userStore?.operator
},
{
@@ -53,7 +53,7 @@
</Drawer>
{/if}
<Row
href="{base}/apps/get_raw/{app.version}/{app.path}"
href="{base}apps/get_raw/{app.version}/{app.path}"
kind="raw_app"
{marked}
path={app.path}
@@ -89,8 +89,8 @@
<Row
href={script.draft_only
? `${base}/scripts/edit/${script.path}`
: `${base}/scripts/get/${script.hash}?workspace=${$workspaceStore}`}
? `${base}scripts/edit/${script.path}`
: `${base}scripts/get/${script.hash}?workspace=${$workspaceStore}`}
kind="script"
{marked}
path={script.path}
@@ -137,7 +137,7 @@
size="xs"
variant="border"
startIcon={{ icon: Pen }}
href="{base}/scripts/edit/{script.path}"
href="{base}scripts/edit/{script.path}"
>
Edit
</Button>
@@ -149,7 +149,7 @@
size="xs"
variant="border"
startIcon={{ icon: GitFork }}
href="{base}/scripts/add?template={script.path}"
href="{base}scripts/add?template={script.path}"
>
Fork
</Button>
@@ -199,7 +199,7 @@
{
displayName: 'Duplicate/Fork',
icon: GitFork,
href: `${base}/scripts/add?template=${script.path}`,
href: `${base}scripts/add?template=${script.path}`,
hide: $userStore?.operator
},
{
@@ -223,7 +223,7 @@
{
displayName: 'View runs',
icon: List,
href: `${base}/runs/${script.path}`
href: `${base}runs/${script.path}`
},
{
displayName: 'Versions',
@@ -235,7 +235,7 @@
{
displayName: 'Audit logs',
icon: Eye,
href: `${base}/audit_logs?resource=${script.path}`,
href: `${base}audit_logs?resource=${script.path}`,
hide: $userStore?.operator
},
{
@@ -104,7 +104,7 @@
<div class="block text-primary">
<p class="text-sm"
>Enable Windmill AI in the <a
href="{base}/workspace_settings?tab=openai"
href="{base}workspace_settings?tab=openai"
target="_blank"
class="inline-flex flex-row items-center gap-1"
>workspace settings <ExternalLink size={16} /></a
@@ -137,7 +137,7 @@
<div class="block text-primary">
<p class="text-sm"
>Enable Windmill AI in the <a
href="{base}/workspace_settings?tab=openai"
href="{base}workspace_settings?tab=openai"
target="_blank"
class="inline-flex flex-row items-center gap-1"
>workspace settings <ExternalLink size={16} /></a
@@ -167,7 +167,7 @@
{:else}
<p class="text-sm">
Enable Windmill AI in the <a
href="{base}/workspace_settings?tab=openai"
href="{base}workspace_settings?tab=openai"
target="_blank"
class="inline-flex flex-row items-center gap-1"
>
@@ -211,7 +211,7 @@
<p class="text-sm"
>Enable Windmill AI in the <a
class="inline-flex flex-row items-center gap-1"
href="{base}/workspace_settings?tab=openai"
href="{base}workspace_settings?tab=openai"
target="_blank">workspace settings</a
></p
></div
@@ -487,7 +487,7 @@
{:else}
<p class="text-sm">
Enable Windmill AI in the <a
href="{base}/workspace_settings?tab=openai"
href="{base}workspace_settings?tab=openai"
target="_blank"
class="inline-flex flex-row items-center gap-1"
>
@@ -239,7 +239,7 @@ input_name2: expression2
{#if !$copilotInfo.exists_openai_resource_path}
Enable Windmill AI in the{' '}
<a
href="{base}/workspace_settings?tab=openai"
href="{base}workspace_settings?tab=openai"
target="_blank"
class="inline-flex flex-row items-center gap-1"
>
@@ -50,7 +50,7 @@
size="sm"
spacingSize="xl"
startIcon={{ icon: Plus }}
href="{base}/apps/add?nodraft=true"
href="{base}apps/add?nodraft=true"
color="marine"
dropdownItems={[
{
@@ -29,7 +29,7 @@
spacingSize="xl"
startIcon={{ icon: Plus }}
endIcon={{ icon: BarsStaggered }}
href="{base}/flows/add?nodraft=true"
href="{base}flows/add?nodraft=true"
color="marine"
dropdownItems={[
{
@@ -199,11 +199,11 @@
>
</li>
<li>
2. <a href="{base}/apps/add?nodraft=true" target="_blank"> App Editor</a> for
2. <a href="{base}apps/add?nodraft=true" target="_blank"> App Editor</a> for
customized-UIs
</li>
<li>
3. <a href="{base}/schedules" target="_blank">Scheduling</a>
3. <a href="{base}schedules" target="_blank">Scheduling</a>
</li>
<li>
4. <a href="https://www.windmill.dev/docs/advanced/cli" target="_blank"
@@ -273,7 +273,7 @@
<img
class="shadow-lg border rounded"
alt="static button"
src="{base}/trigger_button.png"
src="{base}trigger_button.png"
/>
</li></ul
>
@@ -184,7 +184,7 @@
<p class="text-sm w-80">
Enable Windmill AI in the
<a
href="{base}/workspace_settings?tab=openai"
href="{base}workspace_settings?tab=openai"
target="_blank"
class="inline-flex flex-row items-center gap-1"
on:click={() => {
@@ -15,7 +15,7 @@
<a
rel="noreferrer"
target="_blank"
href="{base}/run/{job?.id}?workspace={job?.workspace_id}"
href="{base}run/{job?.id}?workspace={job?.workspace_id}"
>
{job?.id}
</a>
@@ -123,7 +123,7 @@
{/if}
</div>
<a
href="{base}/run/{job?.id}?workspace={job?.workspace_id}"
href="{base}run/{job?.id}?workspace={job?.workspace_id}"
class="flex flex-row gap-1 items-center"
target={blankLink ? '_blank' : undefined}
>
@@ -145,7 +145,7 @@
<span class="w-30 justify-center">-</span>
{:else}
<a
href="{base}/run/{job.id}?workspace={job.workspace_id}"
href="{base}run/{job.id}?workspace={job.workspace_id}"
class="truncate w-30 dark:text-blue-400"
>
{job.script_path}
@@ -176,13 +176,13 @@
{/if}
</div>
{:else if 'job_kind' in job && job.job_kind == 'preview'}
<a href="{base}/run/{job.id}?workspace={job.workspace_id}">Preview without path </a>
<a href="{base}run/{job.id}?workspace={job.workspace_id}">Preview without path </a>
{:else if 'job_kind' in job && job.job_kind == 'dependencies'}
<a href="{base}/run/{job.id}?workspace={job.workspace_id}">
<a href="{base}run/{job.id}?workspace={job.workspace_id}">
lock deps of {truncateHash(job.script_hash ?? '')}
</a>
{:else if 'job_kind' in job && job.job_kind == 'identity'}
<a href="{base}/run/{job.id}?workspace={job.workspace_id}">no op</a>
<a href="{base}run/{job.id}?workspace={job.workspace_id}">no op</a>
{/if}
</div>
</div>
@@ -194,7 +194,7 @@
<div class="flex flex-row gap-1 items-center">
<BarsStaggered class="text-secondary" size={14} />
<span class="mx-1 text-xs">
Step of flow <a href={`${base}/run/${job.parent_job}?workspace=${job.workspace_id}`}>
Step of flow <a href={`${base}run/${job.parent_job}?workspace=${job.workspace_id}`}>
{truncateRev(job.parent_job, 6)}
</a>
</span>
@@ -202,7 +202,7 @@
{:else}
<div class="flex flex-row gap-1 items-center">
<span class="text-2xs text-tertiary truncate">
parent <a href={`${base}/run/${job.parent_job}?workspace=${job.workspace_id}`}>
parent <a href={`${base}run/${job.parent_job}?workspace=${job.workspace_id}`}>
{truncateRev(job.parent_job, 10)}
</a>
</span>
@@ -178,7 +178,7 @@
<Cell first>
<a
class="pr-3"
href="{base}/run/{id}?workspace={workspace ?? $workspaceStore}"
href="{base}run/{id}?workspace={workspace ?? $workspaceStore}"
target="_blank">{id.substring(30)}</a
>
</Cell>
@@ -11,7 +11,7 @@
spacingSize="xl"
color="marine"
startIcon={{ icon: Plus }}
href="{base}/scripts/add"
href="{base}scripts/add"
>
Script <Code2 class="ml-1.5" size={18} />
</Button>
@@ -111,7 +111,7 @@
<Button
endIcon={{ icon: ExternalLink }}
color="dark"
href="{base}/api/w/{$workspaceStore}/workspaces/billing_portal">Customer Portal</Button
href="{base}api/w/{$workspaceStore}/workspaces/billing_portal">Customer Portal</Button
>
<p class="text-xs text-tertiary mt-1">
See invoices, change billing information or subscription details.
@@ -301,7 +301,7 @@
<Button
size="xs"
color="bg-blue-500 text-white"
href="{base}/api/w/{$workspaceStore}/workspaces/checkout?plan=team"
href="{base}api/w/{$workspaceStore}/workspaces/checkout?plan=team"
>
Upgrade to Team plan</Button
>
@@ -37,9 +37,9 @@
}[]
const mainMenuLinks = [
{ label: 'Home', href: `${base}/`, icon: Home },
{ label: 'Runs', href: `${base}/runs`, icon: Play },
{ label: 'Schedules', href: `${base}/schedules`, icon: Calendar }
{ label: 'Home', href: `${base}`, icon: Home },
{ label: 'Runs', href: `${base}runs`, icon: Play },
{ label: 'Schedules', href: `${base}schedules`, icon: Calendar }
]
</script>
@@ -113,7 +113,7 @@
Switch theme
</button>
<a
href="{base}/user/workspaces"
href="{base}user/workspaces"
on:click={() => {
localStorage.removeItem('workspace')
}}
@@ -37,18 +37,18 @@
import { type Changelog, changelogs } from './changelogs'
$: mainMenuLinks = [
{ label: 'Home', href: `${base}/`, icon: Home },
{ label: 'Runs', href: `${base}/runs`, icon: Play },
{ label: 'Home', href: `${base}`, icon: Home },
{ label: 'Runs', href: `${base}runs`, icon: Play },
{
label: 'Variables',
href: `${base}/variables`,
href: `${base}variables`,
icon: DollarSign,
disabled: $userStore?.operator
},
{ label: 'Resources', href: `${base}/resources`, icon: Boxes, disabled: $userStore?.operator },
{ label: 'Resources', href: `${base}resources`, icon: Boxes, disabled: $userStore?.operator },
{
label: 'Schedules',
href: `${base}/schedules`,
href: `${base}schedules`,
icon: Calendar,
disabled: !SIDEBAR_SHOW_SCHEDULES || $userStore?.operator
}
@@ -82,7 +82,7 @@
? [
{
label: 'Workspace',
href: `${base}/workspace_settings`,
href: `${base}workspace_settings`,
icon: FolderCog,
faIcon: undefined
}
@@ -114,21 +114,21 @@
],
disabled: $userStore?.operator
},
{ label: 'Workers', href: `${base}/workers`, icon: Bot, disabled: $userStore?.operator },
{ label: 'Workers', href: `${base}workers`, icon: Bot, disabled: $userStore?.operator },
{
label: 'Folders & Groups',
icon: FolderOpen,
subItems: [
{
label: 'Folders',
href: `${base}/folders`,
href: `${base}folders`,
icon: FolderOpen,
disabled: $userStore?.operator,
faIcon: undefined
},
{
label: 'Groups',
href: `${base}/groups`,
href: `${base}groups`,
icon: UserCog,
disabled: $userStore?.operator,
faIcon: undefined
@@ -136,7 +136,7 @@
],
disabled: $userStore?.operator
},
{ label: 'Audit Logs', href: `${base}/audit_logs`, icon: Eye, disabled: $userStore?.operator }
{ label: 'Audit Logs', href: `${base}audit_logs`, icon: Eye, disabled: $userStore?.operator }
]
let hasNewChangelogs = false
@@ -74,7 +74,7 @@
</div>
<div class="py-1" role="none">
<a
href="{base}/user/create_workspace"
href="{base}user/create_workspace"
class="text-primary px-4 py-2 text-xs hover:bg-surface-hover hover:text-primary flex flex-flow gap-2"
role="menuitem"
tabindex="-1"
@@ -85,7 +85,7 @@
</div>
<div class="py-1" role="none">
<a
href="{base}/user/workspaces"
href="{base}user/workspaces"
on:click={() => {
localStorage.removeItem('workspace')
}}
@@ -100,7 +100,7 @@
<div class="py-1" role="none">
<MenuItem>
<a
href="{base}/workspace_settings"
href="{base}workspace_settings"
class="text-secondary px-4 py-2 text-xs hover:bg-surface-hover hover:text-primary flex flex-flow gap-2"
role="menuitem"
tabindex="-1"
+1 -1
View File
@@ -88,7 +88,7 @@ export function scriptPathToHref(path: string, hubBaseUrl: string): string {
if (path.startsWith('hub/')) {
return hubBaseUrl + '/from_version/' + path.substring(4)
} else {
return `${base}/scripts/get/${path}?workspace=${get(workspaceStore)}`
return `${base}scripts/get/${path}?workspace=${get(workspaceStore)}`
}
}
@@ -160,22 +160,22 @@
favoriteLinks = [
...scripts.map((s) => ({
label: s.summary || s.path,
href: `${base}/scripts/get/${s.hash}`,
href: `${base}scripts/get/${s.hash}`,
kind: 'script' as 'script'
})),
...flows.map((f) => ({
label: f.summary || f.path,
href: `${base}/flows/get/${f.path}`,
href: `${base}flows/get/${f.path}`,
kind: 'flow' as 'flow'
})),
...apps.map((f) => ({
label: f.summary || f.path,
href: `${base}/apps/get/${f.path}`,
href: `${base}apps/get/${f.path}`,
kind: 'app' as 'app'
})),
...raw_apps.map((f) => ({
label: f.summary || f.path,
href: `${base}/apps/get_raw/${f.version}/${f.path}`,
href: `${base}apps/get_raw/${f.version}/${f.path}`,
kind: 'raw_app' as 'raw_app'
}))
]
@@ -98,7 +98,7 @@
</div>
</Button>
<Button
href="{base}/scripts/add?hub={encodeURIComponent(codeViewerObj?.path ?? '')}"
href="{base}scripts/add?hub={encodeURIComponent(codeViewerObj?.path ?? '')}"
startIcon={{ icon: GitFork }}
color="dark"
size="xs"
@@ -135,7 +135,7 @@
</Button>
<Button
href="{base}/flows/add?hub={flowViewerFlow?.flow?.id}"
href="{base}flows/add?hub={flowViewerFlow?.flow?.id}"
startIcon={{ icon: GitFork }}
color="dark"
size="xs"
@@ -173,7 +173,7 @@
</Button>
<Button
href="{base}/apps/add?hub={appViewerApp?.app?.id}"
href="{base}apps/add?hub={appViewerApp?.app?.id}"
startIcon={{ icon: GitFork }}
color="dark"
disabled={appViewerApp == undefined}
@@ -71,7 +71,7 @@
size="sm"
startIcon={{ icon: Pen }}
variant="border"
href="{base}/apps/edit/{app.path}?nodraft=true">Edit</Button
href="{base}apps/edit/{app.path}?nodraft=true">Edit</Button
>
</div>
{/if}
@@ -86,7 +86,7 @@
<tr>
<td>
<a
href={`${base}/runs/?job_kinds=all&graph=ConcurrencyChart&concurrency_key=${concurrency_key}`}
href={`${base}runs/?job_kinds=all&graph=ConcurrencyChart&concurrency_key=${concurrency_key}`}
>{concurrency_key}
</a>
</td>
@@ -147,7 +147,7 @@
buttons.push({
label: 'Fork',
buttonProps: {
href: `${base}/flows/add?template=${flow.path}`,
href: `${base}flows/add?template=${flow.path}`,
color: 'light',
size: 'xs',
startIcon: GitFork
@@ -162,7 +162,7 @@
buttons.push({
label: `View runs`,
buttonProps: {
href: `${base}/runs/${flow.path}`,
href: `${base}runs/${flow.path}`,
size: 'xs',
color: 'light',
startIcon: History
@@ -192,7 +192,7 @@
buttons.push({
label: 'Edit',
buttonProps: {
href: `${base}/flows/edit/${path}?nodraft=true`,
href: `${base}flows/edit/${path}?nodraft=true`,
variant: 'contained',
size: 'xs',
color: 'dark',
@@ -351,7 +351,7 @@
</div>
{/each}
<div>
<Button href="{base}/runs">Go to runs page</Button>
<Button href="{base}runs">Go to runs page</Button>
</div>
</div>
</div>
@@ -627,7 +627,7 @@
{job.script_path ?? (job.job_kind == 'dependencies' ? 'lock dependencies' : 'No path')}
<div class="flex flex-row gap-2 items-center flex-wrap">
{#if job.script_hash}
<a href="{base}/scripts/get/{job.script_hash}?workspace={$workspaceStore}"
<a href="{base}scripts/get/{job.script_hash}?workspace={$workspaceStore}"
><Badge color="gray">{truncateHash(job.script_hash)}</Badge></a
>
{/if}
@@ -673,13 +673,13 @@
<svelte:fragment slot="text">
This job has concurrency limits enabled with the key
<a
href={`${base}/runs/?job_kinds=all&graph=ConcurrencyChart&concurrency_key=${concurrencyKey}`}
href={`${base}runs/?job_kinds=all&graph=ConcurrencyChart&concurrency_key=${concurrencyKey}`}
>
{concurrencyKey}
</a>
</svelte:fragment>
<a
href={`${base}/runs/?job_kinds=all&graph=ConcurrencyChart&concurrency_key=${concurrencyKey}`}
href={`${base}runs/?job_kinds=all&graph=ConcurrencyChart&concurrency_key=${concurrencyKey}`}
>
<Badge>Concurrency: {truncateRev(concurrencyKey, 20)}</Badge></a
>
@@ -373,7 +373,7 @@
/>
<div class="flex gap-2 items-center justify-end">
<Button
href={`${base}/runs/?schedule_path=${path}`}
href={`${base}runs/?schedule_path=${path}`}
size="xs"
startIcon={{ icon: List }}
color="light"
@@ -431,7 +431,7 @@
{
displayName: 'Audit logs',
icon: Eye,
href: `${base}/audit_logs?resource=${path}`
href: `${base}audit_logs?resource=${path}`
},
{
displayName: 'Run now',
@@ -464,7 +464,7 @@
{/if}
{#each jobs ?? [] as job}
{@const h = (avg_s ? job.duration_ms / avg_s : 1) * 7 + 3}
<a href="{base}/run/{job.id}?workspace={$workspaceStore}">
<a href="{base}run/{job.id}?workspace={$workspaceStore}">
<JobPreview id={job.id}>
<div>
<div
@@ -225,7 +225,7 @@
buttons.push({
label: 'Fork',
buttonProps: {
href: `${base}/scripts/add?template=${script.path}`,
href: `${base}scripts/add?template=${script.path}`,
size: 'xs',
color: 'light',
startIcon: GitFork
@@ -240,7 +240,7 @@
buttons.push({
label: `View runs`,
buttonProps: {
href: `${base}/runs/${script.path}`,
href: `${base}runs/${script.path}`,
size: 'xs',
color: 'light',
startIcon: Play
@@ -301,7 +301,7 @@
buttons.push({
label: 'Edit',
buttonProps: {
href: `${base}/scripts/edit/${script.path}?${
href: `${base}scripts/edit/${script.path}?${
topHash ? `&hash=${script.hash}&topHash=` + topHash : ''
}`,
size: 'xs',
@@ -544,7 +544,7 @@
<div class="mt-2" />
<Alert type="warning" title="Not HEAD">
This hash is not HEAD (latest non-archived version at this path) :
<a href="{base}/scripts/get/{topHash}?workspace={$workspaceStore}"
<a href="{base}scripts/get/{topHash}?workspace={$workspaceStore}"
>Go to the HEAD of this path</a
>
</Alert>
@@ -80,7 +80,7 @@
</label>
{/if}
<div class="flex flex-row justify-between pt-4 gap-x-1">
<Button variant="border" size="sm" href="{base}/user/workspaces"
<Button variant="border" size="sm" href="{base}user/workspaces"
>&leftarrow; Back to workspaces</Button
>
<button
@@ -246,7 +246,7 @@
</ToggleButtonGroup>
</div>
<div class="flex flex-wrap flex-row justify-between pt-10 gap-1">
<Button variant="border" size="sm" href="{base}/user/workspaces"
<Button variant="border" size="sm" href="{base}user/workspaces"
>&leftarrow; Back to workspaces</Button
>
<Button
@@ -225,7 +225,7 @@
size="sm"
btnClasses={noWorkspaces ? 'animate-bounce hover:animate-none' : ''}
color={noWorkspaces ? 'dark' : 'blue'}
href="{base}/user/create_workspace{rd ? `?rd=${encodeURIComponent(rd)}` : ''}"
href="{base}user/create_workspace{rd ? `?rd=${encodeURIComponent(rd)}` : ''}"
variant={noWorkspaces ? 'contained' : 'border'}
>+&nbsp;Create a new workspace
</Button>
@@ -252,7 +252,7 @@
<div class="flex justify-end items-center flex-col sm:flex-row gap-1">
<a
class="font-bold p-1"
href="{base}/user/accept_invite?workspace={encodeURIComponent(invite.workspace_id)}{rd
href="{base}user/accept_invite?workspace={encodeURIComponent(invite.workspace_id)}{rd
? `&rd=${encodeURIComponent(rd)}`
: ''}"
>
@@ -27,7 +27,7 @@
Token will be posted to your local machine to port {port}
</p>
<div class="flex flex-row justify-around pt-4 gap-x-1">
<Button variant="border" color="dark" size="sm" href="{base}/">Decline</Button>
<Button variant="border" color="dark" size="sm" href={base}>Decline</Button>
<Button variant="contained" color="blue" size="sm" on:click={authorizeToken}>Authorize</Button>
</div>
</CenteredModal>
@@ -732,11 +732,11 @@
<Button
size="sm"
endIcon={{ icon: Code2 }}
href="{base}/scripts/add?hub=hub%2F314%2Fslack%2Fexample_of_responding_to_a_slack_command_slack"
href="{base}scripts/add?hub=hub%2F314%2Fslack%2Fexample_of_responding_to_a_slack_command_slack"
>
Create a script to handle slack commands
</Button>
<Button size="sm" endIcon={{ icon: BarsStaggered }} href="{base}/flows/add?hub=28">
<Button size="sm" endIcon={{ icon: BarsStaggered }} href="{base}flows/add?hub=28">
Create a flow to handle slack commands
</Button>
</div>
@@ -745,7 +745,7 @@
<Button
size="xs"
color="dark"
href="{base}/api/oauth/connect_slack"
href="{base}api/oauth/connect_slack"
startIcon={{ icon: Slack }}
>
Connect to Slack
@@ -813,7 +813,7 @@
<div class="flex justify-start">
<Button
size="sm"
href="{base}/api/w/{$workspaceStore ?? ''}/workspaces/tarball?archive_type=zip"
href="{base}api/w/{$workspaceStore ?? ''}/workspaces/tarball?archive_type=zip"
target="_blank"
>
Export workspace as zip file
@@ -279,7 +279,7 @@
{/if}
<div class="mt-4 flex flex-row flex-wrap justify-between">
<a target="_blank" rel="noreferrer" href="{base}/run/{job?.id}?workspace={job?.workspace_id}"
<a target="_blank" rel="noreferrer" href="{base}run/{job?.id}?workspace={job?.workspace_id}"
>Flow run details (require auth)</a
>
</div>
@@ -86,7 +86,7 @@
{#if notExists}
<div class="px-4 mt-20"
><Alert type="error" title="Not found"
>There was an error loading the app, is the url correct? <a href="{base}/">Go to Windmill</a>
>There was an error loading the app, is the url correct? <a href={base}>Go to Windmill</a>
</Alert></div
>
{:else if noPermission}