mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-26 00:01:37 +00:00
http routes static assets nits (#4676)
This commit is contained in:
@@ -283,7 +283,9 @@
|
||||
<ToggleButtonGroup
|
||||
class="w-auto"
|
||||
bind:selected={http_method}
|
||||
disabled={!($userStore?.is_admin || $userStore?.is_super_admin) || !can_write}
|
||||
disabled={!($userStore?.is_admin || $userStore?.is_super_admin) ||
|
||||
!can_write ||
|
||||
!!static_asset_config}
|
||||
>
|
||||
<ToggleButton label="GET" value="get" />
|
||||
<ToggleButton label="POST" value="post" />
|
||||
@@ -328,6 +330,7 @@
|
||||
script_path = ''
|
||||
initialScriptPath = ''
|
||||
is_flow = false
|
||||
http_method = 'get'
|
||||
} else {
|
||||
static_asset_config = undefined
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@
|
||||
<div class="text-center text-sm text-tertiary mt-2"> No routes </div>
|
||||
{:else if items?.length}
|
||||
<div class="border rounded-md divide-y">
|
||||
{#each items.slice(0, nbDisplayed) as { path, edited_by, edited_at, script_path, route_path, is_flow, extra_perms, canWrite, marked, http_method } (path)}
|
||||
{#each items.slice(0, nbDisplayed) as { path, edited_by, edited_at, script_path, route_path, is_flow, extra_perms, canWrite, marked, http_method, static_asset_config } (path)}
|
||||
{@const href = `${is_flow ? '/flows/get' : '/scripts/get'}/${script_path}`}
|
||||
|
||||
<div
|
||||
@@ -228,7 +228,11 @@
|
||||
{path}
|
||||
</div>
|
||||
<div class="text-secondary text-xs truncate text-left font-light">
|
||||
runnable: {script_path}
|
||||
{#if static_asset_config}
|
||||
file: {static_asset_config.s3}
|
||||
{:else}
|
||||
runnable: {script_path}
|
||||
{/if}
|
||||
</div>
|
||||
</a>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user