Merge remote-tracking branch 'origin/main' into glm/replace_menuV2

This commit is contained in:
Guilhem
2025-02-11 08:48:25 +00:00
9 changed files with 50 additions and 17 deletions
+12
View File
@@ -1,5 +1,17 @@
# Changelog
## [1.459.0](https://github.com/windmill-labs/windmill/compare/v1.458.4...v1.459.0) (2025-02-10)
### Features
* triggers cli sync ([#5243](https://github.com/windmill-labs/windmill/issues/5243)) ([df62925](https://github.com/windmill-labs/windmill/commit/df6292589479766acfe642d757f3736dfc369e33))
### Bug Fixes
* if user is authed, no need to use anonymous path for display result in apps ([deb1861](https://github.com/windmill-labs/windmill/commit/deb18615c20c4650e1bf765350f7abf4d2320a0a))
## [1.458.4](https://github.com/windmill-labs/windmill/compare/v1.458.3...v1.458.4) (2025-02-10)
@@ -1130,7 +1130,6 @@ async fn insert_flow_modules<'c>(
same_worker,
))
.await?;
add_virtual_items_if_necessary(modules);
if modules.is_empty() || crate::worker_flow::is_simple_modules(modules, failure_module) {
return Ok(tx);
}
@@ -1259,6 +1258,7 @@ async fn reduce_flow<'c>(
}
module.value = to_raw_value(&val);
}
add_virtual_items_if_necessary(&mut *modules);
Ok(tx)
}
@@ -677,16 +677,22 @@
<img
alt="preview rendered"
class="w-auto h-full"
src={`/api/w/${workspaceId}/${appPath ? 'apps_u/load_image_preview/' + appPath : 'job_helpers/load_image_preview'}?file_key=${result.s3}` +
(result.storage ? `&storage=${result.storage}` : '')}
src={`/api/w/${workspaceId}/${
appPath
? 'apps_u/load_image_preview/' + appPath
: 'job_helpers/load_image_preview'
}?file_key=${result.s3}` + (result.storage ? `&storage=${result.storage}` : '')}
/>
</div>
{:else if result?.s3?.endsWith('.pdf')}
<div class="h-96 mt-2 border">
<PdfViewer
allowFullscreen
source={`/api/w/${workspaceId}/${appPath ? 'apps_u/load_image_preview/' + appPath : 'job_helpers/load_image_preview'}?file_key=${result.s3}` +
(result.storage ? `&storage=${result.storage}` : '')}
source={`/api/w/${workspaceId}/${
appPath
? 'apps_u/load_image_preview/' + appPath
: 'job_helpers/load_image_preview'
}?file_key=${result.s3}` + (result.storage ? `&storage=${result.storage}` : '')}
/>
</div>
{/if}
@@ -15,6 +15,7 @@
import ResolveStyle from '../helpers/ResolveStyle.svelte'
import { components } from '../../editor/component'
import ResolveConfig from '../helpers/ResolveConfig.svelte'
import { userStore } from '$lib/stores'
export let id: string
export let componentInput: AppInput | undefined
@@ -96,7 +97,7 @@
{result}
{requireHtmlApproval}
disableExpand={resolvedConfig?.hideDetails}
appPath={$appPath}
appPath={$userStore ? undefined : $appPath}
/>
</div>
</div>
@@ -16,6 +16,7 @@
import ResolveStyle from '../helpers/ResolveStyle.svelte'
import InitializeComponent from '../helpers/InitializeComponent.svelte'
import DisplayResult from '$lib/components/DisplayResult.svelte'
import { userStore } from '$lib/stores'
export let id: string
export let initializing: boolean | undefined = false
@@ -23,7 +24,7 @@
export let configuration: RichConfigurations
export let render: boolean
const { app, worldStore, workspace } = getContext<AppViewerContext>('AppViewerContext')
const { app, worldStore, workspace, appPath } = getContext<AppViewerContext>('AppViewerContext')
const requireHtmlApproval = getContext<boolean | undefined>(IS_APP_PUBLIC_CONTEXT_KEY)
let resolvedConfig = initConfig(
@@ -115,6 +116,7 @@
{result}
{requireHtmlApproval}
disableExpand={resolvedConfig?.hideDetails}
appPath={$userStore ? undefined : $appPath}
/>
</div>
</div>
+1 -1
View File
@@ -248,7 +248,7 @@ declare function setValue(id: string, value: any): void;
*/
declare function setSelectedIndex(id: string, index: number): void;
/** close a drawer or modal
/** open a drawer or modal
* @param id component's id
*/
declare function open(id: string): void;
@@ -122,8 +122,13 @@
<Toggle
options={{
right: 'Continue on disapproval/timeout',
rightTooltip:
'Instead of failing the flow and bubbling up the error, continue to the next step which would allow to put a branchone right after to handle both cases separately. If any disapproval/timeout event is received, the resume payload will be similar to every error result in Winmdill, an object containing an `error` field which you can use to distinguish between approvals and disapproval/timeouts'
rightTooltip: `Instead of failing the flow and bubbling up the error, continue to the next step which would allow to put a branchone right after to handle both cases separately.
If any disapproval/timeout event is received, the resume payload will be similar to every error result in Windmill, an object containing an "error" field which you can use
to distinguish between approvals and disapproval/timeouts.
We recommend using the expr "resume?.error" to handle null payload values.
To filter timeout, use "resume?.error?.name === "SuspendedTimedOut"
To filter disapproval, use "resume?.error?.name === "SuspendedDisapproved"`
}}
checked={Boolean(flowModule.suspend?.continue_on_disapprove_timeout)}
disabled={!Boolean(flowModule.suspend)}
@@ -133,6 +138,14 @@
}
}}
/>
{#if Boolean(flowModule.suspend?.continue_on_disapprove_timeout)}
<Alert type="info" title="Continue on disapproval/timeout">
We recommend using the expr <code>resume?.error</code> to handle null payload values.
<br />
To filter timeout, use <code>resume?.error?.name === "SuspendedTimedOut"</code>. <br />
To filter disapproval, use <code>resume?.error?.name === "SuspendedDisapproved"</code>
</Alert>
{/if}
</div>
{:else if suspendTabSelected === 'permissions'}
<div class="flex flex-col mt-4 gap-4">
@@ -88,7 +88,7 @@ function getFlowInput(
}
} else {
let parentFlowInput = getFlowInput(parentModules, flowState, args, schema)
if (parentModule.value.type === 'forloopflow') {
if (parentModule.value.type === 'forloopflow' || parentModule.value.type === 'whileloopflow') {
let parentFlowInputIter = { ...parentFlowInput }
if (parentFlowInputIter.hasOwnProperty('iter')) {
parentFlowInputIter['iter_parent'] = parentFlowInputIter['iter']
@@ -263,9 +263,8 @@ declare const results = ${JSON.stringify(results)};
*/
declare const previous_result: ${previousId ? JSON.stringify(results[previousId]) : 'any'};
${
resume
? `
${resume
? `
/**
* resume payload
*/
@@ -276,8 +275,8 @@ declare const resume: any
*/
declare const approvers: string
`
: ''
}
: ''
}
`
}
+1 -1
View File
@@ -1 +1 @@
1.458.4
1.459.0